OSG::GeometryBase Class Reference

Geometry Base Class.

#include <OSGGeometryBase.h>

Inheritance diagram for OSG::GeometryBase:

OSG::MaterialDrawable OSG::MaterialDrawableBase OSG::Drawable OSG::DrawableBase OSG::NodeCore OSG::AttachmentContainer OSG::FieldContainer OSG::ReflexiveContainer OSG::Geometry OSG::QuadTreeTerrainBase OSG::QuadTreeTerrain List of all members.

dcast



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

Public Types

enum  {
  TypesFieldId = Inherited::NextFieldId, LengthsFieldId = TypesFieldId + 1, PropertiesFieldId = LengthsFieldId + 1, PropIndicesFieldId = PropertiesFieldId + 1,
  DlistCacheFieldId = PropIndicesFieldId + 1, ClassicGLIdFieldId = DlistCacheFieldId + 1, AttGLIdFieldId = ClassicGLIdFieldId + 1, NextFieldId = AttGLIdFieldId + 1
}
typedef MaterialDrawable Inherited
typedef MaterialDrawable ParentContainer
typedef Inherited::TypeObject TypeObject
typedef TypeObject::InitPhase InitPhase
enum  { MaterialFieldId = Inherited::NextFieldId, NextFieldId = MaterialFieldId + 1 }
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 (Geometry)
 OSG_GEN_INTERNALPTR (MaterialDrawable)
 OSG_GEN_INTERNALPTR (Drawable)
 OSG_GEN_INTERNALPTR (NodeCore)
 OSG_RC_FIRST_FIELD_DECL (Parents)
 OSG_RC_LAST_FIELD_DECL (Parents)
FieldContainer Get


virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get


const SFGeoIntegralPropertyPtr * getSFTypes (void) const
 Get the Geometry::_sfTypes field.
const SFGeoIntegralPropertyPtr * getSFLengths (void) const
 Get the Geometry::_sfLengths field.
const MFGeoVectorPropertyPtr * getMFProperties (void) const
 Get the Geometry::_mfProperties field.
const MFGeoIntegralPropertyPtr * getMFPropIndices (void) const
 Get the Geometry::_mfPropIndices field.
SFBool * editSFDlistCache (void)
 Get the Geometry::_sfTypes field.
const SFBool * getSFDlistCache (void) const
 Get the Geometry::_sfTypes field.
GeoIntegralPropertyPtrConst getTypes (void) const
 Get the value of the Geometry::_sfTypes field.
GeoIntegralPropertyPtrConst getLengths (void) const
 Get the value of the Geometry::_sfLengths field.
GeoVectorPropertyPtrConst getProperties (const UInt32 index) const
 Get the value of the index element the Geometry::_mfProperties field.
const MFGeoVectorPropertyPtr & getProperties (void) const
 Get the Geometry::_mfProperties field.
GeoIntegralPropertyPtrConst getPropIndices (const UInt32 index) const
 Get the value of the index element the Geometry::_mfPropIndices field.
const MFGeoIntegralPropertyPtr & getPropIndices (void) const
 Get the Geometry::_mfPropIndices field.
bool & editDlistCache (void)
 Get the value of the Geometry::_sfDlistCache field.
const bool & getDlistCache (void) const
 Get the value of the Geometry::_sfDlistCache field.
Field Set


void setTypes (GeoIntegralPropertyPtrConstArg value)
 Set the value of the Geometry::_sfTypes field.
void setLengths (GeoIntegralPropertyPtrConstArg value)
 Set the value of the Geometry::_sfLengths field.
void setDlistCache (const bool &value)
 Set the value of the Geometry::_sfDlistCache field.
Ptr MField Set


void pushToProperties (GeoVectorPropertyPtrConstArg value)
void assignProperties (const MFGeoVectorPropertyPtr &value)
void insertIntoProperties (UInt32 uiIndex, GeoVectorPropertyPtrConstArg value)
void replaceInProperties (UInt32 uiIndex, GeoVectorPropertyPtrConstArg value)
void replaceInProperties (GeoVectorPropertyPtrConstArg pOldElem, GeoVectorPropertyPtrConstArg pNewElem)
void removeFromProperties (UInt32 uiIndex)
void removeFromProperties (GeoVectorPropertyPtrConstArg value)
void clearProperties (void)
void pushToPropIndices (GeoIntegralPropertyPtrConstArg value)
void assignPropIndices (const MFGeoIntegralPropertyPtr &value)
void insertIntoPropIndices (UInt32 uiIndex, GeoIntegralPropertyPtrConstArg value)
void replaceInPropIndices (UInt32 uiIndex, GeoIntegralPropertyPtrConstArg value)
void replaceInPropIndices (GeoIntegralPropertyPtrConstArg pOldElem, GeoIntegralPropertyPtrConstArg pNewElem)
void removeFromPropIndices (UInt32 uiIndex)
void removeFromPropIndices (GeoIntegralPropertyPtrConstArg value)
void clearPropIndices (void)
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
action handler


