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

sglSpotLight.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: sglSpotLight.hpp
00021  *   Author: Scott McMillan
00022  *  Created: 9 December 2000
00023  *  Summary: a positional light subclass with spot characteristics
00024  *****************************************************************************/
00025 
00026 #ifndef __SGL_SPOT_LIGHT_HPP
00027 #define __SGL_SPOT_LIGHT_HPP
00028 
00029 #include <sgl.h>
00030 #include <sglPositionalLight.hpp>
00031 
00060 class SGL_DLL_API sglSpotLight : public sglPositionalLight
00061 {
00062 public:
00064    sglSpotLight();
00066    virtual ~sglSpotLight();
00067 
00072    void setDirection(const sglVec3f &dir);
00073 
00077    const sglVec3f &getDirection() const { return m_direction; }
00078 
00083    void setCutoff(float cutoff);  // in radians
00084 
00088    float getCutoff() const { return m_cutoff; }
00089 
00094    void setExponent(float exponent);
00095 
00099    float getExponent() const { return m_exponent; }
00100 
00101    // See sglLight::setup() for details.
00102    virtual void setup(GLenum gl_light_number) const;
00103 
00104    // See sglNode::clone(..) for details.
00105    virtual sglNode *clone(unsigned int mode) const;
00106 
00107    // See sglObject::printInfo() for details.
00108    virtual void printInfo(ostream &ostrm, const char *indent_string) const;
00109 
00110 protected:
00111    void copyTo(sglSpotLight *dst, unsigned int mode) const;
00112 
00113 private: // methods - not implemented
00114    sglSpotLight(const sglLight &);
00115    sglSpotLight &operator=(const sglSpotLight &);
00116 
00117 protected: // variables
00118    sglVec3f m_direction;
00119    float    m_exponent;
00120    float    m_cutoff;
00121 };
00122 
00123 #endif

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