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

osg::ParticlesBase Class Reference

Particles Base Class.

#include <OSGParticlesBase.h>

Inheritance diagram for osg::ParticlesBase:

osg::MaterialDrawable osg::MaterialDrawableBase osg::Drawable osg::DrawableBase osg::NodeCore osg::AttachmentContainer osg::FieldContainer osg::Particles List of all members.

Public Types

typedef ParticlesPtr Ptr
enum  {
  ModeFieldId = Inherited::NextFieldId, PositionsFieldId = ModeFieldId + 1, SizesFieldId = PositionsFieldId + 1, SecPositionsFieldId = SizesFieldId + 1,
  ColorsFieldId = SecPositionsFieldId + 1, NormalsFieldId = ColorsFieldId + 1, IndicesFieldId = NormalsFieldId + 1, TextureZsFieldId = IndicesFieldId + 1,
  DrawOrderFieldId = TextureZsFieldId + 1, DynamicFieldId = DrawOrderFieldId + 1, PumpFieldId = DynamicFieldId + 1, BspFieldId = PumpFieldId + 1,
  NextFieldId = BspFieldId + 1
}

Public Member Functions

FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFUInt32getSFMode (void)
 Get the Particles::_sfMode field.
SFGeoPositionsPtrgetSFPositions (void)
 Get the Particles::_sfPositions field.
MFVec3fgetMFSizes (void)
 Get the Particles::_mfSizes field.
SFGeoPositionsPtrgetSFSecPositions (void)
 Get the Particles::_sfSecPositions field.
SFGeoColorsPtrgetSFColors (void)
 Get the Particles::_sfColors field.
SFGeoNormalsPtrgetSFNormals (void)
 Get the Particles::_sfNormals field.
MFInt32getMFIndices (void)
 Get the Particles::_mfIndices field.
MFReal32getMFTextureZs (void)
 Get the Particles::_mfTextureZs field.
SFUInt32getSFDrawOrder (void)
 Get the Particles::_sfDrawOrder field.
SFBoolgetSFDynamic (void)
 Get the Particles::_sfDynamic field.
SFParticleBSPTreegetSFBsp (void)
 Get the Particles::_sfBsp field.
UInt32getMode (void)
 Get the value of the Particles::_sfMode field.
const UInt32getMode (void) const
 Get the value of the Particles::_sfMode field.
GeoPositionsPtrgetPositions (void)
 Get the value of the Particles::_sfPositions field.
const GeoPositionsPtrgetPositions (void) const
 Get the value of the Particles::_sfPositions field.
GeoPositionsPtrgetSecPositions (void)
 Get the value of the Particles::_sfSecPositions field.
const GeoPositionsPtrgetSecPositions (void) const
 Get the value of the Particles::_sfSecPositions field.
GeoColorsPtrgetColors (void)
 Get the value of the Particles::_sfColors field.
const GeoColorsPtrgetColors (void) const
 Get the value of the Particles::_sfColors field.
GeoNormalsPtrgetNormals (void)
 Get the value of the Particles::_sfNormals field.
const GeoNormalsPtrgetNormals (void) const
 Get the value of the Particles::_sfNormals field.
UInt32getDrawOrder (void)
 Get the value of the Particles::_sfDrawOrder field.
const UInt32getDrawOrder (void) const
 Get the value of the Particles::_sfDrawOrder field.
bool & getDynamic (void)
 Get the value of the Particles::_sfDynamic field.
const bool & getDynamic (void) const
 Get the value of the Particles::_sfDynamic field.
ParticleBSPTreegetBsp (void)
 Get the value of the Particles::_sfBsp field.
const ParticleBSPTreegetBsp (void) const
 Get the value of the Particles::_sfBsp field.
Vec3fgetSizes (const UInt32 index)
 Get the value of the index element the Particles::_mfSizes field.
MFVec3fgetSizes (void)
 Get the Particles::_mfSizes field.
const MFVec3fgetSizes (void) const
 Get the Particles::_mfSizes field.
