Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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::Geometry osg::DVRGeometryBase osg::SurfaceBase osg::DVRGeometry osg::Surface List of all members.

Public Types

typedef GeometryPtr Ptr
enum  {
  TypesFieldId = Inherited::NextFieldId, LengthsFieldId = TypesFieldId + 1, PositionsFieldId = LengthsFieldId + 1, NormalsFieldId = PositionsFieldId + 1,
  ColorsFieldId = NormalsFieldId + 1, SecondaryColorsFieldId = ColorsFieldId + 1, TexCoordsFieldId = SecondaryColorsFieldId + 1, TexCoords1FieldId = TexCoordsFieldId + 1,
  TexCoords2FieldId = TexCoords1FieldId + 1, TexCoords3FieldId = TexCoords2FieldId + 1, IndicesFieldId = TexCoords3FieldId + 1, IndexMappingFieldId = IndicesFieldId + 1,
  DlistCacheFieldId = IndexMappingFieldId + 1, GLIdFieldId = DlistCacheFieldId + 1, NextFieldId = GLIdFieldId + 1
}

Public Member Functions

FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFGeoPTypesPtrgetSFTypes (void)
 Get the Geometry::_sfTypes field.
SFGeoPLengthsPtrgetSFLengths (void)
 Get the Geometry::_sfLengths field.
SFGeoPositionsPtrgetSFPositions (void)
 Get the Geometry::_sfPositions field.
SFGeoNormalsPtrgetSFNormals (void)
 Get the Geometry::_sfNormals field.
SFGeoColorsPtrgetSFColors (void)
 Get the Geometry::_sfColors field.
SFGeoColorsPtrgetSFSecondaryColors (void)
 Get the Geometry::_sfSecondaryColors field.
SFGeoTexCoordsPtrgetSFTexCoords (void)
 Get the Geometry::_sfTexCoords field.
SFGeoTexCoordsPtrgetSFTexCoords1 (void)
 Get the Geometry::_sfTexCoords1 field.
SFGeoTexCoordsPtrgetSFTexCoords2 (void)
 Get the Geometry::_sfTexCoords2 field.
SFGeoTexCoordsPtrgetSFTexCoords3 (void)
 Get the Geometry::_sfTexCoords3 field.
SFGeoIndicesPtrgetSFIndices (void)
 Get the Geometry::_sfIndices field.
MFUInt16getMFIndexMapping (void)
 Get the Geometry::_mfIndexMapping field.
SFBoolgetSFDlistCache (void)
 Get the Geometry::_sfDlistCache field.
GeoPTypesPtrgetTypes (void)
 Get the value of the Geometry::_sfTypes field.
const GeoPTypesPtrgetTypes (void) const
 Get the value of the Geometry::_sfTypes field.
GeoPLengthsPtrgetLengths (void)
 Get the value of the Geometry::_sfLengths field.
const GeoPLengthsPtrgetLengths (void) const
 Get the value of the Geometry::_sfLengths field.
GeoPositionsPtrgetPositions (void)
 Get the value of the Geometry::_sfPositions field.
const GeoPositionsPtrgetPositions (void) const
 Get the value of the Geometry::_sfPositions field.
GeoNormalsPtrgetNormals (void)
 Get the value of the Geometry::_sfNormals field.
const GeoNormalsPtrgetNormals (void) const
 Get the value of the Geometry::_sfNormals field.
GeoColorsPtrgetColors (void)
 Get the value of the Geometry::_sfColors field.
const GeoColorsPtrgetColors (void) const
 Get the value of the Geometry::_sfColors field.
GeoColorsPtrgetSecondaryColors (void)
 Get the value of the Geometry::_sfSecondaryColors field.
const GeoColorsPtrgetSecondaryColors (void) const
 Get the value of the Geometry::_sfSecondaryColors field.
GeoTexCoordsPtrgetTexCoords (void)
 Get the value of the Geometry::_sfTexCoords field.
const GeoTexCoordsPtrgetTexCoords (void) const
 Get the value of the Geometry::_sfTexCoords field.
GeoTexCoordsPtrgetTexCoords1 (void)
 Get the value of the Geometry::_sfTexCoords1 field.
const GeoTexCoordsPtrgetTexCoords1 (void) const
 Get the value of the Geometry::_sfTexCoords1 field.
GeoTexCoordsPtrgetTexCoords2 (void)
 Get the value of the Geometry::_sfTexCoords2 field.
