#include <OSGDirectionalLight.h>
Inheritance diagram for osg::DirectionalLight:

Public Types | |
| typedef DirectionalLightPtr | Ptr |
| enum | { DirectionFieldId = Inherited::NextFieldId, NextFieldId = DirectionFieldId + 1 } |
Public Member Functions | |
Set | |
| *void | setDirection (Real32 rX, Real32 rY, Real32 rZ) |
| void | setDirection (const Vec3f &direction) |
| Set the value of the DirectionalLight::_sfDirection field. | |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Chunk | |
| *virtual void | makeChunk (void) |
Dump | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFVec3f * | getSFDirection (void) |
| Get the DirectionalLight::_sfDirection field. | |
| Vec3f & | getDirection (void) |
| Get the value of the DirectionalLight::_sfDirection field. | |
| const Vec3f & | getDirection (void) const |
| Get the value of the DirectionalLight::_sfDirection field. | |
Binary Access | |
| *virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
Copy | |
| *virtual FieldContainerPtr | shallowCopy (void) const |
Static Public Member Functions | |
Class Get | |
| *static FieldContainerType & | getClassType (void) |
| access the type of the class | |
| static UInt32 | getClassTypeId (void) |
| access the numerical type of the class | |
Construction | |
| *static DirectionalLightPtr | create (void) |
| create a new instance of the class | |
| static DirectionalLightPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Static Public Attributes | |
| static const osg::BitVector | DirectionFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const osg::BitVector | AmbientFieldMask |
| static const osg::BitVector | DiffuseFieldMask |
| static const osg::BitVector | SpecularFieldMask |
| static const osg::BitVector | BeaconFieldMask |
| static const osg::BitVector | OnFieldMask |
| static const osg::BitVector | ConstantAttenuationFieldMask |
| static const osg::BitVector | LinearAttenuationFieldMask |
| static const osg::BitVector | QuadraticAttenuationFieldMask |
| static const BitVector | ParentsFieldMask = (1 << NodeCore::ParentsFieldId ) |
| static const BitVector | AttachmentsFieldMask |
| static const BitVector | NextFieldMask |
static stat elem | |
| *static StatElemDesc< StatIntElem > | statNDirectionalLights |
Protected Types | |
| typedef DirectionalLightBase | Inherited |
Protected Member Functions | |
Constructors | |
| * | DirectionalLight (void) |
| DirectionalLight (const DirectionalLight &source) | |
Destructors | |
| *virtual | ~DirectionalLight (void) |
Actions | |
| *Action::ResultE | drawEnter (Action *action) |
| Action::ResultE | drawLeave (Action *action) |
| Action::ResultE | renderEnter (Action *action) |
| Action::ResultE | renderLeave (Action *action) |
Sync | |
| *void | executeSyncImpl (DirectionalLightBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Protected Attributes | |
| LightChunkPtr | _pChunk |
Fields | |
| *SFVec3f | _sfDirection |
Private Member Functions | |
| void | operator= (const DirectionalLight &source) |
| prohibit default function (move to 'public' if needed) | |
Static Private Member Functions | |
| static void | initMethod (void) |
| initialize the static features of the class, e.g. action callbacks | |
Friends | |
| class | FieldContainer |
| class | DirectionalLightBase |
Definition at line 54 of file OSGDirectionalLight.h.
|
|
Reimplemented from osg::DirectionalLightBase. Definition at line 103 of file OSGDirectionalLight.h. |
|
|
Reimplemented from osg::LightBase. Definition at line 90 of file OSGDirectionalLightBase.h. |
|
|
Reimplemented from osg::LightBase. Definition at line 92 of file OSGDirectionalLightBase.h. 00093 { 00094 DirectionFieldId = Inherited::NextFieldId, 00095 NextFieldId = DirectionFieldId + 1 00096 };
|
|
|
Definition at line 106 of file OSGDirectionalLight.cpp. 00106 : 00107 Inherited() 00108 { 00109 }
|
|
|
Definition at line 111 of file OSGDirectionalLight.cpp. 00111 : 00112 Inherited(source) 00113 { 00114 }
|
|
|
Definition at line 119 of file OSGDirectionalLight.cpp.
|
|
||||||||||||||||
|
Definition at line 67 of file OSGDirectionalLight.cpp. References osg::DirectionalLightBase::_sfDirection, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00068 { 00069 _sfDirection.getValue().setValues(rX, rY, rZ); 00070 }
|
|
|
Reimplemented from osg::DirectionalLightBase. Definition at line 45 of file OSGDirectionalLight.inl. References osg::DirectionalLightBase::setDirection(). 00046 { 00047 Inherited::setDirection(value); 00048 }
|
|
||||||||||||
|
Reimplemented from osg::Light. Definition at line 75 of file OSGDirectionalLight.cpp. References osg::Light::changed(). 00076 { 00077 Inherited::changed(whichField, origin); 00078 }
|
|
|
Reimplemented from osg::Light. Definition at line 83 of file OSGDirectionalLight.cpp. References osg::Light::_pChunk, osg::DirectionalLightBase::_sfDirection, osg::SField< FieldTypeT, fieldNameSpace >::getValue(), and osg::Light::makeChunk(). 00084 { 00085 Inherited::makeChunk(); 00086 00087 Vec4f dir(_sfDirection.getValue()); 00088 00089 dir[3] = 0; 00090 00091 _pChunk->setPosition(dir); 00092 }
|
|
||||||||||||
|
Reimplemented from osg::Light. Definition at line 97 of file OSGDirectionalLight.cpp. References osg::Light::dump(). 00099 { 00100 Inherited::dump(uiIndent, bvFlags); 00101 }
|
|
|
|
Reimplemented from osg::Light. Definition at line 151 of file OSGDirectionalLight.cpp. References osg::Action::Continue, osg::Light::drawLeave(), and osg::LightBase::getOn(). Referenced by initMethod(). 00152 { 00153 if(getOn() == false) 00154 return Action::Continue; 00155 00156 return Light::drawLeave(action); 00157 }
|
|
|
Reimplemented from osg::Light. Definition at line 162 of file OSGDirectionalLight.cpp. References osg::Action::Continue, osg::StatCollector::getElem(), osg::LightBase::getOn(), osg::DrawActionBase::getStatistics(), osg::Light::renderEnter(), and statNDirectionalLights. Referenced by initMethod(). 00163 { 00164 if(getOn() == false) 00165 return Action::Continue; 00166 00167 DrawActionBase *da = dynamic_cast<DrawActionBase *>(action); 00168 da->getStatistics()->getElem(DirectionalLight::statNDirectionalLights)->inc(); 00169 00170 return Light::renderEnter(action); 00171 }
|
|
|
Reimplemented from osg::Light. Definition at line 173 of file OSGDirectionalLight.cpp. References osg::Action::Continue, osg::LightBase::getOn(), and osg::Light::renderLeave(). Referenced by initMethod(). 00174 { 00175 if(getOn() == false) 00176 return Action::Continue; 00177 00178 return Light::renderLeave(action); 00179 }
|
|
|
|
|
|
|
Reimplemented from osg::LightBase. Definition at line 58 of file OSGDirectionalLightBase.inl. References osg::DirectionalLightBase::_type. Referenced by osg::DirectionalLightBase::create(), and initMethod(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::LightBase. Definition at line 65 of file OSGDirectionalLightBase.inl. References osg::DirectionalLightBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::LightBase. Definition at line 106 of file OSGDirectionalLightBase.cpp. References osg::DirectionalLightBase::_type. 00107 { 00108 return _type; 00109 }
|
|
|
Reimplemented from osg::LightBase. Definition at line 111 of file OSGDirectionalLightBase.cpp. References osg::DirectionalLightBase::_type. 00112 { 00113 return _type; 00114 }
|
|
|
Reimplemented from osg::LightBase. Definition at line 126 of file OSGDirectionalLightBase.cpp. 00127 { 00128 return sizeof(DirectionalLight); 00129 }
|
|
|
Definition at line 101 of file OSGDirectionalLightBase.inl. References osg::DirectionalLightBase::_sfDirection. 00102 { 00103 return &_sfDirection; 00104 }
|
|
|
Definition at line 109 of file OSGDirectionalLightBase.inl. References osg::DirectionalLightBase::_sfDirection, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00110 { 00111 return _sfDirection.getValue(); 00112 }
|
|
|
Definition at line 116 of file OSGDirectionalLightBase.inl. References osg::DirectionalLightBase::_sfDirection, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00117 { 00118 return _sfDirection.getValue(); 00119 }
|
|
|
Reimplemented from osg::LightBase. Definition at line 188 of file OSGDirectionalLightBase.cpp. References osg::DirectionalLightBase::_sfDirection, osg::DirectionalLightBase::DirectionFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::LightBase::getBinSize(), and osg::FieldBits::NoField. 00189 { 00190 UInt32 returnValue = Inherited::getBinSize(whichField); 00191 00192 if(FieldBits::NoField != (DirectionFieldMask & whichField)) 00193 { 00194 returnValue += _sfDirection.getBinSize(); 00195 } 00196 00197 00198 return returnValue; 00199 }
|
|
||||||||||||
|
Reimplemented from osg::LightBase. Definition at line 201 of file OSGDirectionalLightBase.cpp. References osg::DirectionalLightBase::_sfDirection, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::LightBase::copyToBin(), osg::DirectionalLightBase::DirectionFieldMask, and osg::FieldBits::NoField. 00203 { 00204 Inherited::copyToBin(pMem, whichField); 00205 00206 if(FieldBits::NoField != (DirectionFieldMask & whichField)) 00207 { 00208 _sfDirection.copyToBin(pMem); 00209 } 00210 00211 00212 }
|
|
||||||||||||
|
Reimplemented from osg::LightBase. Definition at line 214 of file OSGDirectionalLightBase.cpp. References osg::DirectionalLightBase::_sfDirection, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::LightBase::copyFromBin(), osg::DirectionalLightBase::DirectionFieldMask, and osg::FieldBits::NoField. 00216 { 00217 Inherited::copyFromBin(pMem, whichField); 00218 00219 if(FieldBits::NoField != (DirectionFieldMask & whichField)) 00220 { 00221 _sfDirection.copyFromBin(pMem); 00222 } 00223 00224 00225 }
|
|
|
Definition at line 72 of file OSGDirectionalLightBase.inl. References osg::AttachmentContainerPtr::dcast(), osg::DirectionalLightBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::DirectionalLightBase::shallowCopy(). Referenced by osg::SimpleSceneManager::initialize(). 00073 { 00074 DirectionalLightPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = DirectionalLightPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Definition at line 87 of file OSGDirectionalLightBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 DirectionalLightPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Implements osg::FieldContainer. Definition at line 117 of file OSGDirectionalLightBase.cpp. References osg::FieldContainer::newPtr(). Referenced by osg::DirectionalLightBase::create(). 00118 { 00119 DirectionalLightPtr returnValue; 00120 00121 newPtr(returnValue, dynamic_cast<const DirectionalLight *>(this)); 00122 00123 return returnValue; 00124 }
|
|
||||||||||||
|
Definition at line 228 of file OSGDirectionalLightBase.cpp. References osg::DirectionalLightBase::_sfDirection, osg::DirectionalLightBase::DirectionFieldMask, osg::LightBase::executeSyncImpl(), osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::DirectionalLightBase::executeSync(). 00230 { 00231 00232 Inherited::executeSyncImpl(pOther, whichField); 00233 00234 if(FieldBits::NoField != (DirectionFieldMask & whichField)) 00235 _sfDirection.syncWith(pOther->_sfDirection); 00236 00237 00238 }
|
|
||||||||||||
|
||||||||||||
|
Definition at line 180 of file OSGNodeCore.inl. References osg::NodeCore::_parents, osg::AttachmentContainer::executeSyncImpl(), osg::FieldBits::NoField, osg::NodeCore::ParentsFieldMask, and osg::MField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::NodeCore::executeSync(), osg::StateSortingGroupBase::executeSyncImpl(), osg::LightEnvBase::executeSyncImpl(), osg::LightBase::executeSyncImpl(), osg::InlineBase::executeSyncImpl(), osg::GroupBase::executeSyncImpl(), osg::DVRVolumeBase::executeSyncImpl(), and osg::DrawableBase::executeSyncImpl(). 00182 { 00183 Inherited::executeSyncImpl(pOther, whichField); 00184 00185 if(FieldBits::NoField != (ParentsFieldMask & whichField)) 00186 { 00187 _parents.syncWith(pOther->_parents); 00188 } 00189 }
|
|
||||||||||||
|
||||||||||||
|
Definition at line 333 of file OSGFieldContainerImpl.inl. Referenced by osg::StateBase::executeSyncImpl(), osg::DVRShaderBase::executeSyncImpl(), osg::DVRClipGeometryBase::executeSyncImpl(), osg::AttachmentContainer::executeSyncImpl(), and osg::Attachment::executeSyncImpl().
|
|
||||||||||||
|
Reimplemented from osg::LightBase. Definition at line 133 of file OSGDirectionalLightBase.cpp. References osg::DirectionalLightBase::executeSyncImpl(). 00135 { 00136 this->executeSyncImpl((DirectionalLightBase *) &other, whichField); 00137 }
|
|
||||||||||||||||||||
|
Definition at line 66 of file OSGLight.cpp. References osg::LightBase::_sfAmbient, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00070 { 00071 _sfAmbient.getValue().setValuesRGBA(rRed, rGreen, rBlue, rAlpha); 00072 }
|
|
|
Reimplemented from osg::LightBase. Definition at line 46 of file OSGLight.inl. References osg::LightBase::setAmbient(). 00047 { 00048 Inherited::setAmbient(col); 00049 }
|
|
||||||||||||||||||||
|
Definition at line 74 of file OSGLight.cpp. References osg::LightBase::_sfDiffuse, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00078 { 00079 _sfDiffuse.getValue().setValuesRGBA(rRed, rGreen, rBlue, rAlpha); 00080 }
|
|
|
Reimplemented from osg::LightBase. Definition at line 52 of file OSGLight.inl. References osg::LightBase::setDiffuse(). 00053 { 00054 Inherited::setDiffuse(col); 00055 }
|
|