Int32getIndices (const UInt32 index)
 Get the value of the index element the Particles::_mfIndices field.
MFInt32getIndices (void)
 Get the Particles::_mfIndices field.
const MFInt32getIndices (void) const
 Get the Particles::_mfIndices field.
Real32getTextureZs (const UInt32 index)
 Get the value of the index element the Particles::_mfTextureZs field.
MFReal32getTextureZs (void)
 Get the Particles::_mfTextureZs field.
const MFReal32getTextureZs (void) const
 Get the Particles::_mfTextureZs field.
Field Set
*void setMode (const UInt32 &value)
 Set the value of the Particles::_sfMode field.
void setPositions (const GeoPositionsPtr &value)
 Set the value of the Particles::_sfPositions field.
void setSecPositions (const GeoPositionsPtr &value)
 Set the value of the Particles::_sfSecPositions field.
void setColors (const GeoColorsPtr &value)
 Set the value of the Particles::_sfColors field.
void setNormals (const GeoNormalsPtr &value)
 Set the value of the Particles::_sfNormals field.
void setDrawOrder (const UInt32 &value)
 Set the value of the Particles::_sfDrawOrder field.
void setDynamic (const bool &value)
 Set the value of the Particles::_sfDynamic field.
void setBsp (const ParticleBSPTree &value)
 Set the value of the Particles::_sfBsp 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.

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 ParticlesPtr create (void)
 create a new instance of the class
static ParticlesPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype

Static Public Attributes

static const osg::BitVector ModeFieldMask
static const osg::BitVector PositionsFieldMask
static const osg::BitVector SizesFieldMask
static const osg::BitVector SecPositionsFieldMask
static const osg::BitVector ColorsFieldMask
static const osg::BitVector NormalsFieldMask
static const osg::BitVector IndicesFieldMask
static const osg::BitVector TextureZsFieldMask
static const osg::BitVector DrawOrderFieldMask
static const osg::BitVector DynamicFieldMask
static const osg::BitVector PumpFieldMask
static const osg::BitVector BspFieldMask
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

Protected Member Functions

Constructors
ParticlesBase (void)
 ParticlesBase (const ParticlesBase &source)
Destructors
*virtual ~ParticlesBase (void)
Sync
*void executeSyncImpl (ParticlesBase *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)

Protected Attributes

Fields
*SFUInt32 _sfMode
SFGeoPositionsPtr _sfPositions
MFVec3f _mfSizes
SFGeoPositionsPtr _sfSecPositions
SFGeoColorsPtr _sfColors
SFGeoNormalsPtr _sfNormals
MFInt32 _mfIndices
MFReal32 _mfTextureZs
SFUInt32 _sfDrawOrder
SFBool _sfDynamic
SFParticleBSPTree _sfBsp
Fields
*SFMaterialPtr _sfMaterial

Private Types

typedef MaterialDrawable Inherited

Private Member Functions

void operator= (const ParticlesBase &source)
Field Get
*SFUInt32getSFPump (void)
 Get the Particles::_sfPump field.
UInt32getPump (void)
 Get the value of the Particles::_sfPump field.
const UInt32getPump (void) const
 Get the value of the Particles::_sfPump field.
Field Set
*void setPump (const UInt32 &value)
 Set the value of the Particles::_sfPump field.

Private Attributes

Fields
*SFUInt32 _sfPump

Static Private Attributes

static FieldDescription_desc []
 Particles description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 92 of file OSGParticlesBase.h.


Member Typedef Documentation

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

Reimplemented from osg::MaterialDrawable.

Reimplemented in osg::Particles.

Definition at line 96 of file OSGParticlesBase.h.

typedef ParticlesPtr osg::ParticlesBase::Ptr
 

Reimplemented from osg::MaterialDrawableBase.

Definition at line 101 of file OSGParticlesBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
ModeFieldId 
PositionsFieldId 
SizesFieldId 
SecPositionsFieldId 
ColorsFieldId 
NormalsFieldId 
IndicesFieldId 
TextureZsFieldId 
DrawOrderFieldId 
DynamicFieldId 
PumpFieldId 
BspFieldId 
NextFieldId 