const GeoTexCoordsPtrgetTexCoords2 (void) const
 Get the value of the Geometry::_sfTexCoords2 field.
GeoTexCoordsPtrgetTexCoords3 (void)
 Get the value of the Geometry::_sfTexCoords3 field.
const GeoTexCoordsPtrgetTexCoords3 (void) const
 Get the value of the Geometry::_sfTexCoords3 field.
GeoIndicesPtrgetIndices (void)
 Get the value of the Geometry::_sfIndices field.
const GeoIndicesPtrgetIndices (void) const
 Get the value of the Geometry::_sfIndices field.
bool & getDlistCache (void)
 Get the value of the Geometry::_sfDlistCache field.
const bool & getDlistCache (void) const
 Get the value of the Geometry::_sfDlistCache field.
UInt16getIndexMapping (const UInt32 index)
 Get the value of the index element the Geometry::_mfIndexMapping field.
MFUInt16getIndexMapping (void)
 Get the Geometry::_mfIndexMapping field.
const MFUInt16getIndexMapping (void) const
 Get the Geometry::_mfIndexMapping field.
Field Set
*void setTypes (const GeoPTypesPtr &value)
 Set the value of the Geometry::_sfTypes field.
void setLengths (const GeoPLengthsPtr &value)
 Set the value of the Geometry::_sfLengths field.
void setPositions (const GeoPositionsPtr &value)
 Set the value of the Geometry::_sfPositions field.
void setNormals (const GeoNormalsPtr &value)
 Set the value of the Geometry::_sfNormals field.
void setColors (const GeoColorsPtr &value)
 Set the value of the Geometry::_sfColors field.
void setSecondaryColors (const GeoColorsPtr &value)
 Set the value of the Geometry::_sfSecondaryColors field.
void setTexCoords (const GeoTexCoordsPtr &value)
 Set the value of the Geometry::_sfTexCoords field.
void setTexCoords1 (const GeoTexCoordsPtr &value)
 Set the value of the Geometry::_sfTexCoords1 field.
void setTexCoords2 (const GeoTexCoordsPtr &value)
 Set the value of the Geometry::_sfTexCoords2 field.
void setTexCoords3 (const GeoTexCoordsPtr &value)
 Set the value of the Geometry::_sfTexCoords3 field.
void setIndices (const GeoIndicesPtr &value)
 Set the value of the Geometry::_sfIndices field.
void setDlistCache (const bool &value)
 Set the value of the Geometry::_sfDlistCache 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
action handler
*virtual Action::ResultE drawPrimitives (DrawActionBase *action)
 initialize the static features of the class, e.g. action callbacks
Action::ResultE drawActionHandler (Action *action)
 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 (BitVector whichField, UInt32 origin)
 react to field changes
Output
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
 output the instance for debug purposes
Field Set
*void setMaterial (const MaterialPtr &value)
 Set the value of the MaterialDrawable::_sfMaterial field.
Field Get
*SFMaterialPtrgetSFMaterial (void)
 Get the MaterialDrawable::_sfMaterial field.
MaterialPtrgetMaterial (void)
 Get the value of the MaterialDrawable::_sfMaterial field.
const MaterialPtrgetMaterial (void) const
 Get the value of the MaterialDrawable::_sfMaterial field.
