#include <OSGTwoSidedLightingChunk.h>
Inheritance diagram for osg::TwoSidedLightingChunk:

Public Types | |
| typedef TwoSidedLightingChunkPtr | Ptr |
| enum | { ParentsFieldId = Inherited::NextFieldId, InternalFieldId = ParentsFieldId + 1, NextFieldId = InternalFieldId + 1 } |
Public Member Functions | |
Chunk Class Access | |
| *virtual const StateChunkClass * | getClass (void) const |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
State | |
| *virtual void | activate (DrawActionBase *action, UInt32 index=0) |
| virtual void | changeFrom (DrawActionBase *action, StateChunk *old, UInt32 index=0) |
| virtual void | deactivate (DrawActionBase *action, UInt32 index=0) |
Comparison | |
| *virtual Real32 | switchCost (StateChunk *chunk) |
| virtual bool | operator< (const StateChunk &other) const |
| virtual bool | operator== (const StateChunk &other) const |
| virtual bool | operator!= (const StateChunk &other) const |
Output | |
| *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 |
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 |
Chunk Class Access | |
| *UInt32 | getClassId (void) const |
State | |
| virtual bool | isTransparent (void) const |
Parents | |
| *MFFieldContainerPtr & | getParents (void) |
| const MFFieldContainerPtr & | getParents (void) const |
| MFFieldContainerPtr * | getMFParents (void) |
| void | addParent (FieldContainerPtr parent) |
| void | subParent (FieldContainerPtr parent) |
| Int32 | findParent (FieldContainerPtr parent) |
Parents | |
| *SFBool & | getInternal (void) |
| const SFBool & | getInternal (void) const |
| SFBool * | getSFInternal (void) |
| void | setInternal (bool bVal) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Generic Field Access *Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
Static Public Member Functions | |
Static Chunk Class Access | |
| *static UInt32 | getStaticClassId (void) |
| static const StateChunkClass * | getStaticClass (void) |
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 TwoSidedLightingChunkPtr | create (void) |
| create a new instance of the class | |
| static TwoSidedLightingChunkPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Static Public Attributes | |
| static const osg::BitVector | MTInfluenceMask |
| static const BitVector | InternalFieldMask = (1 << Attachment::InternalFieldId) |
| static const BitVector | ParentsFieldMask = (1 << Attachment::ParentsFieldId) |
| static const BitVector | NextFieldMask |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
Protected Member Functions | |
Constructors | |
| * | TwoSidedLightingChunk (void) |
| TwoSidedLightingChunk (const TwoSidedLightingChunk &source) | |
Destructors | |
| *virtual | ~TwoSidedLightingChunk (void) |
Sync | |
| *void | executeSyncImpl (TwoSidedLightingChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (StateChunkBase *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (Attachment *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
MT Destruction | |
| *virtual void | onDestroy (void) |
MT Edit | |
| template<class FieldTypeT> | |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
Static Protected Member Functions | |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Protected Attributes | |
Fields | |
| *SFBool | _sfInternal |
| MFFieldContainerPtr | _parents |
Member | |
| *UInt32 | _shares |
Static Protected Attributes | |
Type information | |
| *static FieldDescription * | _desc [] |
Private Types | |
| typedef TwoSidedLightingChunkBase | Inherited |
Private Member Functions | |
| void | operator= (const TwoSidedLightingChunk &source) |
Static Private Member Functions | |
| static void | initMethod (void) |
Private Attributes | |
| GLboolean | _state |
Static Private Attributes | |
| static StateChunkClass | _class |
Friends | |
| class | FieldContainer |
| class | TwoSidedLightingChunkBase |
Definition at line 30 of file OSGTwoSidedLightingChunk.h.
|
|
Reimplemented from osg::TwoSidedLightingChunkBase. Definition at line 117 of file OSGTwoSidedLightingChunk.h. |
|
|
Reimplemented from osg::StateChunkBase. Definition at line 89 of file OSGTwoSidedLightingChunkBase.h. |
|
|
Reimplemented from osg::FieldContainer. Definition at line 86 of file OSGAttachmentImpl.h. 00087 { 00088 ParentsFieldId = Inherited::NextFieldId, 00089 InternalFieldId = ParentsFieldId + 1, 00090 NextFieldId = InternalFieldId + 1 00091 };
|
|
|
Definition at line 44 of file OSGTwoSidedLightingChunk.cpp.
|
|
|
Definition at line 50 of file OSGTwoSidedLightingChunk.cpp.
|
|
|
Definition at line 56 of file OSGTwoSidedLightingChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 62 of file OSGTwoSidedLightingChunk.cpp. References _class. 00063 { 00064 return &_class; 00065 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 12 of file OSGTwoSidedLightingChunk.inl. 00013 { 00014 return getStaticClass()->getId(); 00015 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 18 of file OSGTwoSidedLightingChunk.inl. 00019 { 00020 return &TwoSidedLightingChunk::_class; 00021 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Definition at line 69 of file OSGTwoSidedLightingChunk.cpp. References osg::StateChunk::changed(). 00070 { 00071 Inherited::changed(whichField, origin); 00072 }
|
|
||||||||||||
|
Activate the chunk, i.e. set the OpenGl state covered by the chunk which is different from the default state to the given state. Reimplemented from osg::StateChunk. Definition at line 84 of file OSGTwoSidedLightingChunk.cpp. References _state. 00085 { 00086 glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE, &_state); 00087 if(_state == GL_FALSE) 00088 glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); 00089 }
|
|
||||||||||||||||
|
Change from an old chunk of the same type to this chunk. Note that in general no type checking is done, make sure to use this on a legal combination of chunks! Reimplemented from osg::StateChunk. Definition at line 91 of file OSGTwoSidedLightingChunk.cpp. References _state, and FWARNING. 00092 { 00093 TwoSidedLightingChunk *old = dynamic_cast<TwoSidedLightingChunk *>(old_chunk); 00094 00095 if(old == NULL) 00096 { 00097 FWARNING(( "TwoSidedLightingChunk::changeFrom: caught non-TwoSidedLightingChunk!\n")); 00098 return; 00099 } 00100 00101 // TwoSidedLightingChunk didn't change so do nothing. 00102 if(old == this) 00103 return; 00104 00105 _state = old->_state; 00106 00107 if(_state == GL_FALSE) 00108 glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); 00109 }
|
|
||||||||||||
|
Deactivate the chunk, i.e. set the OpenGl state covered by the chunk which is different from the default state to the default state. Reimplemented from osg::StateChunk. Definition at line 111 of file OSGTwoSidedLightingChunk.cpp. References _state, and GLboolean. 00112 { 00113 GLboolean tsl = GL_FALSE; 00114 glGetBooleanv(GL_LIGHT_MODEL_TWO_SIDE, &tsl); 00115 if(_state != tsl) 00116 glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, _state); 00117 }
|
|
|
Calculate how expensive it is to switch from one instance of the chunk class to another. In most cases not implemented yet, will return 0. Reimplemented from osg::StateChunk. Definition at line 122 of file OSGTwoSidedLightingChunk.cpp.
|
|
|
Calculate how expensive it is to switch from one instance of the chunk class to another. In most cases not implemented yet, will return 0. Reimplemented from osg::StateChunk. Definition at line 127 of file OSGTwoSidedLightingChunk.cpp.
|
|
|
Compare two chunks. In most cases not implemented yet, will return false. Reimplemented from osg::StateChunk. Definition at line 132 of file OSGTwoSidedLightingChunk.cpp. 00133 { 00134 TwoSidedLightingChunk const *tother = 00135 dynamic_cast<TwoSidedLightingChunk const*>(&other); 00136 00137 if(!tother) 00138 return false; 00139 00140 if(tother == this) 00141 return true; 00142 00143 return true; 00144 }
|
|
|
Calculate how expensive it is to switch from one instance of the chunk class to another. In most cases not implemented yet, will return 0. Reimplemented from osg::StateChunk. Definition at line 146 of file OSGTwoSidedLightingChunk.cpp.
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Definition at line 76 of file OSGTwoSidedLightingChunk.cpp. References SLOG. 00078 { 00079 SLOG << "Dump TwoSidedLightingChunk NI" << std::endl; 00080 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 32 of file OSGTwoSidedLightingChunk.cpp.
|
|
|
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 58 of file OSGTwoSidedLightingChunkBase.inl. References osg::TwoSidedLightingChunkBase::_type. Referenced by osg::TwoSidedLightingChunkBase::create(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 65 of file OSGTwoSidedLightingChunkBase.inl. References osg::TwoSidedLightingChunkBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 86 of file OSGTwoSidedLightingChunkBase.cpp. References osg::TwoSidedLightingChunkBase::_type. 00087 { 00088 return _type; 00089 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 91 of file OSGTwoSidedLightingChunkBase.cpp. References osg::TwoSidedLightingChunkBase::_type. 00092 { 00093 return _type; 00094 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 106 of file OSGTwoSidedLightingChunkBase.cpp. 00107 { 00108 return sizeof(TwoSidedLightingChunk); 00109 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 166 of file OSGTwoSidedLightingChunkBase.cpp. References osg::StateChunkBase::getBinSize(). 00167 { 00168 UInt32 returnValue = Inherited::getBinSize(whichField); 00169 00170 00171 return returnValue; 00172 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunkBase. Definition at line 174 of file OSGTwoSidedLightingChunkBase.cpp. References osg::StateChunkBase::copyToBin(). 00176 { 00177 Inherited::copyToBin(pMem, whichField); 00178 00179 00180 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunkBase. Definition at line 182 of file OSGTwoSidedLightingChunkBase.cpp. References osg::StateChunkBase::copyFromBin(). 00184 { 00185 Inherited::copyFromBin(pMem, whichField); 00186 00187 00188 }
|
|
|
Reimplemented from osg::Attachment. Definition at line 72 of file OSGTwoSidedLightingChunkBase.inl. References osg::AttachmentPtr::dcast(), osg::TwoSidedLightingChunkBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::TwoSidedLightingChunkBase::shallowCopy(). 00073 { 00074 TwoSidedLightingChunkPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = TwoSidedLightingChunkPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented from osg::Attachment. Definition at line 87 of file OSGTwoSidedLightingChunkBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 TwoSidedLightingChunkPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Reimplemented from osg::Attachment. Definition at line 97 of file OSGTwoSidedLightingChunkBase.cpp. References osg::FieldContainer::newPtr(). Referenced by osg::TwoSidedLightingChunkBase::create(). 00098 { 00099 TwoSidedLightingChunkPtr returnValue; 00100 00101 newPtr(returnValue, dynamic_cast<const TwoSidedLightingChunk *>(this)); 00102 00103 return returnValue; 00104 }
|
|
||||||||||||
|
Definition at line 191 of file OSGTwoSidedLightingChunkBase.cpp. References osg::StateChunkBase::executeSyncImpl(). Referenced by osg::TwoSidedLightingChunkBase::executeSync(). 00193 { 00194 00195 Inherited::executeSyncImpl(pOther, whichField); 00196 00197 00198 }
|
|
||||||||||||
|
||||||||||||
|
||||||||||||
|
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::StateChunkBase. Definition at line 113 of file OSGTwoSidedLightingChunkBase.cpp. References osg::TwoSidedLightingChunkBase::executeSyncImpl(). 00115 { 00116 this->executeSyncImpl((TwoSidedLightingChunkBase *) &other, whichField); 00117 }
|
|
|
Definition at line 48 of file OSGStateChunk.inl. References osg::StateChunk::getClass(), and osg::StateChunkClass::getId(). 00049 { 00050 return getClass()->getId(); 00051 }
|
|
|
Check if the chunk is transparent, i.e. needs to be rendered after the opaque objects. Reimplemented in osg::BlendChunk, osg::MaterialChunk, osg::PointChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, and osg::TextureChunk. Definition at line 275 of file OSGStateChunk.cpp.
|
|
|
Definition at line 95 of file OSGAttachment.cpp. 00096 { 00097 return _parents; 00098 }
|
|
|
Definition at line 100 of file OSGAttachment.cpp. References osg::Attachment::_parents. 00101 { 00102 return _parents; 00103 }
|
|
|
Definition at line 105 of file OSGAttachment.cpp. References osg::Attachment::_parents. Referenced by osg::DVRLookupTable::changed(). 00106 { 00107 return &_parents; 00108 }
|
|
|
Definition at line 110 of file OSGAttachment.cpp. References osg::Attachment::_parents, and osg::MField< FieldTypeT, fieldNameSpace >::push_back().
|
|
|
Definition at line 115 of file OSGAttachment.cpp. References osg::Attachment::_parents, osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::MField< FieldTypeT, fieldNameSpace >::erase(), and osg::MField< FieldTypeT, fieldNameSpace >::find(). 00116 { 00117 MFFieldContainerPtr::iterator parentIt = _parents.find(parent); 00118 00119 if(parentIt != _parents.end()) 00120 { 00121 _parents.erase(parentIt); 00122 } 00123 }
|
|
|
Definition at line 125 of file OSGAttachment.cpp. References osg::Attachment::_parents, osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::MField< FieldTypeT, fieldNameSpace >::end(), and osg::MField< FieldTypeT, fieldNameSpace >::find(). 00126 { 00127 MFFieldContainerPtr::iterator parentIt = _parents.find(parent); 00128 00129 if(parentIt != _parents.end()) 00130 { 00131 return parentIt - _parents.begin(); 00132 } 00133 else 00134 { 00135 return -1; 00136 } 00137 }
|
|
|
Definition at line 142 of file OSGAttachment.cpp. References osg::Attachment::_sfInternal. 00143 { 00144 return _sfInternal; 00145 }
|
|
|
Definition at line 147 of file OSGAttachment.cpp. References osg::Attachment::_sfInternal. 00148 { 00149 return _sfInternal; 00150 }
|
|
|
Definition at line 152 of file OSGAttachment.cpp. References osg::Attachment::_sfInternal. 00153 { 00154 return &_sfInternal; 00155 }
|