Reimplemented from osg::MaterialDrawableBase.

Definition at line 103 of file OSGParticlesBase.h.

00104     {
00105         ModeFieldId         = Inherited::NextFieldId,
00106         PositionsFieldId    = ModeFieldId         + 1,
00107         SizesFieldId        = PositionsFieldId    + 1,
00108         SecPositionsFieldId = SizesFieldId        + 1,
00109         ColorsFieldId       = SecPositionsFieldId + 1,
00110         NormalsFieldId      = ColorsFieldId       + 1,
00111         IndicesFieldId      = NormalsFieldId      + 1,
00112         TextureZsFieldId    = IndicesFieldId      + 1,
00113         DrawOrderFieldId    = TextureZsFieldId    + 1,
00114         DynamicFieldId      = DrawOrderFieldId    + 1,
00115         PumpFieldId         = DynamicFieldId      + 1,
00116         BspFieldId          = PumpFieldId         + 1,
00117         NextFieldId         = BspFieldId          + 1
00118     };


Constructor & Destructor Documentation

ParticlesBase::ParticlesBase void   )  [protected]
 

Definition at line 288 of file OSGParticlesBase.cpp.

00288                                  :
00289     _sfMode                   (UInt32(2)), 
00290     _sfPositions              (), 
00291     _mfSizes                  (), 
00292     _sfSecPositions           (), 
00293     _sfColors                 (), 
00294     _sfNormals                (), 
00295     _mfIndices                (), 
00296     _mfTextureZs              (), 
00297     _sfDrawOrder              (UInt32(0)), 
00298     _sfDynamic                (bool(true)), 
00299     _sfPump                   (), 
00300     _sfBsp                    (), 
00301     Inherited() 
00302 {
00303 }

ParticlesBase::ParticlesBase const ParticlesBase source  )  [protected]
 

Definition at line 309 of file OSGParticlesBase.cpp.

00309                                                         :
00310     _sfMode                   (source._sfMode                   ), 
00311     _sfPositions              (source._sfPositions              ), 
00312     _mfSizes                  (source._mfSizes                  ), 
00313     _sfSecPositions           (source._sfSecPositions           ), 
00314     _sfColors                 (source._sfColors                 ), 
00315     _sfNormals                (source._sfNormals                ), 
00316     _mfIndices                (source._mfIndices                ), 
00317     _mfTextureZs              (source._mfTextureZs              ), 
00318     _sfDrawOrder              (source._sfDrawOrder              ), 
00319     _sfDynamic                (source._sfDynamic                ), 
00320     _sfPump                   (source._sfPump                   ), 
00321     _sfBsp                    (source._sfBsp                    ), 
00322     Inherited                 (source)
00323 {
00324 }

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

Definition at line 328 of file OSGParticlesBase.cpp.

00329 {
00330 }


Member Function Documentation

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

Reimplemented from osg::MaterialDrawableBase.

Definition at line 58 of file OSGParticlesBase.inl.

References _type.

Referenced by create(), and osg::Particles::initMethod().

00059 {
00060     return _type; 
00061 } 

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

Reimplemented from osg::MaterialDrawableBase.

Definition at line 65 of file OSGParticlesBase.inl.

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

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

FieldContainerType & ParticlesBase::getType void   )  [virtual]
 

Reimplemented from osg::MaterialDrawableBase.

Definition at line 227 of file OSGParticlesBase.cpp.

References _type.

00228 {
00229     return _type; 
00230 } 

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

Reimplemented from osg::MaterialDrawableBase.

Definition at line 232 of file OSGParticlesBase.cpp.

References _type.

00233 {
00234     return _type;
00235 } 

UInt32 ParticlesBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::MaterialDrawableBase.

Definition at line 247 of file OSGParticlesBase.cpp.

00248 { 
00249     return sizeof(Particles); 
00250 }

SFUInt32 * osg::ParticlesBase::getSFMode void   )  [inline]
 