Parents
*MFNodePtrgetParents (void)
const MFNodePtrgetParents (void) const
MFNodePtrgetMFParents (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 *SFAttachmentMapgetSFAttachments (void)

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

Static Public Attributes

static const osg::BitVector TypesFieldMask
static const osg::BitVector LengthsFieldMask
static const osg::BitVector PositionsFieldMask
static const osg::BitVector NormalsFieldMask
static const osg::BitVector ColorsFieldMask
static const osg::BitVector SecondaryColorsFieldMask
static const osg::BitVector TexCoordsFieldMask
static const osg::BitVector TexCoords1FieldMask
static const osg::BitVector TexCoords2FieldMask
static const osg::BitVector TexCoords3FieldMask
static const osg::BitVector IndicesFieldMask
static const osg::BitVector IndexMappingFieldMask
static const osg::BitVector DlistCacheFieldMask
static const osg::BitVector GLIdFieldMask
static const osg::BitVector MTInfluenceMask
static const osg::BitVector MaterialFieldMask
static const BitVector ParentsFieldMask = (1 << NodeCore::ParentsFieldId )
static const BitVector AttachmentsFieldMask
static const BitVector NextFieldMask
static stat elem
*static StatElemDesc< StatIntElemstatNTriangles
static StatElemDesc< StatIntElemstatNLines
static StatElemDesc< StatIntElemstatNPoints
static StatElemDesc< StatIntElemstatNVertices
static StatElemDesc< StatIntElemstatNPrimitives
CoredNodePtr helper
*static const bool isNodeCore = true

Protected Member Functions

Constructors
GeometryBase (void)
 GeometryBase (const GeometryBase &source)
Destructors
*virtual ~GeometryBase (void)
Field Get
*SFInt32getSFGLId (void)
 Get the Geometry::_sfGLId field.
Int32getGLId (void)
 Get the value of the Geometry::_sfGLId field.
const Int32getGLId (void) const
 Get the value of the Geometry::_sfGLId field.
Field Set
*void setGLId (const Int32 &value)
 Set the value of the Geometry::_sfGLId field.
Sync
*void executeSyncImpl (GeometryBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)
Sync
*void executeSyncImpl (MaterialDrawableBase *pOther, const BitVector &whichField)
Sync
*void executeSyncImpl (DrawableBase *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (NodeCore *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (AttachmentContainer *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)

Protected Attributes

Fields
*SFGeoPTypesPtr _sfTypes
SFGeoPLengthsPtr _sfLengths
SFGeoPositionsPtr _sfPositions
SFGeoNormalsPtr _sfNormals
SFGeoColorsPtr _sfColors
SFGeoColorsPtr _sfSecondaryColors
SFGeoTexCoordsPtr _sfTexCoords
SFGeoTexCoordsPtr _sfTexCoords1
SFGeoTexCoordsPtr _sfTexCoords2
SFGeoTexCoordsPtr _sfTexCoords3
SFGeoIndicesPtr _sfIndices
MFUInt16 _mfIndexMapping
SFBool _sfDlistCache
SFInt32 _sfGLId
Fields
*SFMaterialPtr _sfMaterial
Fields
*MFNodePtr _parents
Fields
*SFAttachmentMap _attachmentMap

Private Types

typedef MaterialDrawable Inherited

Private Member Functions

void operator= (const GeometryBase &source)

Static Private Attributes

static FieldDescription_desc []
 Geometry description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 94 of file OSGGeometryBase.h.


Member Typedef Documentation

typedef MaterialDrawable osg::GeometryBase::Inherited [private]
 

Reimplemented from osg::MaterialDrawable.

Reimplemented in osg::Geometry, osg::DVRGeometry, osg::DVRGeometryBase, osg::Surface, and osg::SurfaceBase.

Definition at line 98 of file OSGGeometryBase.h.

typedef GeometryPtr osg::GeometryBase::Ptr
 

Reimplemented from osg::MaterialDrawableBase.

Reimplemented in osg::DVRGeometryBase, and osg::SurfaceBase.

Definition at line 103 of file OSGGeometryBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
TypesFieldId 
LengthsFieldId 
PositionsFieldId 
NormalsFieldId 
ColorsFieldId 
SecondaryColorsFieldId 
TexCoordsFieldId 
TexCoords1FieldId 
TexCoords2FieldId 
TexCoords3FieldId 
IndicesFieldId 
IndexMappingFieldId 
DlistCacheFieldId 
GLIdFieldId 
NextFieldId 

Reimplemented from osg::MaterialDrawableBase.

Definition at line 105 of file OSGGeometryBase.h.

00106     {
00107         TypesFieldId           = Inherited::NextFieldId,
00108         LengthsFieldId         = TypesFieldId           + 1,
00109         PositionsFieldId       = LengthsFieldId         + 1,
00110         NormalsFieldId         = PositionsFieldId       + 1,
00111         ColorsFieldId          = NormalsFieldId         + 1,
00112         SecondaryColorsFieldId = ColorsFieldId          + 1,
00113         TexCoordsFieldId       = SecondaryColorsFieldId + 1,
00114         TexCoords1FieldId      = TexCoordsFieldId       + 1,
00115         TexCoords2FieldId      = TexCoords1FieldId      + 1,
00116         TexCoords3FieldId      = TexCoords2FieldId      + 1,
00117         IndicesFieldId         = TexCoords3FieldId      + 1,
00118         IndexMappingFieldId    = IndicesFieldId         + 1,
00119         DlistCacheFieldId      = IndexMappingFieldId    + 1,
00120         GLIdFieldId            = DlistCacheFieldId      + 1,
00121         NextFieldId            = GLIdFieldId            + 1
00122     };


Constructor & Destructor Documentation

GeometryBase::GeometryBase void   )  [protected]
 

Definition at line 308 of file OSGGeometryBase.cpp.

00308                                :
00309     _sfTypes                  (), 
00310     _sfLengths                (), 
00311     _sfPositions              (), 
00312     _sfNormals                (), 
00313     _sfColors                 (), 
00314     _sfSecondaryColors        (), 
00315     _sfTexCoords              (), 
00316     _sfTexCoords1             (), 
00317     _sfTexCoords2             (), 
00318     _sfTexCoords3             (), 
00319     _sfIndices                (), 
00320     _mfIndexMapping           (), 
00321     _sfDlistCache             (bool(true)), 
00322     _sfGLId                   (Int32(0)), 
00323     Inherited() 
00324 {
00325 }

GeometryBase::GeometryBase const GeometryBase source  )  [protected]
 

Definition at line 331 of file OSGGeometryBase.cpp.

00331                                                      :
00332     _sfTypes                  (source._sfTypes                  ), 
00333     _sfLengths                (source._sfLengths                ), 
00334     _sfPositions              (source._sfPositions              ), 
00335     _sfNormals                (source._sfNormals                ), 
00336     _sfColors                 (source._sfColors                 ), 
00337     _sfSecondaryColors        (source._sfSecondaryColors        ), 
00338     _sfTexCoords              (source._sfTexCoords              ), 
00339     _sfTexCoords1             (source._sfTexCoords1             ), 
00340     _sfTexCoords2             (source._sfTexCoords2             ), 
00341     _sfTexCoords3             (source._sfTexCoords3             ), 
00342     _sfIndices                (source._sfIndices                ), 
00343     _mfIndexMapping           (source._mfIndexMapping           ), 
00344     _sfDlistCache             (source._sfDlistCache             ), 
00345     _sfGLId                   (source._sfGLId                   ), 
00346     Inherited                 (source)
00347 {
00348 }

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

Definition at line 352 of file OSGGeometryBase.cpp.

00353 {
00354 }


Member Function Documentation

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

Reimplemented from osg::MaterialDrawableBase.

Reimplemented in osg::DVRGeometryBase, and osg::SurfaceBase.

Definition at line 58 of file OSGGeometryBase.inl.

References _type.

Referenced by create(), osg::VRMLWriteAction::initializeAction(), osg::Geometry::initMethod(), osg::MergeGraphOp::processGeometries(), osg::MergeGraphOp::processGroups(), osg::MergeGraphOp::processTransformations(), osg::RemoteAspect::RemoteAspect(), osg::SplitGraphOp::splitNode(), and osg::VerifyGeoGraphOp::travNodeEnter().

00059 {
00060     return _type; 
00061 } 

osg::UInt32 osg::GeometryBase::getClassTypeId void   )  [inline, static]
 

