Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGLightEnv.cpp

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #include <stdlib.h>
00040 #include <stdio.h>
00041 
00042 #include "OSGConfig.h"
00043 
00044 #include <OSGGL.h>
00045 
00046 #include <OSGDrawAction.h>
00047 #include <OSGRenderAction.h>
00048 #include "OSGLightEnv.h"
00049 
00050 OSG_USING_NAMESPACE
00051 
00052 
00053 /*-------------------------------------------------------------------------*/
00054 /*                             Sync                                     */
00055 
00056 void LightEnv::changed(BitVector whichField, UInt32 origin)
00057 {
00058     Inherited::changed(whichField, origin);
00059 }
00060 
00061 
00062 /*-------------------------------------------------------------------------*/
00063 /*                                Dump                                     */
00064 
00065 void LightEnv::dump(      UInt32    uiIndent, 
00066                      const BitVector bvFlags) const
00067 {
00068    Inherited::dump(uiIndent, bvFlags);
00069 }
00070 
00071 /*-------------------------------------------------------------------------*/
00072 /*                            Constructors                                 */
00073 
00074 LightEnv::LightEnv(void) :
00075      Inherited()
00076 {
00077 }
00078 
00079 LightEnv::LightEnv(const LightEnv &source) :
00080      Inherited(source)
00081 {
00082 }
00083 
00084 /*-------------------------------------------------------------------------*/
00085 /*                             Destructor                                  */
00086 
00087 LightEnv::~LightEnv(void)
00088 {
00089 }
00090 
00091 /*-------------------------------------------------------------------------*/
00092 /*                             Rendering                                   */
00093 
00094 Action::ResultE LightEnv::renderEnter(Action *action)
00095 {
00096     RenderAction *pAction = dynamic_cast<RenderAction *>(action);
00097 
00098     pAction->dropLightEnv(this);
00099 
00100     return Action::Continue;
00101 }
00102 
00103 Action::ResultE LightEnv::renderLeave(Action *action)
00104 {
00105     RenderAction *pAction = dynamic_cast<RenderAction *>(action);
00106 
00107     pAction->undropLightEnv(this);
00108 
00109     return Action::Continue;
00110 }
00111 
00112 /*-------------------------------------------------------------------------*/
00113 /*                               Init                                      */
00114 
00116 
00117 void LightEnv::initMethod(void)
00118 {
00119     RenderAction::registerEnterDefault(
00120         getClassType(), 
00121         osgTypedMethodFunctor2BaseCPtrRef<
00122             Action::ResultE,
00123             LightEnvPtr  , 
00124             CNodePtr          ,  
00125             Action           *>(&LightEnv::renderEnter));
00126 
00127     RenderAction::registerLeaveDefault(
00128         getClassType(), 
00129         osgTypedMethodFunctor2BaseCPtrRef<
00130             Action::ResultE,
00131             LightEnvPtr  , 
00132             CNodePtr          ,  
00133             Action           *>(&LightEnv::renderLeave));
00134 }
00135 
00136 
00137 /*-------------------------------------------------------------------------*/
00138 /*                              cvs id's                                   */
00139 
00140 #ifdef __sgi
00141 #pragma set woff 1174
00142 #endif
00143 
00144 #ifdef OSG_LINUX_ICC
00145 #pragma warning( disable : 177 )
00146 #endif
00147 
00148 namespace
00149 {
00150     static Char8 cvsid_cpp[] = "@(#)$Id: OSGLightEnv.cpp,v 1.1 2005/04/23 11:00:58 a-m-z Exp $";
00151     static Char8 cvsid_hpp[] = OSGLIGHTENV_HEADER_CVSID;
00152     static Char8 cvsid_inl[] = OSGLIGHTENV_INLINE_CVSID;
00153 }

Generated on Thu Aug 25 04:06:56 2005 for OpenSG by  doxygen 1.4.3