#include <OSGTransform.h>
Inheritance diagram for osg::Transform:

Public Types | |
| typedef TransformPtr | Ptr |
| enum | { MatrixFieldId = Inherited::NextFieldId, NextFieldId = MatrixFieldId + 1 } |
Public Member Functions | |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Helper | |
| *virtual void | accumulateMatrix (Matrix &result) |
| void | adjustVolume (Volume &volume) |
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 | |
| *SFMatrix * | getSFMatrix (void) |
| Get the Transform::_sfMatrix field. | |
| Matrix & | getMatrix (void) |
| Get the value of the Transform::_sfMatrix field. | |
| const Matrix & | getMatrix (void) const |
| Get the value of the Transform::_sfMatrix field. | |
Field Set | |
| *void | setMatrix (const Matrix &value) |
| Set the value of the Transform::_sfMatrix 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 TransformPtr | create (void) |
| create a new instance of the class | |
| static TransformPtr | 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 | ParentsFieldMask = (1 << NodeCore::ParentsFieldId ) |
| static const BitVector | AttachmentsFieldMask |
| static const BitVector | NextFieldMask |
Protected Types | |
| typedef TransformBase | Inherited |
Protected Member Functions | |
Constructors | |
| * | Transform (void) |
| Transform (const Transform &source) | |
Destructors | |
| *virtual | ~Transform (void) |
Draw & Intersect & Render | |
| *Action::ResultE | drawEnter (Action *action) |
| Action::ResultE | drawLeave (Action *action) |
| Action::ResultE | intersectEnter (Action *action) |
| Action::ResultE | intersectLeave (Action *action) |
| NewActionTypes::ResultE | intersectEnter (ActorBase::FunctorArgumentType &funcArg) |
| NewActionTypes::ResultE | intersectLeave (ActorBase::FunctorArgumentType &funcArg) |
| Action::ResultE | renderEnter (Action *action) |
| Action::ResultE | renderLeave (Action *action) |
Sync | |
| *void | executeSyncImpl (TransformBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (GroupBase *pOther, const BitVector &whichField) |
Action Callbacks | |
| Action::ResultE | intersect (Action *action) |
Protected Attributes | |
Fields | |
| *SFMatrix | _sfMatrix |
Private Member Functions | |
| void | operator= (const Transform &source) |
| prohibit default function (move to 'public' if needed) | |
Static Private Member Functions | |
Init | |
| *static void | initMethod (void) |
Friends | |
| class | FieldContainer |
| class | TransformBase |
Definition at line 58 of file OSGTransform.h.
|
|
Reimplemented from osg::TransformBase. Reimplemented in osg::ComponentTransform, and osg::ComponentTransformBase. Definition at line 91 of file OSGTransform.h. |
|
|
Reimplemented from osg::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 90 of file OSGTransformBase.h. |
|
|
Reimplemented from osg::NodeCore. Definition at line 92 of file OSGTransformBase.h. 00093 { 00094 MatrixFieldId = Inherited::NextFieldId, 00095 NextFieldId = MatrixFieldId + 1 00096 };
|
|
|
Definition at line 101 of file OSGTransform.cpp. 00101 : 00102 Inherited() 00103 { 00104 }
|
|
|
Definition at line 106 of file OSGTransform.cpp. 00106 : 00107 Inherited(source) 00108 { 00109 }
|
|
|
Definition at line 114 of file OSGTransform.cpp.
|
|
||||||||||||
|
Reimplemented from osg::Group. Reimplemented in osg::ComponentTransform. Definition at line 66 of file OSGTransform.cpp. References osg::Group::changed(), osg::NodeCore::invalidateVolume(), and osg::TransformBase::MatrixFieldMask. Referenced by osg::ComponentTransform::changed(). 00067 { 00068 if(whichField & MatrixFieldMask) 00069 { 00070 invalidateVolume(); 00071 } 00072 00073 Inherited::changed(whichField, origin); 00074 }
|
|
|
Reimplemented from osg::NodeCore. Definition at line 79 of file OSGTransform.cpp. References osg::TransformBase::getMatrix(), and osg::TransformationMatrix< ValueTypeT >::mult().
|
|
|
Reimplemented from osg::NodeCore. Definition at line 84 of file OSGTransform.cpp. References osg::TransformBase::_sfMatrix, osg::SField< FieldTypeT, fieldNameSpace >::getValue(), and osg::Volume::transform().
|
|
||||||||||||
|
Reimplemented from osg::Group. Reimplemented in osg::ComponentTransform. Definition at line 92 of file OSGTransform.cpp. References osg::Group::dump(). Referenced by osg::ComponentTransform::dump(). 00094 { 00095 Inherited::dump(uiIndent, bvFlags); 00096 }
|
|
|
Reimplemented from osg::Group. Definition at line 122 of file OSGTransform.cpp. References osg::Action::Continue, osg::TransformBase::getMatrix(), and osg::DrawActionBase::selectVisibles(). Referenced by initMethod(), and osg::ComponentTransform::initMethod(). 00123 { 00124 DrawAction *da = dynamic_cast<DrawAction *>(action); 00125 00126 // should use the chunk, but it's not updated yet 00127 glPushMatrix (); 00128 glMultMatrixf(getMatrix().getValues()); 00129 00130 da->selectVisibles(); 00131 00132 return Action::Continue; 00133 }
|
|
|
Reimplemented from osg::Group. Definition at line 135 of file OSGTransform.cpp. References osg::Action::Continue. Referenced by initMethod(), and osg::ComponentTransform::initMethod(). 00136 { 00137 glPopMatrix(); 00138 00139 return Action::Continue; 00140 }
|
|
|
|
Definition at line 164 of file OSGTransform.cpp. References osg::Action::Continue, osg::Line::getDirection(), osg::IntersectAction::getLine(), osg::TransformBase::getMatrix(), osg::IntersectAction::getMaxDist(), osg::Line::getPosition(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::length(), osg::TransformationMatrix< ValueTypeT >::multFullMatrixPnt(), osg::TransformationMatrix< ValueTypeT >::multMatrixVec(), osg::IntersectAction::scale(), and osg::IntersectAction::setLine(). Referenced by initMethod(), and osg::ComponentTransform::initMethod(). 00165 { 00166 IntersectAction *ia = dynamic_cast<IntersectAction *>(action); 00167 Matrix m = this->getMatrix(); 00168 00169 Pnt3f pos; 00170 Vec3f dir; 00171 00172 m.multFullMatrixPnt(ia->getLine().getPosition (), pos); 00173 m.multMatrixVec (ia->getLine().getDirection(), dir); 00174 00175 ia->setLine(Line(pos, dir), ia->getMaxDist()); 00176 ia->scale(dir.length()); 00177 00178 return Action::Continue; 00179 }
|
|
|
Definition at line 182 of file OSGTransform.cpp. References osg::NewActionTypes::Continue, osg::NewActionTypes::FunctorArgumentType::getActor(), osg::TransformBase::getMatrix(), osg::TransformationMatrix< ValueTypeT >::invert(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::length(), osg::TransformationMatrix< ValueTypeT >::multFullMatrixPnt(), osg::TransformationMatrix< ValueTypeT >::multMatrixVec(), and osg::Line::setValue(). 00183 { 00184 IntersectActor *pIA = dynamic_cast<IntersectActor *>(funcArg.getActor()); 00185 Matrix matrix = this->getMatrix(); 00186 Line transLine; 00187 Pnt3f pos; 00188 Vec3f dir; 00189 00190 matrix.invert(); 00191 00192 matrix.multFullMatrixPnt(pIA->getRay().getPosition (), pos); 00193 matrix.multMatrixVec (pIA->getRay().getDirection(), dir); 00194 00195 transLine.setValue(pos, dir); 00196 00197 pIA->beginEditState(); 00198 { 00199 pIA->setRay (transLine ); 00200 pIA->setScaleFactor(pIA->getScaleFactor() / dir.length()); 00201 } 00202 pIA->endEditState (); 00203 00204 pIA->setupChildrenPriorities(); 00205 00206 return NewActionTypes::Continue; 00207 }
|
|
|
Definition at line 210 of file OSGTransform.cpp. References osg::NewActionTypes::Continue, osg::NewActionTypes::FunctorArgumentType::getActor(), osg::TransformBase::getMatrix(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::length(), osg::TransformationMatrix< ValueTypeT >::multFullMatrixPnt(), and osg::TransformationMatrix< ValueTypeT >::multMatrixVec(). 00211 { 00212 IntersectActor *pIA = dynamic_cast<IntersectActor *>(funcArg.getActor()); 00213 const Matrix &matrix = this->getMatrix(); 00214 Pnt3f pos; 00215 Vec3f dir; 00216 00217 matrix.multFullMatrixPnt(pIA->getRay().getPosition (), pos); 00218 matrix.multMatrixVec (pIA->getRay().getDirection(), dir); 00219 00220 pIA->beginEditState(); 00221 { 00222 pIA->setRay (Line(pos, dir) ); 00223 pIA->setScaleFactor(pIA->getScaleFactor() / dir.length()); 00224 } 00225 pIA->endEditState (); 00226 00227 return NewActionTypes::Continue; 00228 }
|
|
|
Reimplemented from osg::Group. Definition at line 233 of file OSGTransform.cpp. References osg::Action::Continue, osg::RenderAction::push_matrix(), and osg::RenderAction::pushVisibility(). Referenced by initMethod(), and osg::ComponentTransform::initMethod(). 00234 { 00235 RenderAction *pAction = dynamic_cast<RenderAction *>(action); 00236 00237 pAction->pushVisibility(); 00238 00239 pAction->push_matrix(this->getMatrix()); 00240 00241 return Action::Continue; 00242 }
|
|
|
Reimplemented from osg::Group. Definition at line 244 of file OSGTransform.cpp. References osg::Action::Continue, osg::RenderAction::pop_matrix(), and osg::RenderAction::popVisibility(). Referenced by initMethod(), and osg::ComponentTransform::initMethod(). 00245 { 00246 RenderAction *pAction = dynamic_cast<RenderAction *>(action); 00247 00248 pAction->popVisibility(); 00249 00250 pAction->pop_matrix(); 00251 00252 return Action::Continue; 00253 }
|
|
|
|
|
|
|
Reimplemented from osg::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 58 of file OSGTransformBase.inl. References osg::TransformBase::_type. Referenced by osg::TransformBase::create(), osg::VRMLWriteAction::initializeAction(), initMethod(), osg::SplitGraphOp::isGroup(), osg::MergeGraphOp::isGroup(), and osg::MergeGraphOp::processTransformations(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 65 of file OSGTransformBase.inl. References osg::TransformBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 106 of file OSGTransformBase.cpp. References osg::TransformBase::_type. 00107 { 00108 return _type; 00109 }
|
|
|
Reimplemented from osg::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 111 of file OSGTransformBase.cpp. References osg::TransformBase::_type. 00112 { 00113 return _type; 00114 }
|
|
|
Reimplemented from osg::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 126 of file OSGTransformBase.cpp. 00127 { 00128 return sizeof(Transform); 00129 }
|
|
|
Definition at line 101 of file OSGTransformBase.inl. References osg::TransformBase::_sfMatrix. 00102 { 00103 return &_sfMatrix; 00104 }
|
|
|
Definition at line 109 of file OSGTransformBase.inl. References osg::TransformBase::_sfMatrix, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by accumulateMatrix(), osg::ComponentTransform::changed(), drawEnter(), intersectEnter(), and intersectLeave(). 00110 { 00111 return _sfMatrix.getValue(); 00112 }
|
|
|
Definition at line 116 of file OSGTransformBase.inl. References osg::TransformBase::_sfMatrix, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00117 { 00118 return _sfMatrix.getValue(); 00119 }
|
|
|
Reimplemented in osg::ComponentTransform. Definition at line 123 of file OSGTransformBase.inl. References osg::TransformBase::_sfMatrix, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Reimplemented from osg::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 188 of file OSGTransformBase.cpp. References osg::TransformBase::_sfMatrix, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::GroupBase::getBinSize(), osg::TransformBase::MatrixFieldMask, and osg::FieldBits::NoField. Referenced by osg::ComponentTransformBase::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::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 201 of file OSGTransformBase.cpp. References osg::TransformBase::_sfMatrix, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::GroupBase::copyToBin(), osg::TransformBase::MatrixFieldMask, and osg::FieldBits::NoField. Referenced by osg::ComponentTransformBase::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::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 214 of file OSGTransformBase.cpp. References osg::TransformBase::_sfMatrix, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::GroupBase::copyFromBin(), osg::TransformBase::MatrixFieldMask, and osg::FieldBits::NoField. Referenced by osg::ComponentTransformBase::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::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 72 of file OSGTransformBase.inl. References osg::AttachmentContainerPtr::dcast(), osg::TransformBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::TransformBase::shallowCopy(). Referenced by osg::SimpleSceneManager::initialize(). 00073 { 00074 TransformPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = TransformPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented from osg::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 87 of file OSGTransformBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 TransformPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Reimplemented from osg::GroupBase. Reimplemented in osg::ComponentTransformBase. Definition at line 117 of file OSGTransformBase.cpp. References osg::FieldContainer::newPtr(). Referenced by osg::TransformBase::create(). 00118 { 00119 TransformPtr returnValue; 00120 00121 newPtr(returnValue, dynamic_cast<const Transform *>(this)); 00122 00123 return returnValue; 00124 }
|
|
||||||||||||
|
Definition at line 228 of file OSGTransformBase.cpp. References osg::TransformBase::_sfMatrix, osg::GroupBase::executeSyncImpl(), osg::TransformBase::MatrixFieldMask, osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::TransformBase::executeSync(), and osg::ComponentTransformBase::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 191 of file OSGGroupBase.cpp. References osg::NodeCore::executeSyncImpl(). Referenced by osg::GroupBase::executeSync(), osg::TransformBase::executeSyncImpl(), osg::SwitchBase::executeSyncImpl(), osg::ProxyGroupBase::executeSyncImpl(), osg::MaterialPoolBase::executeSyncImpl(), osg::MaterialGroupBase::executeSyncImpl(), osg::InverseTransformBase::executeSyncImpl(), osg::DistanceLODBase::executeSyncImpl(), and osg::BillboardBase::executeSyncImpl(). 00193 { 00194 00195 Inherited::executeSyncImpl(pOther, whichField); 00196 00197 00198 }
|
|
||||||||||||
|
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 }
|
|
||||||||||||
|