OSG::Group Class Reference

Group is the basic NodeCore for inner nodes in the tree. More...

#include <OSGGroup.h>

Inheritance diagram for OSG::Group:

OSG::GroupBase OSG::NodeCore OSG::AttachmentContainer OSG::FieldContainer OSG::ReflexiveContainer OSG::BillboardBase OSG::ChunkOverrideGroupBase OSG::ContainerMixinHead< StageDesc > OSG::DistanceLODBase OSG::InverseTransformBase OSG::MaterialGroupBase OSG::MultiCoreBase OSG::ProxyGroupBase OSG::ScreenLODBase OSG::SwitchBase OSG::TransformBase OSG::VisitSubTreeBase List of all members.

dcast



 OSG_GEN_INTERNALPTR (AttachmentContainer)
typedef AttachmentContainer Self
typedef FieldContainerAttachment AttachmentObj
typedef FieldContainerAttachmentPtr AttachmentObjPtr
typedef SFFieldContainerAttachmentPtrMap SFAttachmentObjPtrMap
typedef SFAttachmentObjPtrMap::StoredType AttachmentObjPtrMap
typedef AttachmentObjPtrMap::iterator AttachmentObjPtrMapIt

Public Types

typedef NodeCore ParentContainer
typedef Inherited::TypeObject TypeObject
typedef TypeObject::InitPhase InitPhase
typedef MFParentFieldContainerPtr ParentField
typedef const MFParentFieldContainerPtr * ParentFieldPtr
typedef MFParentFieldContainerPtr::const_iterator ParentFieldIt
Type definitions


typedef Field *(ReflexiveContainer::*) FieldEditMethod (void)
typedef const Field *(ReflexiveContainer::*) FieldGetMethod (void) const

Public Member Functions

 OSG_GEN_INTERNALPTR (Group)
 OSG_GEN_INTERNALPTR (NodeCore)
 OSG_RC_FIRST_FIELD_DECL (Parents)
 OSG_RC_LAST_FIELD_DECL (Parents)
Sync


virtual void changed (ConstFieldMaskArg whichField, UInt32 origin, BitVector detail)
Dump


virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
Type definitions


 OSG_GEN_INTERNALPTR (FieldContainer)
 OSG_RC_FIRST_FIELD_DECL (ChangedCallbacks)
 OSG_RC_LAST_FIELD_DECL (ChangedCallbacks)
FieldContainer Get


virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Binary Access


virtual UInt32 getBinSize (ConstFieldMaskArg whichField)
virtual void copyToBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField)
virtual void copyFromBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField)
Copy


virtual FieldContainerPtr shallowCopy (void) const
Constructors


 OSG_RC_FIRST_FIELD_DECL (Attachments)
 OSG_RC_LAST_FIELD_DECL (Attachments)
Helper


const MFParentFieldContainerPtr & getParents (void) const
Get


const MFParentFieldContainerPtr * getMFParents (void) const
Changed


virtual void accumulateMatrix (Matrixr &result)
MT Destruction


virtual void adjustVolume (Volume &volume)
Comparison


virtual void invalidateVolume (void)
Dump


void addParent (FieldContainerPtrConst &parent, const UInt16 uiStoredInFieldId=InvalidParentEPos)
void subParent (FieldContainerPtrConst &parent)
Set


void addAttachment (const AttachmentObjPtr attachmentP, UInt16 binding=0)
void subAttachment (const AttachmentObjPtr attachmentP, UInt16 binding=0)
AttachmentObjPtr findAttachment (UInt32 groupId, UInt16 binding=0)
AttachmentObjPtr findAttachment (const FieldContainerType &type, UInt16 binding=0)
your_category


const SFAttachmentObjPtrMapgetSFAttachments (void) const
Set


void callChangedFunctors (ConstFieldMaskArg whichField)
Container Access


UInt32 addChangedFunctor (ChangedFunctor func, std::string createSymbol)
template<class FunctorT>
void subChangedFunctor (FunctorT func)
void subChangedFunctor (UInt32 uiId)
void clearChangedFunctors (void)
Field Flags


const FieldFlagsgetFieldFlags (void)
Helper


