#include <OSGSpotLightBase.h>
Inheritance diagram for osg::SpotLightBase:

Public Types | |
| typedef SpotLightPtr | Ptr |
| enum | { DirectionFieldId = Inherited::NextFieldId, SpotExponentFieldId = DirectionFieldId + 1, SpotCutOffFieldId = SpotExponentFieldId + 1, NextFieldId = SpotCutOffFieldId + 1 } |
Public Member Functions | |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFVec3f * | getSFDirection (void) |
| Get the SpotLight::_sfDirection field. | |
| SFReal32 * | getSFSpotExponent (void) |
| Get the SpotLight::_sfSpotExponent field. | |
| SFReal32 * | getSFSpotCutOff (void) |
| Get the SpotLight::_sfSpotCutOff field. | |
| Vec3f & | getDirection (void) |
| Get the value of the SpotLight::_sfDirection field. | |
| const Vec3f & | getDirection (void) const |
| Get the value of the SpotLight::_sfDirection field. | |
| Real32 & | getSpotExponent (void) |
| Get the value of the SpotLight::_sfSpotExponent field. | |
| const Real32 & | getSpotExponent (void) const |
| Get the value of the SpotLight::_sfSpotExponent field. | |
| Real32 & | getSpotCutOff (void) |
| Get the value of the SpotLight::_sfSpotCutOff field. | |
| const Real32 & | getSpotCutOff (void) const |
| Get the value of the SpotLight::_sfSpotCutOff field. | |
Field Set | |
| *void | setDirection (const Vec3f &value) |
| Set the value of the SpotLight::_sfDirection field. | |
| void | setSpotExponent (const Real32 &value) |
| Set the value of the SpotLight::_sfSpotExponent field. | |
| void | setSpotCutOff (const Real32 &value) |
| Set the value of the SpotLight::_sfSpotCutOff 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 |
Access Fields | |
| *void | setPosition (Real32 rX, Real32 rY, Real32 rZ) |
| void | setPosition (const Pnt3f &pos) |
| Set the value of the PointLight::_sfPosition field. | |
| void | setAttenuation (Real32 rConstant, Real32 rLinear, Real32 rQuadratic) |
Chunk | |
| *virtual void | makeChunk (void) |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Dump | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
Field Get | |
| *SFPnt3f * | getSFPosition (void) |
| Get the PointLight::_sfPosition field. | |
| Pnt3f & | getPosition (void) |
| Get the value of the PointLight::_sfPosition field. | |
| const Pnt3f & | getPosition (void) const |
| Get the value of the PointLight::_sfPosition field. | |
Set | |
| *void | setAmbient (Real32 rRed, Real32 rGreen, Real32 rBlue, Real32 rAlpha) |
| void | setAmbient (const Color4f &col) |
| Set the value of the Light::_sfAmbient field. | |
| void | setDiffuse (Real32 rRed, Real32 rGreen, Real32 rBlue, Real32 rAlpha) |
| void | setDiffuse (const Color4f &col) |
| Set the value of the Light::_sfDiffuse field. | |
| void | setSpecular (Real32 rRed, Real32 rGreen, Real32 rBlue, Real32 rAlpha) |
| void | setSpecular (const Color4f &col) |
| Set the value of the Light::_sfSpecular field. | |
Chunk | |
| *LightChunkPtr | getChunk (void) |
Field Get | |
| *SFColor4f * | getSFAmbient (void) |
| Get the Light::_sfAmbient field. | |
| SFColor4f * | getSFDiffuse (void) |
| Get the Light::_sfDiffuse field. | |
| SFColor4f * | getSFSpecular (void) |
| Get the Light::_sfSpecular field. | |
| SFNodePtr * | getSFBeacon (void) |
| Get the Light::_sfBeacon field. | |
| SFBool * | getSFOn (void) |
| Get the Light::_sfOn field. | |
| SFReal32 * | getSFConstantAttenuation (void) |
| Get the Light::_sfConstantAttenuation field. | |
| SFReal32 * | getSFLinearAttenuation (void) |
| Get the Light::_sfLinearAttenuation field. | |
| SFReal32 * | getSFQuadraticAttenuation (void) |
| Get the Light::_sfQuadraticAttenuation field. | |
| Color4f & | getAmbient (void) |
| Get the value of the Light::_sfAmbient field. | |
| const Color4f & | getAmbient (void) const |
| Get the value of the Light::_sfAmbient field. | |
| Color4f & | getDiffuse (void) |
| Get the value of the Light::_sfDiffuse field. | |
| const Color4f & | getDiffuse (void) const |
| Get the value of the Light::_sfDiffuse field. | |
| Color4f & | getSpecular (void) |
| Get the value of the Light::_sfSpecular field. | |
| const Color4f & | getSpecular (void) const |
| Get the value of the Light::_sfSpecular field. | |
| NodePtr & | getBeacon (void) |
| Get the value of the Light::_sfBeacon field. | |
| const NodePtr & | getBeacon (void) const |
| Get the value of the Light::_sfBeacon field. | |
| bool & | getOn (void) |
| Get the value of the Light::_sfOn field. | |
| const bool & | getOn (void) const |
| Get the value of the Light::_sfOn field. | |
| Real32 & | getConstantAttenuation (void) |
| Get the value of the Light::_sfConstantAttenuation field. | |
| const Real32 & | getConstantAttenuation (void) const |
| Get the value of the Light::_sfConstantAttenuation field. | |
| Real32 & | getLinearAttenuation (void) |
| Get the value of the Light::_sfLinearAttenuation field. | |
| const Real32 & | getLinearAttenuation (void) const |
| Get the value of the Light::_sfLinearAttenuation field. | |
| Real32 & | getQuadraticAttenuation (void) |
| Get the value of the Light::_sfQuadraticAttenuation field. | |
| const Real32 & | getQuadraticAttenuation (void) const |
| Get the value of the Light::_sfQuadraticAttenuation field. | |
Field Set | |
| void | setBeacon (const NodePtr &value) |
| Set the value of the Light::_sfBeacon field. | |
| void | setOn (const bool &value) |
| Set the value of the Light::_sfOn field. | |
| void | setConstantAttenuation (const Real32 &value) |
| Set the value of the Light::_sfConstantAttenuation field. | |
| void | setLinearAttenuation (const Real32 &value) |
| Set the value of the Light::_sfLinearAttenuation field. | |
| void | setQuadraticAttenuation (const Real32 &value) |
| Set the value of the Light::_sfQuadraticAttenuation field. | |
Parents | |
| *MFNodePtr & | getParents (void) |
| const MFNodePtr & | getParents (void) const |
| MFNodePtr * | getMFParents (void) |
Volume | |
| *virtual void | invalidateVolume (void) |
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 SpotLightPtr | create (void) |
| create a new instance of the class | |
| static SpotLightPtr | 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 | SpotExponentFieldMask |
| static const osg::BitVector | SpotCutOffFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const osg::BitVector | PositionFieldMask |
| 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 > | statNPointLights |
CoredNodePtr helper | |
| *static const bool | isNodeCore = true |
Protected Member Functions | |
Constructors | |
| * | SpotLightBase (void) |
| SpotLightBase (const SpotLightBase &source) | |
Destructors | |
| *virtual | ~SpotLightBase (void) |
Sync | |
| *void | executeSyncImpl (SpotLightBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Actions | |
| *Action::ResultE | drawEnter (Action *action) |
| Action::ResultE | drawLeave (Action *action) |
| Action::ResultE | renderEnter (Action *action) |
| Action::ResultE | renderLeave (Action *action) |
Sync | |
| *void | executeSyncImpl (PointLightBase *pOther, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (LightBase *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (NodeCore *pOther, const BitVector &whichField) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Set / Get Parents | |
| *void | addParent (const NodePtr &parent) |
| void | subParent (const NodePtr &parent) |
Pointer | |
| *NodeCorePtr | getPtr (void) const |
Transformation | |
| *virtual void | accumulateMatrix (Matrix &result) |
Volume | |
| *virtual void | adjustVolume (Volume &volume) |
Protected Attributes | |
| LightChunkPtr | _pChunk |
Fields | |
| *SFVec3f | _sfDirection |
| SFReal32 | _sfSpotExponent |
| SFReal32 | _sfSpotCutOff |
Fields | |
| *SFPnt3f | _sfPosition |
Fields | |
| *SFColor4f | _sfAmbient |
| SFColor4f | _sfDiffuse |
| SFColor4f | _sfSpecular |
| SFNodePtr | _sfBeacon |
| SFBool | _sfOn |
| SFReal32 | _sfConstantAttenuation |
| SFReal32 | _sfLinearAttenuation |
| SFReal32 | _sfQuadraticAttenuation |
Fields | |
| *MFNodePtr | _parents |
Private Types | |
| typedef PointLight | Inherited |
Private Member Functions | |
| void | operator= (const SpotLightBase &source) |
Static Private Attributes | |
| static FieldDescription * | _desc [] |
| SpotLight description. | |
| static FieldContainerType | _type |
Friends | |
| class | FieldContainer |
Definition at line 83 of file OSGSpotLightBase.h.
|
|
Reimplemented from osg::PointLight. Reimplemented in osg::SpotLight. Definition at line 87 of file OSGSpotLightBase.h. |
|
|
Reimplemented from osg::PointLightBase. Definition at line 92 of file OSGSpotLightBase.h. |
|
|
Reimplemented from osg::PointLightBase. Definition at line 94 of file OSGSpotLightBase.h. 00095 { 00096 DirectionFieldId = Inherited::NextFieldId, 00097 SpotExponentFieldId = DirectionFieldId + 1, 00098 SpotCutOffFieldId = SpotExponentFieldId + 1, 00099 NextFieldId = SpotCutOffFieldId + 1 00100 };
|
|
|
Definition at line 186 of file OSGSpotLightBase.cpp. 00186 : 00187 _sfDirection (Vec3f(0,0,1)), 00188 _sfSpotExponent (), 00189 _sfSpotCutOff (), 00190 Inherited() 00191 { 00192 }
|
|
|
Definition at line 198 of file OSGSpotLightBase.cpp. 00198 : 00199 _sfDirection (source._sfDirection ), 00200 _sfSpotExponent (source._sfSpotExponent ), 00201 _sfSpotCutOff (source._sfSpotCutOff ), 00202 Inherited (source) 00203 { 00204 }
|
|
|
Definition at line 208 of file OSGSpotLightBase.cpp.
|
|
|
Reimplemented from osg::PointLightBase. Definition at line 58 of file OSGSpotLightBase.inl. References _type. Referenced by create(), and osg::SpotLight::initMethod(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::PointLightBase. Definition at line 65 of file OSGSpotLightBase.inl. References _type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::PointLightBase. Definition at line 128 of file OSGSpotLightBase.cpp. References _type. 00129 { 00130 return _type; 00131 }
|
|
|
Reimplemented from osg::PointLightBase. Definition at line 133 of file OSGSpotLightBase.cpp. References _type. 00134 { 00135 return _type; 00136 }
|
|
|
Reimplemented from osg::PointLightBase. Definition at line 148 of file OSGSpotLightBase.cpp. 00149 { 00150 return sizeof(SpotLight); 00151 }
|
|
|
Definition at line 101 of file OSGSpotLightBase.inl. References _sfDirection. 00102 { 00103 return &_sfDirection; 00104 }
|
|
|
Definition at line 108 of file OSGSpotLightBase.inl. References _sfSpotExponent. 00109 { 00110 return &_sfSpotExponent; 00111 }
|
|
|
Definition at line 115 of file OSGSpotLightBase.inl. References _sfSpotCutOff. 00116 { 00117 return &_sfSpotCutOff; 00118 }
|
|
|
Definition at line 123 of file OSGSpotLightBase.inl. References _sfDirection, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::SpotLight::makeChunk(). 00124 { 00125 return _sfDirection.getValue(); 00126 }
|
|
|
Definition at line 130 of file OSGSpotLightBase.inl. References _sfDirection, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00131 { 00132 return _sfDirection.getValue(); 00133 }
|
|
|
Definition at line 144 of file OSGSpotLightBase.inl. References _sfSpotExponent, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::SpotLight::makeChunk(). 00145 { 00146 return _sfSpotExponent.getValue(); 00147 }
|
|
|
Definition at line 151 of file OSGSpotLightBase.inl. References _sfSpotExponent, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00152 { 00153 return _sfSpotExponent.getValue(); 00154 }
|
|
|
Definition at line 165 of file OSGSpotLightBase.inl. References _sfSpotCutOff, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::SpotLight::makeChunk(). 00166 { 00167 return _sfSpotCutOff.getValue(); 00168 }
|
|
|
Definition at line 172 of file OSGSpotLightBase.inl. References _sfSpotCutOff, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00173 { 00174 return _sfSpotCutOff.getValue(); 00175 }
|
|
|
Definition at line 137 of file OSGSpotLightBase.inl. References _sfDirection, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00138 { 00139 _sfDirection.setValue(value); 00140 }
|
|
|
Definition at line 158 of file OSGSpotLightBase.inl. References _sfSpotExponent, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00159 { 00160 _sfSpotExponent.setValue(value); 00161 }
|
|
|
Definition at line 179 of file OSGSpotLightBase.inl. References _sfSpotCutOff, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00180 { 00181 _sfSpotCutOff.setValue(value); 00182 }
|
|
|
Reimplemented from osg::PointLightBase. Definition at line 214 of file OSGSpotLightBase.cpp. References _sfDirection, _sfSpotCutOff, _sfSpotExponent, DirectionFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::PointLightBase::getBinSize(), osg::FieldBits::NoField, SpotCutOffFieldMask, and SpotExponentFieldMask. 00215 { 00216 UInt32 returnValue = Inherited::getBinSize(whichField); 00217 00218 if(FieldBits::NoField != (DirectionFieldMask & whichField)) 00219 { 00220 returnValue += _sfDirection.getBinSize(); 00221 } 00222 00223 if(FieldBits::NoField != (SpotExponentFieldMask & whichField)) 00224 { 00225 returnValue += _sfSpotExponent.getBinSize(); 00226 } 00227 00228 if(FieldBits::NoField != (SpotCutOffFieldMask & whichField)) 00229 { 00230 returnValue += _sfSpotCutOff.getBinSize(); 00231 } 00232 00233 00234 return returnValue; 00235 }
|
|
||||||||||||
|
Reimplemented from osg::PointLightBase. Definition at line 237 of file OSGSpotLightBase.cpp. References _sfDirection, _sfSpotCutOff, _sfSpotExponent, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::PointLightBase::copyToBin(), DirectionFieldMask, osg::FieldBits::NoField, SpotCutOffFieldMask, and SpotExponentFieldMask. 00239 { 00240 Inherited::copyToBin(pMem, whichField); 00241 00242 if(FieldBits::NoField != (DirectionFieldMask & whichField)) 00243 { 00244 _sfDirection.copyToBin(pMem); 00245 } 00246 00247 if(FieldBits::NoField != (SpotExponentFieldMask & whichField)) 00248 { 00249 _sfSpotExponent.copyToBin(pMem); 00250 } 00251 00252 if(FieldBits::NoField != (SpotCutOffFieldMask & whichField)) 00253 { 00254 _sfSpotCutOff.copyToBin(pMem); 00255 } 00256 00257 00258 }
|
|
||||||||||||
|
Reimplemented from osg::PointLightBase. Definition at line 260 of file OSGSpotLightBase.cpp. References _sfDirection, _sfSpotCutOff, _sfSpotExponent, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::PointLightBase::copyFromBin(), DirectionFieldMask, osg::FieldBits::NoField, SpotCutOffFieldMask, and SpotExponentFieldMask. 00262 { 00263 Inherited::copyFromBin(pMem, whichField); 00264 00265 if(FieldBits::NoField != (DirectionFieldMask & whichField)) 00266 { 00267 _sfDirection.copyFromBin(pMem); 00268 } 00269 00270 if(FieldBits::NoField != (SpotExponentFieldMask & whichField)) 00271 { 00272 _sfSpotExponent.copyFromBin(pMem); 00273 } 00274 00275 if(FieldBits::NoField != (SpotCutOffFieldMask & whichField)) 00276 { 00277 _sfSpotCutOff.copyFromBin(pMem); 00278 } 00279 00280 00281 }
|
|
|
Reimplemented from osg::PointLightBase. Definition at line 72 of file OSGSpotLightBase.inl. References osg::AttachmentContainerPtr::dcast(), getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and shallowCopy(). 00073 { 00074 SpotLightPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = SpotLightPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented from osg::PointLightBase. Definition at line 87 of file OSGSpotLightBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 SpotLightPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Reimplemented from osg::PointLightBase. Definition at line 139 of file OSGSpotLightBase.cpp. References osg::FieldContainer::newPtr(). Referenced by create(). 00140 { 00141 SpotLightPtr returnValue; 00142 00143 newPtr(returnValue, dynamic_cast<const SpotLight *>(this)); 00144 00145 return returnValue; 00146 }
|
|
||||||||||||
|
Definition at line 284 of file OSGSpotLightBase.cpp. References _sfDirection, _sfSpotCutOff, _sfSpotExponent, DirectionFieldMask, osg::PointLightBase::executeSyncImpl(), osg::FieldBits::NoField, SpotCutOffFieldMask, SpotExponentFieldMask, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by executeSync(). 00286 { 00287 00288 Inherited::executeSyncImpl(pOther, whichField); 00289 00290 if(FieldBits::NoField != (DirectionFieldMask & whichField)) 00291 _sfDirection.syncWith(pOther->_sfDirection); 00292 00293 if(FieldBits::NoField != (SpotExponentFieldMask & whichField)) 00294 _sfSpotExponent.syncWith(pOther->_sfSpotExponent); 00295 00296 if(FieldBits::NoField != (SpotCutOffFieldMask & whichField)) 00297 _sfSpotCutOff.syncWith(pOther->_sfSpotCutOff); 00298 00299 00300 }
|
|
||||||||||||
|
Reimplemented from osg::PointLightBase. Definition at line 155 of file OSGSpotLightBase.cpp. References executeSyncImpl(). 00157 { 00158 this->executeSyncImpl((SpotLightBase *) &other, whichField); 00159 }
|
|
|
|
|
||||||||||||||||
|
Definition at line 68 of file OSGPointLight.cpp. References osg::PointLightBase::_sfPosition, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().< |