#include <OSGInverseTransform.h>
Inheritance diagram for osg::InverseTransform:

Public Types | |
| typedef InverseTransformPtr | Ptr |
| enum | { ParentsFieldId = Inherited::NextFieldId, NextFieldId = ParentsFieldId + 1 } |
Public Member Functions | |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
calc the inverse matrix | |
| *void | initMatrix (const Matrix &mToWorld) |
| void | calcMatrix (DrawActionBase *pAction, const Matrix &mToWorld, Matrix &mResult) |
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 |
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 InverseTransformPtr | create (void) |
| create a new instance of the class | |
| static InverseTransformPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Static Public Attributes | |
| static const osg::BitVector | MTInfluenceMask |
| static const BitVector | ParentsFieldMask = (1 << NodeCore::ParentsFieldId ) |
| static const BitVector | AttachmentsFieldMask |
| static const BitVector | NextFieldMask |
CoredNodePtr helper | |
| *static const bool | isNodeCore = true |
Protected Member Functions | |
Constructors | |
| * | InverseTransform (void) |
| InverseTransform (const InverseTransform &source) | |
Destructors | |
| *virtual | ~InverseTransform (void) |
NodeCore Specific | |
| *void | adjustVolume (Volume &volume) |
| virtual void | accumulateMatrix (Matrix &result) |
Draw & Intersect & Render | |
| *Action::ResultE | drawEnter (Action *action) |
| Action::ResultE | drawLeave (Action *action) |
| Action::ResultE | intersectEnter (Action *action) |
| Action::ResultE | intersectLeave (Action *action) |
| Action::ResultE | renderEnter (Action *action) |
| Action::ResultE | renderLeave (Action *action) |
Sync | |
| *void | executeSyncImpl (InverseTransformBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (GroupBase *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (NodeCore *pOther, const BitVector &whichField) |
Action Callbacks | |
| Action::ResultE | intersect (Action *action) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Set / Get Parents | |
| *void | addParent (const NodePtr &parent) |
| void | subParent (const NodePtr &parent) |
Pointer | |
| *NodeCorePtr | getPtr (void) const |
Protected Attributes | |
Fields | |
| *MFNodePtr | _parents |
Static Protected Attributes | |
Type information | |
| *static FieldDescription * | _desc [] |
Private Types | |
| typedef InverseTransformBase | Inherited |
Private Member Functions | |
| void | operator= (const InverseTransform &source) |
Static Private Member Functions | |
| static void | initMethod (void) |
Private Attributes | |
| Matrix | _invWorld |
Friends | |
| class | FieldContainer |
| class | InverseTransformBase |
Definition at line 59 of file OSGInverseTransform.h.
|
|
Reimplemented from osg::InverseTransformBase. Definition at line 63 of file OSGInverseTransform.h. |
|
|
Reimplemented from osg::GroupBase. Definition at line 89 of file OSGInverseTransformBase.h. |
|
|
Reimplemented from osg::AttachmentContainer. Definition at line 87 of file OSGNodeCore.h. 00088 { 00089 ParentsFieldId = Inherited::NextFieldId, 00090 NextFieldId = ParentsFieldId + 1 00091 };
|
|
|
Definition at line 138 of file OSGInverseTransform.cpp.
|
|
|
Definition at line 144 of file OSGInverseTransform.cpp.
|
|
|
Definition at line 150 of file OSGInverseTransform.cpp.
|
|
||||||||||||
|
Reimplemented from osg::Group. Definition at line 156 of file OSGInverseTransform.cpp. References osg::Group::changed(). 00157 { 00158 Inherited::changed(whichField, origin); 00159 }
|
|
|
Definition at line 190 of file OSGInverseTransform.cpp. References _invWorld, and osg::TransformationMatrix< ValueTypeT >::invertFrom(). 00191 { 00192 _invWorld.invertFrom(mToWorld); 00193 }
|
|
||||||||||||||||
|
Definition at line 181 of file OSGInverseTransform.cpp. References _invWorld, and osg::TransformationMatrix< ValueTypeT >::invertFrom(). Referenced by drawEnter(), and renderEnter(). 00184 { 00185 mResult.invertFrom(mToWorld); 00186 00187 _invWorld = mResult; // remember dynamically set matrix field 00188 }
|
|
||||||||||||
|
Reimplemented from osg::Group. Definition at line 161 of file OSGInverseTransform.cpp. References osg::Group::dump(). 00163 { 00164 Inherited::dump(uiIndent, bvFlags); 00165 }
|
|
|
Reimplemented from osg::NodeCore. Definition at line 169 of file OSGInverseTransform.cpp. References _invWorld, and osg::Volume::transform().
|
|
|
Reimplemented from osg::NodeCore. Definition at line 174 of file OSGInverseTransform.cpp. References _invWorld, and osg::TransformationMatrix< ValueTypeT >::mult().
|
|
|
Reimplemented from osg::Group. Definition at line 198 of file OSGInverseTransform.cpp. References calcMatrix(), osg::Action::Continue, osg::Action::getActNode(), and osg::TransformationMatrix< ValueTypeT >::getValues(). Referenced by initMethod(). 00199 { 00200 DrawAction *da = dynamic_cast<DrawAction *>(action); 00201 Matrix mMat; 00202 00203 calcMatrix(da, da->getActNode()->getToWorld(), mMat); 00204 00205 // should use the chunk, but it's not updated yet 00206 glPushMatrix (); 00207 glMultMatrixf(mMat.getValues()); 00208 00209 return Action::Continue; 00210 }
|
|
|
Reimplemented from osg::Group. Definition at line 212 of file OSGInverseTransform.cpp. References osg::Action::Continue. Referenced by initMethod(). 00213 { 00214 glPopMatrix(); 00215 00216 return Action::Continue; 00217 }
|
|
|
Definition at line 222 of file OSGInverseTransform.cpp. References _invWorld, osg::Action::Continue, osg::Line::getDirection(), osg::IntersectAction::getLine(), osg::IntersectAction::getMaxDist(), osg::Line::getPosition(), osg::TransformationMatrix< ValueTypeT >::invert(), osg::VectorInterface< ValueTypeT, StorageInterfaceT >::length(), osg::TransformationMatrix< ValueTypeT >::multFullMatrixPnt(), osg::TransformationMatrix< ValueTypeT >::multMatrixVec(), osg::IntersectAction::scale(), and osg::IntersectAction::setLine(). Referenced by initMethod(). 00223 { 00224 IntersectAction *ia = dynamic_cast<IntersectAction *>(action); 00225 Matrix m(_invWorld); 00226 00227 m.invert(); 00228 00229 Pnt3f pos; 00230 Vec3f dir; 00231 00232 m.multFullMatrixPnt(ia->getLine().getPosition (), pos); 00233 m.multMatrixVec (ia->getLine().getDirection(), dir); 00234 00235 ia->setLine(Line(pos, dir), ia->getMaxDist()); 00236 ia->scale(dir.length()); 00237 00238 return Action::Continue; 00239 }
|
|
|
Definition at line 241 of file OSGInverseTransform.cpp. References _invWorld, osg::Action::Continue, osg::Line::getDirection(), osg::IntersectAction::getLine(), 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(). 00242 { 00243 IntersectAction *ia = dynamic_cast<IntersectAction *>(action); 00244 Matrix m(_invWorld); 00245 00246 Pnt3f pos; 00247 Vec3f dir; 00248 00249 m.multFullMatrixPnt(ia->getLine().getPosition (), pos); 00250 m.multMatrixVec (ia->getLine().getDirection(), dir); 00251 00252 ia->setLine(Line(pos, dir), ia->getMaxDist()); 00253 ia->scale(dir.length()); 00254 00255 return Action::Continue; 00256 }
|
|
|
Reimplemented from osg::Group. Definition at line 261 of file OSGInverseTransform.cpp. References calcMatrix(), osg::Action::Continue, osg::RenderAction::push_matrix(), and osg::RenderAction::top_matrix(). Referenced by initMethod(). 00262 { 00263 RenderAction *pAction = dynamic_cast<RenderAction *>(action); 00264 Matrix mMat; // will be set to World^-1 00265 00266 calcMatrix(pAction, pAction->top_matrix(), mMat); 00267 00268 pAction->push_matrix(mMat); 00269 00270 return Action::Continue; 00271 }
|
|
|
Reimplemented from osg::Group. Definition at line 273 of file OSGInverseTransform.cpp. References osg::Action::Continue, and osg::RenderAction::pop_matrix(). Referenced by initMethod(). 00274 { 00275 RenderAction *pAction = dynamic_cast<RenderAction *>(action); 00276 00277 pAction->pop_matrix(); 00278 00279 return Action::Continue; 00280 }
|
|
|
|
|
|
|
Reimplemented from osg::GroupBase. Definition at line 58 of file OSGInverseTransformBase.inl. References osg::InverseTransformBase::_type. Referenced by osg::InverseTransformBase::create(), and initMethod(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 65 of file OSGInverseTransformBase.inl. References osg::InverseTransformBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 86 of file OSGInverseTransformBase.cpp. References osg::InverseTransformBase::_type. 00087 { 00088 return _type; 00089 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 91 of file OSGInverseTransformBase.cpp. References osg::InverseTransformBase::_type. 00092 { 00093 return _type; 00094 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 106 of file OSGInverseTransformBase.cpp. 00107 { 00108 return sizeof(InverseTransform); 00109 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 166 of file OSGInverseTransformBase.cpp. References osg::GroupBase::getBinSize(). 00167 { 00168 UInt32 returnValue = Inherited::getBinSize(whichField); 00169 00170 00171 return returnValue; 00172 }
|
|
||||||||||||
|
Reimplemented from osg::GroupBase. Definition at line 174 of file OSGInverseTransformBase.cpp. References osg::GroupBase::copyToBin(). 00176 { 00177 Inherited::copyToBin(pMem, whichField); 00178 00179 00180 }
|
|
||||||||||||
|
Reimplemented from osg::GroupBase. Definition at line 182 of file OSGInverseTransformBase.cpp. References osg::GroupBase::copyFromBin(). 00184 { 00185 Inherited::copyFromBin(pMem, whichField); 00186 00187 00188 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 72 of file OSGInverseTransformBase.inl. References osg::AttachmentContainerPtr::dcast(), osg::InverseTransformBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::InverseTransformBase::shallowCopy(). 00073 { 00074 InverseTransformPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = InverseTransformPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 87 of file OSGInverseTransformBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 InverseTransformPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 97 of file OSGInverseTransformBase.cpp. References osg::FieldContainer::newPtr(). Referenced by osg::InverseTransformBase::create(). 00098 { 00099 InverseTransformPtr returnValue; 00100 00101 newPtr(returnValue, dynamic_cast<const InverseTransform *>(this)); 00102 00103 return returnValue; 00104 }
|
|
||||||||||||
|
Definition at line 191 of file OSGInverseTransformBase.cpp. References osg::GroupBase::executeSyncImpl(). Referenced by osg::InverseTransformBase::executeSync(). 00193 { 00194 00195 Inherited::executeSyncImpl(pOther, whichField); 00196 00197 00198 }
|
|
||||||||||||
|
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 }
|
|
||||||||||||
|
||||||||||||
|
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::GroupBase. Definition at line 113 of file OSGInverseTransformBase.cpp. References osg::InverseTransformBase::executeSyncImpl(). 00115 { 00116 this->executeSyncImpl((InverseTransformBase *) &other, whichField); 00117 }
|
|
|
Reimplemented in osg::Switch. Definition at line 139 of file OSGGroup.cpp. References osg::Action::Continue, osg::Action::getActNode(), osg::IntersectAction::getLine(), osg::DynamicVolume::intersect(), osg::Volume::isValid(), and osg::Action::Skip. Referenced by osg::Group::initMethod(). 00140 { 00141 IntersectAction *ia = dynamic_cast<IntersectAction *>(action); 00142 const DynamicVolume &dv = ia->getActNode()->getVolume(); 00143 00144 if(dv.isValid() && ! dv.intersect(ia->getLine())) 00145 { 00146 return Action::Skip; //bv missed -> can not hit children 00147 } 00148 00149 return Action::Continue; 00150 }
|
|
|
Definition at line 56 of file OSGNodeCore.inl. Referenced by osg::Surface::FindClosestPoint(). 00057 { 00058 return _parents; 00059 }
|
|
|
Definition at line 62 of file OSGNodeCore.inl. References osg::NodeCore::_parents. 00063 { 00064 return _parents; 00065 }
|
|
|
Definition at line 68 of file OSGNodeCore.inl. References osg::NodeCore::_parents. 00069 { 00070 return &_parents; 00071 }
|
|
|
Definition at line 237 of file OSGNodeCore.inl. References osg::NodeCore::_parents, and osg::MField< FieldTypeT, fieldNameSpace >::size(). Referenced by osg::Transform::changed(). 00238 { 00239 for(UInt32 i = 0; i < _parents.size(); i++) 00240 { 00241 _parents[i]->invalidateVolume(); 00242 } 00243 }
|
|
|
Reimplemented from osg::FieldContainer. Reimplemented in osg::MaterialPool. Definition at line 142 of file OSGNodeCore.inl.
|
|
|
Definition at line 150 of file OSGNodeCore.inl. References osg::NodeCore::_parents, and osg::MField< FieldTypeT, fieldNameSpace >::push_back(). 00151 { 00152 _parents.push_back(parent); 00153 }
|
|
|
Definition at line 156 of file OSGNodeCore.inl. References osg::NodeCore::_parents, osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::MField< FieldTypeT, fieldNameSpace >::erase(), and osg::MField< FieldTypeT, fieldNameSpace >::find(). |