OSG_SYSTEM_DLLMAPPING void addReference (void)
OSG_SYSTEM_DLLMAPPING void subReference (void)
OSG_SYSTEM_DLLMAPPING void subReferenceLocalVar (void)
OSG_SYSTEM_DLLMAPPING Int32 getRefCount (void) const
dcast


OSG_SYSTEM_DLLMAPPING UInt32 getTypeId (void) const
OSG_SYSTEM_DLLMAPPING UInt16 getGroupId (void) const
OSG_SYSTEM_DLLMAPPING const
Char8 * 
getTypeName (void) const
Get Field


OSG_SYSTEM_DLLMAPPING UInt32 getNumFields (void) const
OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr editField (UInt32 fieldId)
OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr editField (const Char8 *fieldName)
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr getField (UInt32 fieldId) const
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr getField (const Char8 *fieldName) const
Get Field Description


OSG_SYSTEM_DLLMAPPING FieldDescriptionBasegetFieldDescription (UInt32 fieldId)
OSG_SYSTEM_DLLMAPPING FieldDescriptionBasegetFieldDescription (const Char8 *fieldName)
Comparison


OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr invalidEditField (void)
OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr invalidGetField (void) const

Static Public Member Functions

Class Get


static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
static UInt16 getClassGroupId (void)
 access the type of the class
Construction


static GroupPtr create (void)
 create a new instance of the class
static GroupPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype

Public Attributes

dcast


 OSG_ABSTR_FIELD_CONTAINER_DECL

Static Public Attributes

static const bool isNodeCore = true
Constants


static const UInt32 NextFieldId = 1
static const BitVector NextFieldMask = 0x01

Protected Types

typedef GroupBase Inherited

Protected Member Functions

Constructors


 Group (void)
 Group (const Group &source)
Destructors


virtual ~Group (void)
Action Callbacks


ActionBase::ResultE renderEnter (Action *action)
ActionBase::ResultE renderLeave (Action *action)
ActionBase::ResultE intersect (Action *action)
Sync


virtual void resolveLinks (void)
Edit


GetFieldHandlePtr getHandleParents (void) const
Sync


EditFieldHandlePtr editHandleAttachments (void)
GetFieldHandlePtr getHandleAttachments (void) const
Edit


OSG_SYSTEM_DLLMAPPING void subReferenceUnresolved (void)
MT Construction


