00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
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
00055
00056 void LightEnv::changed(BitVector whichField, UInt32 origin)
00057 {
00058 Inherited::changed(whichField, origin);
00059 }
00060
00061
00062
00063
00064
00065 void LightEnv::dump( UInt32 uiIndent,
00066 const BitVector bvFlags) const
00067 {
00068 Inherited::dump(uiIndent, bvFlags);
00069 }
00070
00071
00072
00073
00074 LightEnv::LightEnv(void) :
00075 Inherited()
00076 {
00077 }
00078
00079 LightEnv::LightEnv(const LightEnv &source) :
00080 Inherited(source)
00081 {
00082 }
00083
00084
00085
00086
00087 LightEnv::~LightEnv(void)
00088 {
00089 }
00090
00091
00092
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
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
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 }