OSG::Geometry Class Reference

Geometry class. See PageWindowGLUTGeometry for a description.

#include <OSGGeometry.h>

Inheritance diagram for OSG::Geometry:

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

Pump Handling



typedef std::vector< std::pair<
GeoIntegralPropertyPtr, std::vector<
UInt16 > > > 
IndexBag
IndexBag getUniqueIndexBag (void)

Global Pump Group Handling



typedef std::vector< GeoPumpGroup * > PumpGroupStorage
static PumpGroupStoragegetPumpGroupStorage (void)

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)

Property Access



GeoIntegralPropertyPtr getTypes (void) const
GeoIntegralPropertyPtr getLengths (void) const
GeoVectorPropertyPtr getPositions (void) const
GeoVectorPropertyPtr getNormals (void) const
GeoVectorPropertyPtr getColors (void) const
GeoVectorPropertyPtr getSecondaryColors (void) const
GeoVectorPropertyPtr getTexCoords (void) const
GeoVectorPropertyPtr getTexCoords1 (void) const
GeoVectorPropertyPtr getTexCoords2 (void) const
GeoVectorPropertyPtr getTexCoords3 (void) const
GeoVectorPropertyPtr getTexCoords4 (void) const
GeoVectorPropertyPtr getTexCoords5 (void) const
GeoVectorPropertyPtr getTexCoords6 (void) const
GeoVectorPropertyPtr getTexCoords7 (void) const
void setPositions (GeoVectorPropertyPtrConstArg value)
void setNormals (GeoVectorPropertyPtrConstArg value)
void setColors (GeoVectorPropertyPtrConstArg value)
void setSecondaryColors (GeoVectorPropertyPtrConstArg value)
void setTexCoords (GeoVectorPropertyPtrConstArg value)
void setTexCoords1 (GeoVectorPropertyPtrConstArg value)
void setTexCoords2 (GeoVectorPropertyPtrConstArg value)
void setTexCoords3 (GeoVectorPropertyPtrConstArg value)
void setTexCoords4 (GeoVectorPropertyPtrConstArg value)
void setTexCoords5 (GeoVectorPropertyPtrConstArg value)
void setTexCoords6 (GeoVectorPropertyPtrConstArg value)
void setTexCoords7 (GeoVectorPropertyPtrConstArg value)
void setMaterial (const MaterialPtr &value)
void setProperty (GeoVectorPropertyPtrConstArg value, UInt16 index)
void setIndex (GeoIntegralPropertyPtrConstArg value, UInt16 index)
GeoVectorPropertyPtr getProperty (UInt16 index) const
GeoIntegralPropertyPtr getIndex (UInt16 index) const
static const char * mapType (UInt8 type)

Class Specific



void handleClassicGL (DrawEnv *pEnv, UInt32 id, Window::GLObjectStatusE mode)
void handleAttGL (DrawEnv *pEnv, UInt32 id, Window::GLObjectStatusE mode)
void onCreate (const Geometry *source=NULL)
void onDestroy (UInt32 id)
static void handleClassicDestroyGL (DrawEnv *pEnv, UInt32 id, Window::GLObjectStatusE mode)
static void handleAttDestroyGL (DrawEnv *pEnv, UInt32 id, Window::GLObjectStatusE mode)

Public Types

typedef GeometryBase Inherited
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 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)
Property/Index MField Changes


void resizeProperties (size_t newsize)
void reserveProperties (size_t newsize)
void resizePropIndices (size_t newsize)
void reservePropIndices (size_t newsize)
Backwards Compatibility Helpers


void setIndices (GeoIntegralPropertyPtrConstArg value)
GeoIntegralPropertyPtr getIndices (void)
Backwards Compatibility Helpers


UInt32 indexOccurrence (GeoIntegralPropertyPtrConstArg value)
bool isSingleIndex (void)
Iterator Access


TriangleIterator beginTriangles (void) const
TriangleIterator endTriangles (void) const
PrimitiveIterator beginPrimitives (void) const
PrimitiveIterator endPrimitives (void) const
FaceIterator beginFaces (void) const
FaceIterator endFaces (void) const
LineIterator beginLines (void) const
LineIterator endLines (void) const
EdgeIterator beginEdges (void) const
EdgeIterator endEdges (void) const
Actions


virtual Action::ResultE drawPrimitives (DrawEnv *pEnv)
Action::ResultE intersect (Action *action)
void invalidateDlistCache (void)
NodeCore Specific


void adjustVolume (Volume &volume)
Sync


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


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
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.
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


Action::ResultE renderActionHandler (Action *action)
 initialize the static features of the class, e.g. action callbacks
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)
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
Simplification Constants


static const UInt16 MaxAttribs = 16
IndexMapping Constants
These are the constants used for mapping the excpliit get/set functions to the generic attribute data buffers used by OpenGL.

static const UInt16 PositionsIndex = 0
static const UInt16 NormalsIndex = 2
static const UInt16 ColorsIndex = 3
static const UInt16 SecondaryColorsIndex = 4
static const UInt16 TexCoordsIndex = 8
static const UInt16 TexCoords1Index = 9
static const UInt16 TexCoords2Index = 10
static const UInt16 TexCoords3Index = 11
static const UInt16 TexCoords4Index = 12
static const UInt16 TexCoords5Index = 13
static const UInt16 TexCoords6Index = 14
static const UInt16 TexCoords7Index = 15
static const UInt16 LastIndex = 15
static stat elem


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

Protected Member Functions

Constructors


 Geometry (void)
 Geometry (const Geometry &source)
Destructors


virtual ~Geometry (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)
Changed


OSG_SYSTEM_DLLMAPPING void onCreate (const ReflexiveContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroyAspect (UInt32 uiContainerId, UInt32 uiAspect)
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)
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 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


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 Geometry &source)

Static Private Attributes

static PumpGroupStorage _pumps

Friends

class FieldContainer
class GeometryBase

Detailed Description

Definition at line 70 of file OSGGeometry.h.


Member Typedef Documentation

Reimplemented from OSG::GeometryBase.

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

Definition at line 78 of file OSGGeometry.h.

typedef std::vector<std::pair<GeoIntegralPropertyPtr, std::vector<UInt16> > > OSG::Geometry::IndexBag

Definition at line 248 of file OSGGeometry.h.

Definition at line 266 of file OSGGeometry.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.