#include <OSGTransformChunk.h>
Inheritance diagram for osg::TransformChunk:

Sync | |
| *void | executeSyncImpl (TransformChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Public Types | |
| typedef TransformChunkPtr | Ptr |
| enum | { MatrixFieldId = Inherited::NextFieldId, NextFieldId = MatrixFieldId + 1 } |
Public Member Functions | |
Chunk Class Access | |
| *virtual const StateChunkClass * | getClass (void) const |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
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 |
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 |
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 TransformChunkPtr | create (void) |
| create a new instance of the class | |
| static TransformChunkPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Static Public Attributes | |
| static const osg::BitVector | MatrixFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const BitVector | InternalFieldMask = (1 << Attachment::InternalFieldId) |
| static const BitVector | ParentsFieldMask = (1 << Attachment::ParentsFieldId) |
| static const BitVector | NextFieldMask |
Protected Member Functions | |
Constructors | |
| * | TransformChunk (void) |
| TransformChunk (const TransformChunk &source) | |
Destructors | |
| *virtual | ~TransformChunk (void) |
Private Types | |
| typedef TransformChunkBase | Inherited |
Private Member Functions | |
| void | operator= (const TransformChunk &source) |
Static Private Member Functions | |
| static void | initMethod (void) |
Static Private Attributes | |
| static char | cvsid [] |
| static StateChunkClass | _class |
Friends | |
| class | FieldContainer |
| class | TransformChunkBase |
This chunk wraps glMultMatrix() for the GL_MODELVIEW matrix mode.
Definition at line 55 of file OSGTransformChunk.h.
|
|
Reimplemented from osg::TransformChunkBase. Reimplemented in osg::TextureTransformChunk, and osg::TextureTransformChunkBase. Definition at line 138 of file OSGTransformChunk.h. |
|
|
Reimplemented from osg::StateChunkBase. Reimplemented in osg::TextureTransformChunkBase. Definition at line 90 of file OSGTransformChunkBase.h. |
|
|
Reimplemented from osg::Attachment. Definition at line 92 of file OSGTransformChunkBase.h. 00093 { 00094 MatrixFieldId = Inherited::NextFieldId, 00095 NextFieldId = MatrixFieldId + 1 00096 };
|
|
|
Definition at line 91 of file OSGTransformChunk.cpp. 00091 : 00092 Inherited() 00093 { 00094 }
|
|
|
Definition at line 96 of file OSGTransformChunk.cpp. 00096 : 00097 Inherited(source) 00098 { 00099 }
|
|
|
Definition at line 101 of file OSGTransformChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Reimplemented in osg::TextureTransformChunk. Definition at line 107 of file OSGTransformChunk.cpp. References _class. 00108 { 00109 return &_class; 00110 }
|
|
|
Reimplemented from osg::StateChunk. Reimplemented in osg::TextureTransformChunk. Definition at line 47 of file OSGTransformChunk.inl. References osg::StateChunkClass::getId(), and getStaticClass(). 00048 { 00049 return getStaticClass()->getId(); 00050 }
|
|
|
Reimplemented from osg::StateChunk. Reimplemented in osg::TextureTransformChunk. Definition at line 53 of file OSGTransformChunk.inl. References _class. Referenced by getStaticClassId(). 00054 { 00055 return &TransformChunk::_class; 00056 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Reimplemented in osg::TextureTransformChunk. Definition at line 114 of file OSGTransformChunk.cpp. References osg::StateChunk::changed(). Referenced by osg::TextureTransformChunk::changed(). 00115 { 00116 Inherited::changed(whichField, origin); 00117 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Reimplemented in osg::TextureTransformChunk. Definition at line 121 of file OSGTransformChunk.cpp. References SLOG. 00123 { 00124 SLOG << "Dump TransformChunk NI" << std::endl; 00125 }
|
|
||||||||||||
|
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. Reimplemented in osg::TextureTransformChunk. Definition at line 130 of file OSGTransformChunk.cpp. References osg::TransformChunkBase::getMatrix(). 00131 { 00132 glPushMatrix(); 00133 glMultMatrixf( getMatrix().getValues() ); 00134 }
|
|
||||||||||||||||
|
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. Reimplemented in osg::TextureTransformChunk. Definition at line 136 of file OSGTransformChunk.cpp. References osg::TransformChunkBase::getMatrix(). 00137 { 00138 // change from me to me? 00139 // this assumes I haven't changed in the meantime. is that a valid assumption? 00140 if ( old == this ) 00141 return; 00142 00143 glPopMatrix(); 00144 glPushMatrix(); 00145 glMultMatrixf( getMatrix().getValues() ); 00146 }
|
|
||||||||||||
|
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. Reimplemented in osg::TextureTransformChunk. Definition at line 148 of file OSGTransformChunk.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. Reimplemented in osg::TextureTransformChunk. Definition at line 155 of file OSGTransformChunk.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. Reimplemented in osg::TextureTransformChunk. Definition at line 160 of file OSGTransformChunk.cpp.
|
|
|
Compare two chunks. In most cases not implemented yet, will return false. Reimplemented from osg::StateChunk. Reimplemented in osg::TextureTransformChunk. Definition at line 165 of file OSGTransformChunk.cpp. References osg::Eps, osg::TransformationMatrix< ValueTypeT >::equals(), and osg::TransformChunkBase::getMatrix(). 00166 { 00167 TransformChunk const *tother = dynamic_cast<TransformChunk const*>(&other); 00168 00169 if ( !tother ) 00170 return false; 00171 00172 if(tother == this) 00173 return true; 00174 00175 return getMatrix().equals( tother->getMatrix(), Eps ); 00176 }
|
|
|
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. Reimplemented in osg::TextureTransformChunk. Definition at line 178 of file OSGTransformChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Reimplemented in osg::TextureTransformChunk. Definition at line 78 of file OSGTransformChunk.cpp.
|
|
|
|
|
|
Reimplemented from osg::StateChunkBase. Reimplemented in osg::TextureTransformChunkBase. Definition at line 58 of file OSGTransformChunkBase.inl. References osg::TransformChunkBase::_type. Referenced by osg::TransformChunkBase::create(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::StateChunkBase. Reimplemented in osg::TextureTransformChunkBase. Definition at line 65 of file OSGTransformChunkBase.inl. References osg::TransformChunkBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::StateChunkBase. Reimplemented in osg::TextureTransformChunkBase. Definition at line 106 of file OSGTransformChunkBase.cpp. References osg::TransformChunkBase::_type. 00107 { 00108 return _type; 00109 }
|
|
|
Reimplemented from osg::StateChunkBase. Reimplemented in osg::TextureTransformChunkBase. Definition at line 111 of file OSGTransformChunkBase.cpp. References osg::TransformChunkBase::_type. 00112 { 00113 return _type; 00114 }
|
|
|
Reimplemented from osg::StateChunkBase. Reimplemented in osg::TextureTransformChunkBase. Definition at line 126 of file OSGTransformChunkBase.cpp. 00127 { 00128 return sizeof(TransformChunk); 00129 }
|
|
|
Definition at line 101 of file OSGTransformChunkBase.inl. References osg::TransformChunkBase::_sfMatrix. 00102 { 00103 return &_sfMatrix; 00104 }
|
|
|
Definition at line 109 of file OSGTransformChunkBase.inl. References osg::TransformChunkBase::_sfMatrix, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by activate(), osg::TextureTransformChunk::activate(), changeFrom(), osg::TextureTransformChunk::changeFrom(), operator==(), and osg::TextureTransformChunk::operator==(). 00110 { 00111 return _sfMatrix.getValue(); 00112 }
|
|
|
Definition at line 116 of file OSGTransformChunkBase.inl. References osg::TransformChunkBase::_sfMatrix, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00117 { 00118 return _sfMatrix.getValue(); 00119 }
|
|
|
Definition at line 123 of file OSGTransformChunkBase.inl. References osg::TransformChunkBase::_sfMatrix, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Reimplemented from osg::StateChunkBase. Reimplemented in osg::TextureTransformChunkBase. Definition at line 188 of file OSGTransformChunkBase.cpp. References osg::TransformChunkBase::_sfMatrix, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::StateChunkBase::getBinSize(), osg::TransformChunkBase::MatrixFieldMask, and osg::FieldBits::NoField. Referenced by osg::TextureTransformChunkBase::getBinSize(). 00189 { 00190 UInt32 returnValue = Inherited::getBinSize(whichField); 00191 00192 if(FieldBits::NoField != (MatrixFieldMask & whichField)) 00193 { 00194 returnValue += _sfMatrix.getBinSize(); 00195 } 00196 00197 00198 return returnValue; 00199 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunkBase. Reimplemented in osg::TextureTransformChunkBase. Definition at line 201 of file OSGTransformChunkBase.cpp. References osg::TransformChunkBase::_sfMatrix, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::StateChunkBase::copyToBin(), osg::TransformChunkBase::MatrixFieldMask, and osg::FieldBits::NoField. Referenced by osg::TextureTransformChunkBase::copyToBin(). 00203 { 00204 Inherited::copyToBin(pMem, whichField); 00205 00206 if(FieldBits::NoField != (MatrixFieldMask & whichField)) 00207 { 00208 _sfMatrix.copyToBin(pMem); 00209 } 00210 00211 00212 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunkBase. Reimplemented in osg::TextureTransformChunkBase. Definition at line 214 of file OSGTransformChunkBase.cpp. References osg::TransformChunkBase::_sfMatrix, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::StateChunkBase::copyFromBin(), osg::TransformChunkBase::MatrixFieldMask, and osg::FieldBits::NoField. Referenced by osg::TextureTransformChunkBase::copyFromBin(). 00216 { 00217 Inherited::copyFromBin(pMem, whichField); 00218 00219 if(FieldBits::NoField != (MatrixFieldMask & whichField)) 00220 { 00221 _sfMatrix.copyFromBin(pMem); 00222 } 00223 00224 00225 }
|
|
|
Reimplemented from osg::Attachment. Reimplemented in osg::TextureTransformChunkBase. Definition at line 72 of file OSGTransformChunkBase.inl. References osg::AttachmentPtr::dcast(), osg::TransformChunkBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::TransformChunkBase::shallowCopy(). 00073 { 00074 TransformChunkPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = TransformChunkPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented from osg::Attachment. Reimplemented in osg::TextureTransformChunkBase. Definition at line 87 of file OSGTransformChunkBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 TransformChunkPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Reimplemented from osg::Attachment. Reimplemented in osg::TextureTransformChunkBase. Definition at line 117 of file OSGTransformChunkBase.cpp. References osg::FieldContainer::newPtr(). Referenced by osg::TransformChunkBase::create(). 00118 { 00119 TransformChunkPtr returnValue; 00120 00121 newPtr(returnValue, dynamic_cast<const TransformChunk *>(this)); 00122 00123 return returnValue; 00124 }
|
|
||||||||||||
|
Definition at line 228 of file OSGTransformChunkBase.cpp. References osg::TransformChunkBase::_sfMatrix, osg::StateChunkBase::executeSyncImpl(), osg::TransformChunkBase::MatrixFieldMask, osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::TransformChunkBase::executeSync(), and osg::TextureTransformChunkBase::executeSyncImpl(). 00230 { 00231 00232 Inherited::executeSyncImpl(pOther, whichField); 00233 00234 if(FieldBits::NoField != (MatrixFieldMask & whichField)) 00235 _sfMatrix.syncWith(pOther->_sfMatrix); 00236 00237 00238 }
|
|
||||||||||||
|
||||||||||||
|
||||||||||||
|
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. Reimplemented in osg::TextureTransformChunkBase. Definition at line 133 of file OSGTransformChunkBase.cpp. References osg::TransformChunkBase::executeSyncImpl(). 00135 { 00136 this->executeSyncImpl((TransformChunkBase *) &other, whichField); 00137 }
|
|
|
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. |