Definition at line 101 of file OSGParticlesBase.inl.

References _sfMode.

00102 {
00103     return &_sfMode;
00104 }

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

Definition at line 108 of file OSGParticlesBase.inl.

References _sfPositions.

00109 {
00110     return &_sfPositions;
00111 }

MFVec3f * osg::ParticlesBase::getMFSizes void   )  [inline]
 

Definition at line 115 of file OSGParticlesBase.inl.

References _mfSizes.

Referenced by osg::Particles::adjustVolume(), osg::Particles::drawPrimitives(), SizeTraitParticle::init(), and SizeTraitGeneric::init().

00116 {
00117     return &_mfSizes;
00118 }

SFGeoPositionsPtr * osg::ParticlesBase::getSFSecPositions void   )  [inline]
 

Definition at line 122 of file OSGParticlesBase.inl.

References _sfSecPositions.

00123 {
00124     return &_sfSecPositions;
00125 }

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

Definition at line 129 of file OSGParticlesBase.inl.

References _sfColors.

00130 {
00131     return &_sfColors;
00132 }

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

Definition at line 136 of file OSGParticlesBase.inl.

References _sfNormals.

00137 {
00138     return &_sfNormals;
00139 }

MFInt32 * osg::ParticlesBase::getMFIndices void   )  [inline]
 

Definition at line 143 of file OSGParticlesBase.inl.

References _mfIndices.

Referenced by osg::ParticleBSPTree::build(), osg::Particles::calcIndex(), and osg::Particles::drawPrimitives().

00144 {
00145     return &_mfIndices;
00146 }

MFReal32 * osg::ParticlesBase::getMFTextureZs void   )  [inline]
 

Definition at line 150 of file OSGParticlesBase.inl.

References _mfTextureZs.

Referenced by TexTraitSingle::init(), TexTraitParticle::init(), and TexTraitGeneric::init().

00151 {
00152     return &_mfTextureZs;
00153 }

SFUInt32 * osg::ParticlesBase::getSFDrawOrder void   )  [inline]
 

Definition at line 157 of file OSGParticlesBase.inl.

References _sfDrawOrder.

00158 {
00159     return &_sfDrawOrder;
00160 }

SFBool * osg::ParticlesBase::getSFDynamic void   )  [inline]
 

Definition at line 164 of file OSGParticlesBase.inl.

References _sfDynamic.

00165 {
00166     return &_sfDynamic;
00167 }

SFParticleBSPTree * osg::ParticlesBase::getSFBsp void   )  [inline]
 

Definition at line 178 of file OSGParticlesBase.inl.

References _sfBsp.

00179 {
00180     return &_sfBsp;
00181 }

UInt32 & osg::ParticlesBase::getMode void   )  [inline]
 

Definition at line 186 of file OSGParticlesBase.inl.

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

Referenced by osg::Particles::calcIndex(), and osg::Particles::findDrawer().

00187 {
00188     return _sfMode.getValue();
00189 }

const UInt32 & osg::ParticlesBase::getMode void   )  const [inline]
 

Definition at line 193 of file OSGParticlesBase.inl.

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

00194 {
00195     return _sfMode.getValue();
00196 }

GeoPositionsPtr & osg::ParticlesBase::getPositions void   )  [inline]
 

Definition at line 207 of file OSGParticlesBase.inl.

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

