Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglDirectionalLight.hpp

00001 /*****************************************************************************
00002  * SGL: A Scene Graph Library
00003  *
00004  * Copyright (C) 1997-2001  Scott McMillan   All Rights Reserved.
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public
00017  * License along with this library; if not, write to the Free
00018  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  *****************************************************************************
00020  *     File: sglDirectionalLight.hpp
00021  *   Author: Scott McMillan
00022  *  Created: 9 December 2000
00023  *  Summary: encapsulates an infinite light source
00024  *****************************************************************************/
00025 
00026 #ifndef __SGL_DIRECTIONAL_LIGHT_HPP
00027 #define __SGL_DIRECTIONAL_LIGHT_HPP
00028 
00029 #include <sgl.h>
00030 #include <sglLight.hpp>
00031 
00032 //----------------------------------------------------------------------------
00033 
00055 class SGL_DLL_API sglDirectionalLight : public sglLight
00056 {
00057 public:
00059    sglDirectionalLight();
00061    virtual ~sglDirectionalLight();
00062 
00066    void setDirection(const sglVec3f &dir);
00067 
00072    void getDirection(sglVec3f &dir) const;
00073 
00074    // See sglLight::setup() for details.
00075    virtual void setup(GLenum gl_light_number) const;
00076 
00077    // See sglNode::clone() for details.
00078    virtual sglNode *clone(unsigned int mode) const;
00079 
00080    // See sglObject::printInfo() for details.
00081    virtual void printInfo(ostream &ostrm, const char *indent_string) const;
00082 
00083 protected:
00084    virtual void computeBound();
00085 
00086    void copyTo(sglDirectionalLight *dst, unsigned int mode) const;
00087 
00088 private: // methods - not implemented
00089    sglDirectionalLight(const sglLight &);
00090    sglDirectionalLight &operator=(const sglDirectionalLight &);
00091 
00092 protected: // variables
00093    sglVec4f m_direction;  // 4th element is always zero
00094 };
00095 
00096 #endif

Generated at Mon Jul 1 18:00:04 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001