#include <OSGSwitch.h>
Inheritance diagram for osg::Switch:

Public Types | |
| typedef SwitchPtr | Ptr |
Enum | |
| enum | { ALL = -2, NONE = -1 } |
Public Member Functions | |
Parents | |
| *MFNodePtr & | getParents (void) |
| const MFNodePtr & | getParents (void) const |
| MFNodePtr * | getMFParents (void) |
Volume | |
| *virtual void | invalidateVolume (void) |
Handle Attachments | |
| *void | addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| void | subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| AttachmentPtr | findAttachment (UInt32 groupId, UInt16 binding=0) |
| AttachmentPtr | findAttachment (const FieldContainerType &type, UInt16 binding=0) |
| Field Access *SFAttachmentMap * | getSFAttachments (void) |
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) |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
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 | |
| *SFInt32 * | getSFChoice (void) |
| Get the Switch::_sfChoice field. | |
| Int32 & | getChoice (void) |
| Get the value of the Switch::_sfChoice field. | |
| const Int32 & | getChoice (void) const |
| Get the value of the Switch::_sfChoice field. | |
Field Set | |
| *void | setChoice (const Int32 &value) |
| Set the value of the Switch::_sfChoice 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 |
Parents | |
| *MFNodePtr & | getParents (void) |
| const MFNodePtr & | getParents (void) const |
| MFNodePtr * | getMFParents (void) |
Volume | |
| *virtual void | invalidateVolume (void) |
Handle Attachments | |
| *void | addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| void | subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| AttachmentPtr | findAttachment (UInt32 groupId, UInt16 binding=0) |
| AttachmentPtr | findAttachment (const FieldContainerType &type, UInt16 binding=0) |
| Field Access *SFAttachmentMap * | getSFAttachments (void) |
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 | |
Get Class Type Information | |
| static UInt16 | getClassGroupId (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 SwitchPtr | create (void) |
| create a new instance of the class | |
| static SwitchPtr | 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 | ChoiceFieldMask |
| 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 |
CoredNodePtr helper | |
| *static const bool | isNodeCore = true |
Protected Types | |
| typedef SwitchBase | Inherited |
Protected Member Functions | |
Sync | |
| void | executeSyncImpl (NodeCore *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (FieldContainer *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 |
Pointer | |
| *AttachmentContainerPtr | getPtr (void) |
Transformation | |
| *virtual void | accumulateMatrix (Matrix &result) |
Volume | |
| *virtual void | adjustVolume (Volume &volume) |
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) |
Constructors | |
| * | Switch (void) |
| Switch (const Switch &source) | |
Destructors | |
| *virtual | ~Switch (void) |
Draw | |
| *Action::ResultE | draw (Action *action) |
Intersect | |
| *Action::ResultE | intersect (Action *action) |
Sync | |
| *void | executeSyncImpl (SwitchBase *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) |
Sync | |
| void | executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
Action Callbacks | |
| *Action::ResultE | drawEnter (Action *action) |
| Action::ResultE | drawLeave (Action *action) |
| Action::ResultE | renderEnter (Action *action) |
| Action::ResultE | renderLeave (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 |
Pointer | |
| *AttachmentContainerPtr | getPtr (void) |
Transformation | |
| *virtual void | accumulateMatrix (Matrix &result) |
Volume | |
| *virtual void | adjustVolume (Volume &volume) |
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) |
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 | |
| *MFNodePtr | _parents |
Fields | |
| *SFAttachmentMap | _attachmentMap |
Member | |
| *UInt32 | _shares |
Fields | |
| *SFInt32 | _sfChoice |
Fields | |
| *MFNodePtr | _parents |
Fields | |
| *SFAttachmentMap | _attachmentMap |
Member | |
| *UInt32 | _shares |
Private Member Functions | |
| void | operator= (const Switch &source) |
| prohibit default function (move to 'public' if needed) | |
Static Private Member Functions | |
Class Specific | |
| *static void | initMethod (void) |
Friends | |
| class | FieldContainer |
| class | SwitchBase |
Definition at line 52 of file OSGSwitch.h.
|
|
Reimplemented from osg::SwitchBase. Definition at line 83 of file OSGSwitch.h. |
|
|
Reimplemented from osg::GroupBase. Definition at line 90 of file OSGSwitchBase.h. |
|
|
Reimplemented from osg::SwitchBase. Definition at line 61 of file OSGSwitch.h.
|
|
|
Definition at line 75 of file OSGSwitch.cpp. 00075 : 00076 Inherited() 00077 { 00078 }
|
|
|
Definition at line 80 of file OSGSwitch.cpp. 00080 : 00081 Inherited(source) 00082 { 00083 }
|
|
|
Definition at line 88 of file OSGSwitch.cpp.
|
|
||||||||||||
|
Reimplemented from osg::Group. Definition at line 58 of file OSGSwitch.cpp. References osg::Group::changed(). 00059 { 00060 Inherited::changed(whichField, origin); 00061 }
|
|
||||||||||||
|
Reimplemented from osg::Group. Definition at line 66 of file OSGSwitch.cpp. References SLOG. 00068 { 00069 SLOG << "Dump Switch NI" << std::endl; 00070 }
|
|
|
Definition at line 95 of file OSGSwitch.cpp. References osg::Action::addNode(), ALL, osg::Action::Continue, osg::SwitchBase::getChoice(), osg::NodePtr::getCPtr(), osg::Action::getNNodes(), osg::Action::getNode(), osg::DrawActionBase::isVisible(), osg::DrawActionBase::selectVisibles(), osg::Action::Skip, and osg::Action::useNodeList(). Referenced by initMethod(). 00096 { 00097 Action::ResultE returnValue = Action::Continue; 00098 00099 DrawActionBase *da = dynamic_cast<DrawActionBase *>(action); 00100 00101 if((getChoice() >= 0 ) && 00102 (UInt32(getChoice()) < action->getNNodes())) 00103 { 00104 da->useNodeList(); 00105 00106 if(da->isVisible(action->getNode(getChoice()).getCPtr())) 00107 { 00108 da->addNode(action->getNode(getChoice())); 00109 } 00110 } 00111 else if(getChoice() == ALL) 00112 { 00113 if(da->selectVisibles() == 0) 00114 returnValue = Action::Skip; 00115 } 00116 else 00117 { 00118 returnValue = Action::Skip; 00119 } 00120 00121 return returnValue; 00122 }
|
|
|
Reimplemented from osg::Group. Definition at line 124 of file OSGSwitch.cpp. References osg::Action::addNode(), ALL, osg::Action::Continue, osg::SwitchBase::getChoice(), osg::Action::getNNodes(), osg::Action::getNode(), and osg::Action::Skip. Referenced by initMethod(). 00125 { 00126 Action::ResultE returnValue = Action::Continue; 00127 00128 IntersectAction *da = dynamic_cast<IntersectAction *>(action); 00129 00130 if((getChoice() >= 0 ) && 00131 (UInt32(getChoice()) < action->getNNodes())) 00132 { 00133 da->addNode(action->getNode(getChoice())); 00134 } 00135 else if(getChoice() == ALL) 00136 { 00137 returnValue = Action::Continue; 00138 } 00139 else 00140 { 00141 returnValue = Action::Skip; 00142 } 00143 00144 return returnValue; 00145 }
|
|
|
Reimplemented from osg::Group. Definition at line 150 of file OSGSwitch.cpp. References draw(), osg::SwitchBase::getClassType(), intersect(), osg::osgTypedMethodFunctor2BaseCPtrRef(), osg::IntersectAction::registerEnterDefault(), osg::RenderAction::registerEnterDefault(), and osg::DrawAction::registerEnterDefault(). 00151 { 00152 DrawAction::registerEnterDefault( 00153 getClassType(), 00154 osgTypedMethodFunctor2BaseCPtrRef<Action::ResultE, 00155 SwitchPtr , 00156 CNodePtr , 00157 Action *>(&Switch::draw)); 00158 00159 RenderAction::registerEnterDefault( 00160 getClassType(), 00161 osgTypedMethodFunctor2BaseCPtrRef<Action::ResultE, 00162 SwitchPtr , 00163 CNodePtr , 00164 Action *>(&Switch::draw)); 00165 00166 IntersectAction::registerEnterDefault( 00167 getClassType(), 00168 osgTypedMethodFunctor2BaseCPtrRef<Action::ResultE, 00169 SwitchPtr , 00170 CNodePtr , 00171 Action *>(&Switch::intersect)); 00172 }
|
|
|
|
|
|
Reimplemented from osg::GroupBase. Definition at line 58 of file OSGSwitchBase.inl. References osg::SwitchBase::_type. Referenced by osg::SwitchBase::create(), initMethod(), osg::SplitGraphOp::isGroup(), and osg::MergeGraphOp::isGroup(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 65 of file OSGSwitchBase.inl. References osg::SwitchBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 106 of file OSGSwitchBase.cpp. References osg::SwitchBase::_type. 00107 { 00108 return _type; 00109 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 111 of file OSGSwitchBase.cpp. References osg::SwitchBase::_type. 00112 { 00113 return _type; 00114 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 126 of file OSGSwitchBase.cpp. 00127 { 00128 return sizeof(Switch); 00129 }
|
|
|
Definition at line 101 of file OSGSwitchBase.inl. References osg::SwitchBase::_sfChoice. 00102 { 00103 return &_sfChoice; 00104 }
|
|
|
Definition at line 109 of file OSGSwitchBase.inl. References osg::SwitchBase::_sfChoice, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by draw(), and intersect(). 00110 { 00111 return _sfChoice.getValue(); 00112 }
|
|
|
Definition at line 116 of file OSGSwitchBase.inl. References osg::SwitchBase::_sfChoice, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00117 { 00118 return _sfChoice.getValue(); 00119 }
|
|
|
Definition at line 123 of file OSGSwitchBase.inl. References osg::SwitchBase::_sfChoice, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Reimplemented from osg::GroupBase. Definition at line 188 of file OSGSwitchBase.cpp. References osg::SwitchBase::_sfChoice, osg::SwitchBase::ChoiceFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::GroupBase::getBinSize(), and osg::FieldBits::NoField. 00189 { 00190 UInt32 returnValue = Inherited::getBinSize(whichField); 00191 00192 if(FieldBits::NoField != (ChoiceFieldMask & whichField)) 00193 { 00194 returnValue += _sfChoice.getBinSize(); 00195 } 00196 00197 00198 return returnValue; 00199 }
|
|
||||||||||||
|
Reimplemented from osg::GroupBase. Definition at line 201 of file OSGSwitchBase.cpp. References osg::SwitchBase::_sfChoice, osg::SwitchBase::ChoiceFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::GroupBase::copyToBin(), and osg::FieldBits::NoField. 00203 { 00204 Inherited::copyToBin(pMem, whichField); 00205 00206 if(FieldBits::NoField != (ChoiceFieldMask & whichField)) 00207 { 00208 _sfChoice.copyToBin(pMem); 00209 } 00210 00211 00212 }
|
|
||||||||||||
|
Reimplemented from osg::GroupBase. Definition at line 214 of file OSGSwitchBase.cpp. References osg::SwitchBase::_sfChoice, osg::SwitchBase::ChoiceFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::GroupBase::copyFromBin(), and osg::FieldBits::NoField. 00216 { 00217 Inherited::copyFromBin(pMem, whichField); 00218 00219 if(FieldBits::NoField != (ChoiceFieldMask & whichField)) 00220 { 00221 _sfChoice.copyFromBin(pMem); 00222 } 00223 00224 00225 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 72 of file OSGSwitchBase.inl. References osg::AttachmentContainerPtr::dcast(), osg::SwitchBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::SwitchBase::shallowCopy(). Referenced by osg::VRMLSwitchDesc::init(). 00073 { 00074 SwitchPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = SwitchPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 87 of file OSGSwitchBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 SwitchPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Reimplemented from osg::GroupBase. Definition at line 117 of file OSGSwitchBase.cpp. References osg::FieldContainer::newPtr(). Referenced by osg::SwitchBase::create(). 00118 { 00119 SwitchPtr returnValue; 00120 00121 newPtr(returnValue, dynamic_cast<const Switch *>(this)); 00122 00123 return returnValue; 00124 }
|
|
||||||||||||
|
Definition at line 228 of file OSGSwitchBase.cpp. References osg::SwitchBase::_sfChoice, osg::SwitchBase::ChoiceFieldMask, osg::GroupBase::executeSyncImpl(), osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::SwitchBase::executeSync(). 00230 { 00231 00232 Inherited::executeSyncImpl(pOther, whichField); 00233 00234 if(FieldBits::NoField != (ChoiceFieldMask & whichField)) 00235 _sfChoice.syncWith(pOther->_sfChoice); 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 }
|
|
||||||||||||
|
||||||||||||
|
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 133 of file OSGSwitchBase.cpp. References osg::SwitchBase::executeSyncImpl(). 00135 { 00136 this->executeSyncImpl((SwitchBase *) &other, whichField); 00137 }
|
|
|
Reimplemented in osg::Billboard, osg::InverseTransform, osg::MaterialGroup, and osg::Transform. Definition at line 100 of file OSGGroup.cpp. References osg::Action::Continue, osg::DrawActionBase::selectVisibles(), and osg::Action::Skip. Referenced by osg::Group::initMethod(). 00101 { 00102 DrawActionBase *da = dynamic_cast<DrawActionBase *>(action); 00103 00104 if(da->selectVisibles() == 0) 00105 return Action::Skip; 00106 00107 return Action::Continue; 00108 }
|
|
|
Reimplemented in osg::Billboard, osg::InverseTransform, osg::MaterialGroup, and osg::Transform. Definition at line 110 of file OSGGroup.cpp. References osg::Action::Continue. Referenced by osg::Group::initMethod(). 00111 { 00112 return Action::Continue; 00113 }
|
|