virtual Action::ResultE drawPrimitives (DrawEnv *pEnv)
 initialize the static features of the class, e.g. action callbacks
Action::ResultE renderActionHandler (Action *action)
 initialize the static features of the class, e.g. action callbacks
Sync


virtual void changed (ConstFieldMaskArg whichField, UInt32 origin, BitVector detail)
 react to field changes
Output


virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
 output the instance for debug purposes
Type definitions


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


const SFMaterialPtr * getSFMaterial (void) const
 Get the MaterialDrawable::_sfMaterial field.
MaterialPtrConst getMaterial (void) const
 Get the value of the MaterialDrawable::_sfMaterial field.
Field Set


void setMaterial (MaterialPtrConstArg value)
 Set the value of the MaterialDrawable::_sfMaterial field.
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 GeometryPtr create (void)
 create a new instance of the class
static GeometryPtr 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 OSG::BitVector TypesFieldMask
static const OSG::BitVector LengthsFieldMask
static const OSG::BitVector PropertiesFieldMask
static const OSG::BitVector PropIndicesFieldMask
static const OSG::BitVector DlistCacheFieldMask
static const OSG::BitVector ClassicGLIdFieldMask
static const OSG::BitVector AttGLIdFieldMask
static const OSG::BitVector NextFieldMask
static const OSG::BitVector MaterialFieldMask
static const bool isNodeCore = true
static stat elem


static StatElemDesc< StatIntElemstatNTriangles
static StatElemDesc< StatIntElemstatNLines
static StatElemDesc< StatIntElemstatNPoints
static StatElemDesc< StatIntElemstatNVertices
static StatElemDesc< StatIntElemstatNPrimitives

Protected Member Functions

Constructors


 GeometryBase (void)
 GeometryBase (const GeometryBase &source)
Destructors


virtual ~GeometryBase (void)
onCreate


void onCreate (const Geometry *source=NULL)
Generic Field Access


GetFieldHandlePtr getHandleTypes (void) const
EditFieldHandlePtr editHandleTypes (void)
GetFieldHandlePtr getHandleLengths (void) const
EditFieldHandlePtr editHandleLengths (void)
GetFieldHandlePtr getHandleProperties (void) const
EditFieldHandlePtr editHandleProperties (void)
GetFieldHandlePtr getHandlePropIndices (void) const
EditFieldHandlePtr editHandlePropIndices (void)
GetFieldHandlePtr getHandleDlistCache (void) const
EditFieldHandlePtr editHandleDlistCache (void)
GetFieldHandlePtr getHandleClassicGLId (void) const
EditFieldHandlePtr editHandleClassicGLId (void)
GetFieldHandlePtr getHandleAttGLId (void) const
EditFieldHandlePtr editHandleAttGLId (void)
Field Get


SFInt32 * editSFClassicGLId (void)
const SFInt32 * getSFClassicGLId (void) const
SFInt32 * editSFAttGLId (void)
const SFInt32 * getSFAttGLId (void) const
Int32 & editClassicGLId (void)
 Get the value of the Geometry::_sfClassicGLId field.
const Int32 & getClassicGLId (void) const
 Get the value of the Geometry::_sfClassicGLId field.
Int32 & editAttGLId (void)
 Get the value of the Geometry::_sfAttGLId field.
const Int32 & getAttGLId (void) const
 Get the value of the Geometry::_sfAttGLId field.
Field Set


void setClassicGLId (const Int32 &value)
 Set the value of the Geometry::_sfClassicGLId field.
void setAttGLId (const Int32 &value)
 Set the value of the Geometry::_sfAttGLId field.
Sync


virtual void resolveLinks (void)
onCreate


void onCreate (const MaterialDrawable *source=NULL)
MT Construction


OSG_SYSTEM_DLLMAPPING void onCreate (const FieldContainer *source=NULL)
OSG_SYSTEM_DLLMAPPING void onCreateAspect (const FieldContainer *createAspect, 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)
Generic Field Access


GetFieldHandlePtr getHandleMaterial (void) const
EditFieldHandlePtr editHandleMaterial (void)
Edit


GetFieldHandlePtr getHandleParents (void) const
Sync


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


OSG_SYSTEM_DLLMAPPING void subReferenceUnresolved (void)
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)
static void classDescInserter (TypeObject &oType)
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


SFGeoIntegralPropertyPtr _sfTypes
SFGeoIntegralPropertyPtr _sfLengths
MFGeoVectorPropertyPtr _mfProperties
MFGeoIntegralPropertyPtr _mfPropIndices
SFBool _sfDlistCache
SFInt32 _sfClassicGLId
SFInt32 _sfAttGLId
Fields


SFMaterialPtr _sfMaterial
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 GeometryBase &source)

Detailed Description

Definition at line 84 of file OSGGeometryBase.h.


Member Typedef Documentation

Reimplemented from OSG::MaterialDrawable.

Reimplemented in OSG::QuadTreeTerrainBase, OSG::QuadTreeTerrain, and OSG::Geometry.

Definition at line 88 of file OSGGeometryBase.h.