OSG_SYSTEM_DLLMAPPING void onCreateAspect (const FieldContainer *createAspect, const FieldContainer *source=NULL)
OSG_SYSTEM_DLLMAPPING void onCreate (const FieldContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroy (UInt32 uiContainerId)
Changed


OSG_SYSTEM_DLLMAPPING void onCreate (const ReflexiveContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroyAspect (UInt32 uiContainerId, UInt32 uiAspect)
MT Construction


virtual OSG_SYSTEM_DLLMAPPING
bool 
deregister (UInt32 uiContainerId)
MT Construction


OSG_SYSTEM_DLLMAPPING void registerChangedContainer (void)
virtual OSG_SYSTEM_DLLMAPPING
void 
registerChangedContainerV (void)
Local Edit


void editSField (ConstFieldMaskArg whichField)
template<class FieldT>
void editMField (ConstFieldMaskArg whichField, FieldT &oField)
MT Destruction


void execEndEdit (ConstFieldMaskArg whichField)
void clearChangeEntry (ContainerChangeEntry *pRef)
Edit


OSG_SYSTEM_DLLMAPPING void setId (UInt32 uiContainerId)
OSG_SYSTEM_DLLMAPPING UInt32 getId (void) const

Static Protected Member Functions

static void classDescInserter (TypeObject &oType)
static Char8 * getClassname (void)
Init


static void initMethod (InitPhase ePhase)
Fields


static void classDescInserter (TypeObject &oType)
MT Construction


template<class ObjectT>
static void newPtr (typename ObjectT::ObjPtr &result, const ObjectT *prototypeP)
template<class ObjectT>
static void newPtr (typename ObjectT::ObjPtr &result)

Protected Attributes

Fields


MFParentFieldContainerPtr _mfParents
Fields


SFAttachmentObjPtrMap _sfAttachments
Type information


FieldFlags_pFieldFlags
MFChangedFunctorCallback _mfChangedFunctors
Int32 _iRefCount
Member


BitVector _bvChanged
ContainerChangeEntry_pContainerChanges
UInt32 _uiContainerId

Static Protected Attributes

static TypeObject _type

Private Member Functions

void operator= (const Group &source)
 prohibit default function (move to 'public' if needed)

Friends

class FieldContainer
class GroupBase

Detailed Description

Group is the simplest form of a NodeCore. A group carries no predefined data and most actions will only traverse the children list. So usually the group does nothing.

Definition at line 55 of file OSGGroup.h.


Member Typedef Documentation

typedef GroupBase OSG::Group::Inherited [protected]

typedef MFParentFieldContainerPtr OSG::NodeCore::ParentField [inherited]

Definition at line 77 of file OSGNodeCore.h.

typedef const MFParentFieldContainerPtr* OSG::NodeCore::ParentFieldPtr [inherited]

Definition at line 78 of file OSGNodeCore.h.

typedef MFParentFieldContainerPtr::const_iterator OSG::NodeCore::ParentFieldIt [inherited]

Definition at line 79 of file OSGNodeCore.h.

Definition at line 70 of file OSGAttachmentContainer.h.

typedef FieldContainerAttachmentPtr OSG::AttachmentContainer::AttachmentObjPtr [inherited]

Definition at line 71 of file OSGAttachmentContainer.h.

typedef SFFieldContainerAttachmentPtrMap OSG::AttachmentContainer::SFAttachmentObjPtrMap [inherited]

Definition at line 72 of file OSGAttachmentContainer.h.

typedef SFAttachmentObjPtrMap::StoredType OSG::AttachmentContainer::AttachmentObjPtrMap [inherited]

Definition at line 74 of file OSGAttachmentContainer.h.

typedef AttachmentObjPtrMap::iterator OSG::AttachmentContainer::AttachmentObjPtrMapIt [inherited]

Definition at line 75 of file OSGAttachmentContainer.h.

typedef Field*(ReflexiveContainer::*) OSG::ReflexiveContainer::FieldEditMethod(void) [inherited]

Definition at line 79 of file OSGReflexiveContainer.h.

typedef const Field*(ReflexiveContainer::*) OSG::ReflexiveContainer::FieldGetMethod(void) const [inherited]

Definition at line 81 of file OSGReflexiveContainer.h.


Constructor & Destructor Documentation

Group::Group ( void   )  [protected]

Definition at line 80 of file OSGGroup.cpp.

00080                  :
00081     Inherited()
00082 {
00083 }

Group::Group ( const Group source  )  [protected]

Definition at line 85 of file OSGGroup.cpp.

00085                                 :
00086     Inherited(source)
00087 {
00088 }

Group::~Group ( void   )  [protected, virtual]

Definition at line 93 of file OSGGroup.cpp.

00094 {
00095 }


Member Function Documentation

void Group::changed ( ConstFieldMaskArg  whichField,
UInt32  origin,
BitVector  detail 
) [virtual]

void Group::dump ( UInt32  uiIndent = 0,
const BitVector  bvFlags = 0 
) const [virtual]

void Group::initMethod ( InitPhase  ePhase  )  [static, protected]

Reimplemented from OSG::FieldContainer.

Reimplemented in OSG::MoveManipulator, OSG::ScaleManipulator, OSG::Manipulator, OSG::RotateManipulator, OSG::ScreenLOD, OSG::Stage, OSG::ComponentTransform, OSG::ProxyGroup, OSG::Switch, OSG::InverseTransform, OSG::Transform, OSG::HDRStage, OSG::MaterialGroup, OSG::ChunkOverrideGroup, and OSG::TiledQuadTreeTerrain.

Definition at line 139 of file OSGGroup.cpp.

References OSG::GroupBase::getClassType(), OSG::FieldContainer::initMethod(), intersect(), OSG::IntersectAction::registerEnterDefault(), OSG::RenderAction::registerEnterDefault(), OSG::RenderAction::registerLeaveDefault(), renderEnter(), renderLeave(), and OSG::TypeBase::SystemPost.

Referenced by OSG::Transform::initMethod(), OSG::Switch::initMethod(), OSG::Stage::initMethod(), OSG::ScreenLOD::initMethod(), OSG::ProxyGroup::initMethod(), OSG::MultiCore::initMethod(), OSG::InverseTransform::initMethod(), and OSG::HDRStage::initMethod().

00140 {
00141     Inherited::initMethod(ePhase);
00142 
00143 
00144     if(ePhase == TypeObject::SystemPost)
00145     {
00146         RenderAction::registerEnterDefault( 
00147             getClassType(), 
00148             reinterpret_cast<Action::Callback>(&Group::renderEnter));
00149 
00150         RenderAction::registerLeaveDefault( 
00151             getClassType(),
00152             reinterpret_cast<Action::Callback>(&Group::renderLeave));
00153         
00154 #ifndef OSG_WINCE
00155         IntersectAction::registerEnterDefault( 
00156             getClassType(),
00157             reinterpret_cast<Action::Callback>(&Group::intersect));
00158 #endif
00159     }
00160 }

ActionBase::ResultE Group::renderEnter ( Action action  )  [protected]

Reimplemented in OSG::ScreenLOD, OSG::Billboard, OSG::InverseTransform, OSG::Transform, OSG::MaterialGroup, and OSG::TiledQuadTreeTerrain.

Definition at line 100 of file OSGGroup.cpp.

References OSG::ActionBase::Continue, and OSG::RenderAction::pushVisibility().

Referenced by initMethod(), and OSG::MaterialGroup::renderEnter().

00101 {
00102     RenderAction *ra = dynamic_cast<RenderAction *>(action);
00103 
00104     ra->pushVisibility();
00105     
00106     return ActionBase::Continue;
00107 }

ActionBase::ResultE Group::renderLeave ( Action action  )  [protected]

Reimplemented in OSG::Billboard, OSG::InverseTransform, OSG::Transform, and OSG::MaterialGroup.

Definition at line 109 of file OSGGroup.cpp.

References OSG::ActionBase::Continue, and OSG::RenderAction::popVisibility().

Referenced by initMethod(), and OSG::MaterialGroup::renderLeave().

00110 {
00111     RenderAction *ra = dynamic_cast<RenderAction *>(action);
00112 
00113     ra->popVisibility();
00114     
00115     return ActionBase::Continue;
00116 }

ActionBase::ResultE Group::intersect ( Action action  )  [protected]

Reimplemented in OSG::Switch.

Definition at line 122 of file OSGGroup.cpp.

References OSG::ActionBase::Continue, OSG::Action::getActNode(), OSG::IntersectAction::getLine(), OSG::DynamicVolume::intersect(), OSG::Volume::isValid(), and OSG::ActionBase::Skip.

Referenced by initMethod().

00123 {
00124           IntersectAction *ia = dynamic_cast<IntersectAction *>(action);
00125     const DynamicVolume   &dv = ia->getActNode()->getVolume();
00126     
00127     if(dv.isValid() && ! dv.intersect(ia->getLine()))
00128     {
00129         return Action::Skip;  //bv missed -> can not hit children
00130     }
00131     
00132     return ActionBase::Continue;
00133 }

void OSG::Group::operator= ( const Group source  )  [private]

OSG::GroupBase::OSG_GEN_INTERNALPTR ( Group   )  [inherited]

OSG::NodeCore::OSG_GEN_INTERNALPTR ( NodeCore   )  [inherited]

OSG::AttachmentContainer::OSG_GEN_INTERNALPTR ( AttachmentContainer   )  [inherited]

OSG::FieldContainer::OSG_GEN_INTERNALPTR ( FieldContainer   )  [inherited]

OSG::FieldContainerType & OSG::GroupBase::getClassType ( void   )  [inline, static, inherited]

OSG::UInt32 OSG::GroupBase::getClassTypeId ( void   )  [inline, static, inherited]

OSG::UInt16 OSG::GroupBase::getClassGroupId ( void   )  [inline, static, inherited]

FieldContainerType & OSG::GroupBase::getType ( void   )  [virtual, inherited]

const FieldContainerType & OSG::GroupBase::getType ( void   )  const [virtual, inherited]