Reimplemented from osg::MaterialDrawableBase.

Reimplemented in osg::DVRGeometryBase, and osg::SurfaceBase.

Definition at line 65 of file OSGGeometryBase.inl.

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

00066 {
00067     return _type.getId(); 
00068 } 

FieldContainerType & GeometryBase::getType void   )  [virtual]
 

Reimplemented from osg::MaterialDrawableBase.

Reimplemented in osg::DVRGeometryBase, and osg::SurfaceBase.

Definition at line 249 of file OSGGeometryBase.cpp.

References _type.

Referenced by osg::Geometry::dump().

00250 {
00251     return _type; 
00252 } 

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

Reimplemented from osg::MaterialDrawableBase.

Reimplemented in osg::DVRGeometryBase, and osg::SurfaceBase.

Definition at line 254 of file OSGGeometryBase.cpp.

References _type.

00255 {
00256     return _type;
00257 } 

UInt32 GeometryBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::MaterialDrawableBase.

Reimplemented in osg::DVRGeometryBase, and osg::SurfaceBase.

Definition at line 269 of file OSGGeometryBase.cpp.

00270 { 
00271     return sizeof(Geometry); 
00272 }

SFGeoPTypesPtr * osg::GeometryBase::getSFTypes void   )  [inline]
 

Definition at line 101 of file OSGGeometryBase.inl.