Reimplemented from OSG::MaterialDrawableBase.

Reimplemented in OSG::QuadTreeTerrainBase.

Definition at line 89 of file OSGGeometryBase.h.

Reimplemented from OSG::MaterialDrawableBase.

Reimplemented in OSG::QuadTreeTerrainBase.

Definition at line 91 of file OSGGeometryBase.h.

Reimplemented from OSG::MaterialDrawableBase.

Reimplemented in OSG::QuadTreeTerrainBase.

Definition at line 92 of file OSGGeometryBase.h.

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.


Member Enumeration Documentation

anonymous enum

Enumerator:
TypesFieldId 
LengthsFieldId 
PropertiesFieldId 
PropIndicesFieldId 
DlistCacheFieldId 
ClassicGLIdFieldId 
AttGLIdFieldId 
NextFieldId 

Definition at line 100 of file OSGGeometryBase.h.

00101     {
00102         TypesFieldId = Inherited::NextFieldId,
00103         LengthsFieldId = TypesFieldId + 1,
00104         PropertiesFieldId = LengthsFieldId + 1,
00105         PropIndicesFieldId = PropertiesFieldId + 1,
00106         DlistCacheFieldId = PropIndicesFieldId + 1,
00107         ClassicGLIdFieldId = DlistCacheFieldId + 1,
00108         AttGLIdFieldId = ClassicGLIdFieldId + 1,
00109         NextFieldId = AttGLIdFieldId + 1
00110     };

anonymous enum [inherited]

Enumerator:
MaterialFieldId 
NextFieldId 

Definition at line 94 of file OSGMaterialDrawableBase.h.

00095     {
00096         MaterialFieldId = Inherited::NextFieldId,
00097         NextFieldId = MaterialFieldId + 1
00098     };


Constructor & Destructor Documentation

OSG::GeometryBase::GeometryBase ( void   )  [protected]

Definition at line 919 of file OSGGeometryBase.cpp.

00919                                :
00920     Inherited(),
00921     _sfTypes                  (NullFC),
00922     _sfLengths                (NullFC),
00923     _mfProperties             (),
00924     _mfPropIndices            (),
00925     _sfDlistCache             (bool(true)),
00926     _sfClassicGLId            (Int32(0)),
00927     _sfAttGLId                (Int32(0))
00928 {
00929 }

OSG::GeometryBase::GeometryBase ( const GeometryBase source  )  [protected]

Definition at line 931 of file OSGGeometryBase.cpp.

00931                                                      :
00932     Inherited(source),
00933     _sfTypes                  (NullFC),
00934     _sfLengths                (NullFC),
00935     _mfProperties             (),
00936     _mfPropIndices            (),
00937     _sfDlistCache             (source._sfDlistCache             ),
00938     _sfClassicGLId            (source._sfClassicGLId            ),
00939     _sfAttGLId                (source._sfAttGLId                )
00940 {
00941 }

OSG::GeometryBase::~GeometryBase ( void   )  [protected, virtual]

Definition at line 946 of file OSGGeometryBase.cpp.

00947 {
00948 }


Member Function Documentation

OSG::GeometryBase::OSG_GEN_INTERNALPTR ( Geometry   ) 

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

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

Reimplemented from OSG::MaterialDrawableBase.

Reimplemented in OSG::QuadTreeTerrainBase.

Definition at line 63 of file OSGGeometryBase.inl.

References _type, and OSG::TypeBase::getId().

00064 {
00065     return _type.getId();
00066 }

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

Reimplemented from OSG::MaterialDrawableBase.

Reimplemented in OSG::QuadTreeTerrainBase.

Definition at line 69 of file OSGGeometryBase.inl.

References _type, and OSG::ReflexiveContainerType::getGroupId().

00070 {
00071     return _type.getGroupId();
00072 }

FieldContainerType & OSG::GeometryBase::getType ( void   )  [virtual]

Reimplemented from OSG::MaterialDrawableBase.

Reimplemented in OSG::QuadTreeTerrainBase.

Definition at line 325 of file OSGGeometryBase.cpp.

References _type.

00326 {
00327     return _type;
00328 }

const FieldContainerType & OSG::GeometryBase::getType ( void   )  const [virtual]

Reimplemented from OSG::MaterialDrawableBase.

Reimplemented in OSG::QuadTreeTerrainBase.

Definition at line 330 of file OSGGeometryBase.cpp.

References _type.

00331 {
00332     return _type;
00333 }

UInt32 OSG::GeometryBase::getContainerSize ( void   )  const [virtual]

Reimplemented from OSG::MaterialDrawableBase.

Reimplemented in OSG::QuadTreeTerrainBase.

Definition at line 335 of file OSGGeometryBase.cpp.

00336 {
00337     return sizeof(Geometry);
00338 }

const SFGeoIntegralPropertyPtr * OSG::GeometryBase::getSFTypes ( void   )  const

Definition at line 344 of file OSGGeometryBase.cpp.

References _sfTypes.

00345 {
00346     return &_sfTypes;
0