Referenced by osg::Particles::adjustVolume(), osg::ParticleBSPTree::build(), osg::Particles::calcIndex(), drawViewerObjects< posTrait, colTrait, sizeTrait, geoTrait >::draw(), drawObjects< posTrait, colTrait, sizeTrait, normalTrait, geoTrait >::draw(), drawPoints< posTrait, colTrait, texTrait, sizeTrait >::draw(), drawLines< posTrait, colTrait, texTrait, sizeTrait >::draw(), drawViewerQuads< posTrait, colTrait, texTrait, sizeTrait >::draw(), drawViewDirQuads< posTrait, colTrait, texTrait, sizeTrait >::draw(), drawViewerObjects< posTrait, colTrait, sizeTrait, geoTrait >::drawIndexed(), drawObjects< posTrait, colTrait, sizeTrait, normalTrait, geoTrait >::drawIndexed(), drawPoints< posTrait, colTrait, texTrait, sizeTrait >::drawIndexed(), drawLines< posTrait, colTrait, texTrait, sizeTrait >::drawIndexed(), drawViewerQuads< posTrait, colTrait, texTrait, sizeTrait >::drawIndexed(), drawViewDirQuads< posTrait, colTrait, texTrait, sizeTrait >::drawIndexed(), osg::Particles::drawPrimitives(), osg::Particles::findDrawer(), NormalTraitGeneric3f::init(), NormalTraitGeneric::init(), TexTraitGeneric::init(), SizeTraitGeneric::init(), and ColTraitGeneric::init().

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

const GeoPositionsPtr & osg::ParticlesBase::getPositions void   )  const [inline]
 

Definition at line 214 of file OSGParticlesBase.inl.

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

00215 {
00216     return _sfPositions.getValue();
00217 }

GeoPositionsPtr & osg::ParticlesBase::getSecPositions void   )  [inline]
 

Definition at line 228 of file OSGParticlesBase.inl.

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

Referenced by drawViewerObjects< posTrait, colTrait, sizeTrait, geoTrait >::draw(), drawObjects< posTrait, colTrait, sizeTrait, normalTrait, geoTrait >::draw(), drawLines< posTrait, colTrait, texTrait, sizeTrait >::draw(), drawViewerObjects< posTrait, colTrait, sizeTrait, geoTrait >::drawIndexed(), drawObjects< posTrait, colTrait, sizeTrait, normalTrait, geoTrait >::drawIndexed(), and drawLines< posTrait, colTrait, texTrait, sizeTrait >::drawIndexed().

00229 {
00230     return _sfSecPositions.getValue();
00231 }

const GeoPositionsPtr & osg::ParticlesBase::getSecPositions void   )  const [inline]
 

Definition at line 235 of file OSGParticlesBase.inl.

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

00236 {
00237     return _sfSecPositions.getValue();
00238 }

GeoColorsPtr & osg::ParticlesBase::getColors void   )  [inline]
 

Definition at line 249 of file OSGParticlesBase.inl.

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

Referenced by osg::Particles::drawPrimitives(), osg::Particles::findDrawer(), ColTraitGeneric::init(), ColTraitParticle::init(), and ColTraitSingle::init().

00250 {
00251     return _sfColors.getValue();
00252 }

const GeoColorsPtr & osg::ParticlesBase::getColors void   )  const [inline]
 

Definition at line 256 of file OSGParticlesBase.inl.

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

00257 {
00258     return _sfColors.getValue();
00259 }

GeoNormalsPtr & osg::ParticlesBase::getNormals void   )  [inline]
 

Definition at line 270 of file OSGParticlesBase.inl.

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

Referenced by osg::Particles::drawPrimitives(), osg::Particles::findDrawer(), NormalTraitGeneric3f::init(), and NormalTraitGeneric::init().

00271 {
00272     return _sfNormals.getValue();
00273 }

const GeoNormalsPtr & osg::ParticlesBase::getNormals void   )  const [inline]
 

Definition at line 277 of file OSGParticlesBase.inl.

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

00278 {
00279     return _sfNormals.getValue();
00280 }

UInt32 & osg::ParticlesBase::getDrawOrder void   )  [inline]
 

Definition at line 291 of file OSGParticlesBase.inl.

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

Referenced by osg::Particles::calcIndex().

00292 {
00293     return _sfDrawOrder.getValue();
00294 }

const UInt32 & osg::ParticlesBase::getDrawOrder void   )  const [inline]
 

Definition at line 298 of file OSGParticlesBase.inl.

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

00299 {
00300     return _sfDrawOrder.getValue();
00301 }

bool & osg::ParticlesBase::getDynamic void   )  [inline]
 

Definition at line 312 of file OSGParticlesBase.inl.

References _sfDynamic, and