References _sfTypes.

00102 {
00103     return &_sfTypes;
00104 }

SFGeoPLengthsPtr * osg::GeometryBase::getSFLengths void   )  [inline]
 

Definition at line 108 of file OSGGeometryBase.inl.

References _sfLengths.

00109 {
00110     return &_sfLengths;
00111 }

SFGeoPositionsPtr * osg::GeometryBase::getSFPositions void   )  [inline]
 

Definition at line 115 of file OSGGeometryBase.inl.

References _sfPositions.

00116 {
00117     return &_sfPositions;
00118 }

SFGeoNormalsPtr * osg::GeometryBase::getSFNormals void   )  [inline]
 

Definition at line 122 of file OSGGeometryBase.inl.

References _sfNormals.

00123 {
00124     return &_sfNormals;
00125 }

SFGeoColorsPtr * osg::GeometryBase::getSFColors void   )  [inline]
 

Definition at line 129 of file OSGGeometryBase.inl.

References _sfColors.

00130 {
00131     return &_sfColors;
00132 }

SFGeoColorsPtr * osg::GeometryBase::getSFSecondaryColors void   )  [inline]
 

Definition at line 136 of file OSGGeometryBase.inl.

References _sfSecondaryColors.

00137 {
00138     return &_sfSecondaryColors;
00139 }

SFGeoTexCoordsPtr * osg::GeometryBase::getSFTexCoords void   )  [inline]
 

Definition at line 143 of file OSGGeometryBase.inl.

References _sfTexCoords.

00144 {
00145     return &_sfTexCoords;
00146 }

SFGeoTexCoordsPtr * osg::GeometryBase::getSFTexCoords1 void   )  [inline]
 

Definition at line 150 of file OSGGeometryBase.inl.

References _sfTexCoords1.

00151 {
00152     return &_sfTexCoords1;
00153 }

SFGeoTexCoordsPtr * osg::GeometryBase::getSFTexCoords2 void   )  [inline]
 

Definition at line 157 of file OSGGeometryBase.inl.

References _sfTexCoords2.

00158 {
00159     return &_sfTexCoords2;
00160 }

SFGeoTexCoordsPtr * osg::GeometryBase::getSFTexCoords3 void   )  [inline]
 

Definition at line 164 of file OSGGeometryBase.inl.

References _sfTexCoords3.

00165 {
00166     return &_sfTexCoords3;
00167 }

SFGeoIndicesPtr * osg::GeometryBase::getSFIndices void   )  [inline]
 

Definition at line 171 of file OSGGeometryBase.inl.

References _sfIndices.

00172 {
00173     return &_sfIndices;
00174 }

MFUInt16 * osg::GeometryBase::getMFIndexMapping void   )  [inline]
 

Definition at line 178 of file OSGGeometryBase.inl.

References _mfIndexMapping.

Referenced by osg::Geometry::clone(), and osg::Geometry::merge().

00179 {
00180     return &_mfIndexMapping;
00181 }

SFBool * osg::GeometryBase::getSFDlistCache void   )  [inline]
 

Definition at line 185 of file OSGGeometryBase.inl.

References _sfDlistCache.

00186 {
00187     return &_sfDlistCache;
00188 }

GeoPTypesPtr & osg::GeometryBase::getTypes void   )  [inline]
 

Definition at line 200 of file OSGGeometryBase.inl.

References _sfTypes, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::Surface::buildSurface(), osg::Geometry::clone(), osg::Geometry::drawPrimitives(), osg::Geometry::dump(), and osg::GeoPumpFactory::getIndex().

00201 {
00202     return _sfTypes.getValue();
00203 }

const GeoPTypesPtr & osg::GeometryBase::getTypes void   )  const [inline]
 

Definition at line 207 of file OSGGeometryBase.inl.

References _sfTypes, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00208 {
00209     return _sfTypes.getValue();
00210 }

GeoPLengthsPtr & osg::GeometryBase::getLengths void   )  [inline]
 

Definition at line 221 of file OSGGeometryBase.inl.

References _sfLengths, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::Surface::buildSurface(), osg::Geometry::clone(), osg::Geometry::dump(), and osg::GeoPumpFactory::getIndex().

00222 {
00223     return _sfLengths.getValue();
00224 }