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

osg::PointChunkBase Class Reference

PointChunk Base Class.

#include <OSGPointChunkBase.h>

Inheritance diagram for osg::PointChunkBase:

osg::StateChunk osg::StateChunkBase osg::Attachment osg::FieldContainer osg::PointChunk List of all members.

Public Types

typedef PointChunkPtr Ptr
enum  {
  SizeFieldId = Inherited::NextFieldId, SmoothFieldId = SizeFieldId + 1, MinSizeFieldId = SmoothFieldId + 1, MaxSizeFieldId = MinSizeFieldId + 1,
  ConstantAttenuationFieldId = MaxSizeFieldId + 1, LinearAttenuationFieldId = ConstantAttenuationFieldId + 1, QuadraticAttenuationFieldId = LinearAttenuationFieldId + 1, FadeThresholdFieldId = QuadraticAttenuationFieldId + 1,
  SpriteFieldId = FadeThresholdFieldId + 1, RModeFieldId = SpriteFieldId + 1, NextFieldId = RModeFieldId + 1
}

Public Member Functions

Chunk Class Access
*UInt32 getClassId (void) const
virtual const StateChunkClassgetClass (void) const
Sync
*virtual void changed (BitVector whichField, UInt32 origin)
Output
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
State
*virtual void activate (DrawActionBase *action, UInt32 index=0)
virtual void changeFrom (DrawActionBase *action, StateChunk *old, UInt32 index=0)
virtual void deactivate (DrawActionBase *action, UInt32 index=0)
virtual bool isTransparent (void) const
Comparison
*virtual Real32 switchCost (StateChunk *chunk)
virtual bool operator< (const StateChunk &other) const
virtual bool operator== (const StateChunk &other) const
virtual bool operator!= (const StateChunk &other) const
Parents
*MFFieldContainerPtrgetParents (void)
const MFFieldContainerPtrgetParents (void) const
MFFieldContainerPtrgetMFParents (void)
void addParent (FieldContainerPtr parent)
void subParent (FieldContainerPtr parent)
Int32 findParent (FieldContainerPtr parent)
Parents
*SFBoolgetInternal (void)
const SFBoolgetInternal (void) const
SFBoolgetSFInternal (void)
void setInternal (bool bVal)
Get Instance Type Information
UInt32 getTypeId (void) const
UInt16 getGroupId (void) const
const Char8getTypeName (void) const
Generic Field Access *FieldgetField (UInt32 fieldId)
FieldgetField (const Char8 *fieldName)
FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFReal32getSFSize (void)
 Get the PointChunk::_sfSize field.
SFBoolgetSFSmooth (void)
 Get the PointChunk::_sfSmooth field.
SFReal32getSFMinSize (void)
 Get the PointChunk::_sfMinSize field.
SFReal32getSFMaxSize (void)
 Get the PointChunk::_sfMaxSize field.
SFReal32getSFConstantAttenuation (void)
 Get the PointChunk::_sfConstantAttenuation field.
SFReal32getSFLinearAttenuation (void)
 Get the PointChunk::_sfLinearAttenuation field.
SFReal32getSFQuadraticAttenuation (void)
 Get the PointChunk::_sfQuadraticAttenuation field.
SFReal32getSFFadeThreshold (void)
 Get the PointChunk::_sfFadeThreshold field.
SFBoolgetSFSprite (void)
 Get the PointChunk::_sfSprite field.
SFGLenumgetSFRMode (void)
 Get the PointChunk::_sfRMode field.
Real32getSize (void)
 Get the value of the PointChunk::_sfSize field.
const Real32getSize (void) const
 Get the value of the PointChunk::_sfSize field.
bool & getSmooth (void)
 Get the value of the PointChunk::_sfSmooth field.
const bool & getSmooth (void) const
 Get the value of the PointChunk::_sfSmooth field.
Real32getMinSize (void)
 Get the value of the PointChunk::_sfMinSize field.
const Real32getMinSize (void) const
 Get the value of the PointChunk::_sfMinSize field.
Real32getMaxSize (void)
 Get the value of the PointChunk::_sfMaxSize field.
const Real32getMaxSize (void) const
 Get the value of the PointChunk::_sfMaxSize field.
Real32getConstantAttenuation (void)
 Get the value of the PointChunk::_sfConstantAttenuation field.
const Real32getConstantAttenuation (void) const
 Get the value of the PointChunk::_sfConstantAttenuation field.
Real32getLinearAttenuation (void)
 Get the value of the PointChunk::_sfLinearAttenuation field.
const Real32getLinearAttenuation (void) const
 Get the value of the PointChunk::_sfLinearAttenuation field.
Real32getQuadraticAttenuation (void)
 Get the value of the PointChunk::_sfQuadraticAttenuation field.
const Real32getQuadraticAttenuation (void) const
 Get the value of the PointChunk::_sfQuadraticAttenuation field.
Real32getFadeThreshold (void)
 Get the value of the PointChunk::_sfFadeThreshold field.
const Real32getFadeThreshold (void) const
 Get the value of the PointChunk::_sfFadeThreshold field.
bool & getSprite (void)
 Get the value of the PointChunk::_sfSprite field.
const bool & getSprite (void) const
 Get the value of the PointChunk::_sfSprite field.
GLenumgetRMode (void)
 Get the value of the PointChunk::_sfRMode field.
const GLenumgetRMode (void) const
 Get the value of the PointChunk::_sfRMode field.
Field Set
*void setSize (const Real32 &value)
 Set the value of the PointChunk::_sfSize field.
void setSmooth (const bool &value)
 Set the value of the PointChunk::_sfSmooth field.
void setMinSize (const Real32 &value)
 Set the value of the PointChunk::_sfMinSize field.
void setMaxSize (const Real32 &value)
 Set the value of the PointChunk::_sfMaxSize field.
void setConstantAttenuation (const Real32 &value)
 Set the value of the PointChunk::_sfConstantAttenuation field.
void setLinearAttenuation (const Real32 &value)
 Set the value of the PointChunk::_sfLinearAttenuation field.
void setQuadraticAttenuation (const Real32 &value)
 Set the value of the PointChunk::_sfQuadraticAttenuation field.
void setFadeThreshold (const Real32 &value)
 Set the value of the PointChunk::_sfFadeThreshold field.
void setSprite (const bool &value)
 Set the value of the PointChunk::_sfSprite field.
void setRMode (const GLenum &value)
 Set the value of the PointChunk::_sfRMode 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
Chunk Class Access
*UInt32 getClassId (void) const
virtual const StateChunkClassgetClass (void) const
Sync
*virtual void changed (BitVector whichField, UInt32 origin)
Output
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
State
*virtual void activate (DrawActionBase *action, UInt32 index=0)
virtual void changeFrom (DrawActionBase *action, StateChunk *old, UInt32 index=0)
virtual void deactivate (DrawActionBase *action, UInt32 index=0)
virtual bool isTransparent (void) const
Comparison
*virtual Real32 switchCost (StateChunk *chunk)
virtual bool operator< (const StateChunk &other) const
virtual bool operator== (const StateChunk &other) const
virtual bool operator!= (const StateChunk &other) const
Parents
*MFFieldContainerPtrgetParents (void)
const MFFieldContainerPtrgetParents (void) const
MFFieldContainerPtrgetMFParents (void)
void addParent (FieldContainerPtr parent)
void subParent (FieldContainerPtr parent)
Int32 findParent (FieldContainerPtr parent)
Parents
*SFBoolgetInternal (void)
const SFBoolgetInternal (void) const
SFBoolgetSFInternal (void)
void setInternal (bool bVal)
Get Instance Type Information
UInt32 getTypeId (void) const
UInt16 getGroupId (void) const
const Char8getTypeName (void) const
Generic Field Access *FieldgetField (UInt32 fieldId)
FieldgetField (const Char8 *fieldName)

Static Public Member Functions

Static Chunk Class Access
*static UInt32 getStaticClassId (void)
static const StateChunkClassgetStaticClass (void)
Get Class Type Information
static UInt16 getClassGroupId (void)
Class Get
*static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
Construction
*static PointChunkPtr create (void)
 create a new instance of the class
static PointChunkPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype
Static Chunk Class Access
*static UInt32 getStaticClassId (void)
static const StateChunkClassgetStaticClass (void)
Get Class Type Information
static UInt16 getClassGroupId (void)

Static Public Attributes

static const osg::BitVector SizeFieldMask
static const osg::BitVector SmoothFieldMask
static const osg::BitVector MinSizeFieldMask
static const osg::BitVector MaxSizeFieldMask
static const osg::BitVector ConstantAttenuationFieldMask
static const osg::BitVector LinearAttenuationFieldMask
static const osg::BitVector QuadraticAttenuationFieldMask
static const osg::BitVector FadeThresholdFieldMask
static const osg::BitVector SpriteFieldMask
static const osg::BitVector RModeFieldMask
static const osg::BitVector MTInfluenceMask
static const BitVector InternalFieldMask = (1 << Attachment::InternalFieldId)
static const BitVector ParentsFieldMask = (1 << Attachment::ParentsFieldId)
static const BitVector NextFieldMask
CoredNodePtr helper
static const bool isNodeCore = false
CoredNodePtr helper
static const bool isNodeCore = false

Protected Member Functions

Sync
*void executeSyncImpl (StateChunkBase *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (Attachment *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (FieldContainer *pOther, const BitVector &whichField)
MT Destruction
*virtual void onDestroy (void)
MT Edit
template<class FieldTypeT>
*void beginEditX (const BitVector &whichField, FieldTypeT &field)
template<class FieldTypeT>
void endEditX (const BitVector &whichField, FieldTypeT &field)
MT Construction
*void onCreate (const FieldContainer *source=NULL)
void onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL)
Constructors
PointChunkBase (void)
 PointChunkBase (const PointChunkBase &source)
Destructors
*virtual ~PointChunkBase (void)
Sync
*void executeSyncImpl (PointChunkBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)
Sync
*void executeSyncImpl (StateChunkBase *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (Attachment *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (FieldContainer *pOther, const BitVector &whichField)
MT Destruction
*virtual void onDestroy (void)
MT Edit
template<class FieldTypeT>
*void beginEditX (const BitVector &whichField, FieldTypeT &field)
template<class FieldTypeT>
void endEditX (const BitVector &whichField, FieldTypeT &field)
MT Construction
*void onCreate (const FieldContainer *source=NULL)
void onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL)

Static Protected Member Functions

static void initMethod (void)
Create Fieldcontainer
template<class ObjectPtrT>
*static void newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP)
template<class ObjectPtrT>
static void newPtr (ObjectPtrT &result)
Create Fieldcontainer
template<class ObjectPtrT>
*static void newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP)
template<class ObjectPtrT>
static void newPtr (ObjectPtrT &result)

Protected Attributes

Fields
*SFBool _sfInternal
MFFieldContainerPtr _parents
Member
*UInt32 _shares
Fields
*SFReal32 _sfSize
SFBool _sfSmooth
SFReal32 _sfMinSize
SFReal32 _sfMaxSize
SFReal32 _sfConstantAttenuation
SFReal32 _sfLinearAttenuation
SFReal32 _sfQuadraticAttenuation
SFReal32 _sfFadeThreshold
SFBool _sfSprite
SFGLenum _sfRMode
Fields
*SFBool _sfInternal
MFFieldContainerPtr _parents
Member
*UInt32 _shares

Private Types

typedef StateChunk Inherited

Private Member Functions

void operator= (const PointChunkBase &source)

Static Private Attributes

static FieldDescription_desc []
 PointChunk description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 90 of file OSGPointChunkBase.h.


Member Typedef Documentation

typedef StateChunk osg::PointChunkBase::Inherited [private]
 

Reimplemented from osg::StateChunk.

Reimplemented in osg::PointChunk.

Definition at line 94 of file OSGPointChunkBase.h.

typedef PointChunkPtr osg::PointChunkBase::Ptr
 

Reimplemented from osg::StateChunkBase.

Definition at line 99 of file OSGPointChunkBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
SizeFieldId 
SmoothFieldId 
MinSizeFieldId 
MaxSizeFieldId 
ConstantAttenuationFieldId 
LinearAttenuationFieldId 
QuadraticAttenuationFieldId 
FadeThresholdFieldId 
SpriteFieldId 
RModeFieldId 
NextFieldId 

Reimplemented from osg::Attachment.

Definition at line 101 of file OSGPointChunkBase.h.

00102     {
00103         SizeFieldId                 = Inherited::NextFieldId,
00104         SmoothFieldId               = SizeFieldId                 + 1,
00105         MinSizeFieldId              = SmoothFieldId               + 1,
00106         MaxSizeFieldId              = MinSizeFieldId              + 1,
00107         ConstantAttenuationFieldId  = MaxSizeFieldId              + 1,
00108         LinearAttenuationFieldId    = ConstantAttenuationFieldId  + 1,
00109         QuadraticAttenuationFieldId = LinearAttenuationFieldId    + 1,
00110         FadeThresholdFieldId        = QuadraticAttenuationFieldId + 1,
00111         SpriteFieldId               = FadeThresholdFieldId        + 1,
00112         RModeFieldId                = SpriteFieldId               + 1,
00113         NextFieldId                 = RModeFieldId                + 1
00114     };


Constructor & Destructor Documentation

PointChunkBase::PointChunkBase void   )  [protected]
 

Definition at line 266 of file OSGPointChunkBase.cpp.

00266                                    :
00267     _sfSize                   (Real32(1)), 
00268     _sfSmooth                 (bool(GL_FALSE)), 
00269     _sfMinSize                (Real32(-1.f)), 
00270     _sfMaxSize                (Real32(-1.f)), 
00271     _sfConstantAttenuation    (Real32(1)), 
00272     _sfLinearAttenuation      (Real32(0)), 
00273     _sfQuadraticAttenuation   (Real32(0)), 
00274     _sfFadeThreshold          (Real32(0.f)), 
00275     _sfSprite                 (bool(GL_FALSE)), 
00276     _sfRMode                  (GLenum(GL_ZERO)), 
00277     Inherited() 
00278 {
00279 }

PointChunkBase::PointChunkBase const PointChunkBase source  )  [protected]
 

Definition at line 285 of file OSGPointChunkBase.cpp.

00285                                                            :
00286     _sfSize                   (source._sfSize                   ), 
00287     _sfSmooth                 (source._sfSmooth                 ), 
00288     _sfMinSize                (source._sfMinSize                ), 
00289     _sfMaxSize                (source._sfMaxSize                ), 
00290     _sfConstantAttenuation    (source._sfConstantAttenuation    ), 
00291     _sfLinearAttenuation      (source._sfLinearAttenuation      ), 
00292     _sfQuadraticAttenuation   (source._sfQuadraticAttenuation   ), 
00293     _sfFadeThreshold          (source._sfFadeThreshold          ), 
00294     _sfSprite                 (source._sfSprite                 ), 
00295     _sfRMode                  (source._sfRMode                  ), 
00296     Inherited                 (source)
00297 {
00298 }

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

Definition at line 302 of file OSGPointChunkBase.cpp.

00303 {
00304 }


Member Function Documentation

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

Reimplemented from osg::StateChunkBase.

Definition at line 58 of file OSGPointChunkBase.inl.

References _type.

Referenced by create().

00059 {
00060     return _type; 
00061 } 

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

Reimplemented from osg::StateChunkBase.

Definition at line 65 of file OSGPointChunkBase.inl.

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

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

FieldContainerType & PointChunkBase::getType void   )  [virtual]
 

Reimplemented from osg::StateChunkBase.

Definition at line 208 of file OSGPointChunkBase.cpp.

References _type.

00209 {
00210     return _type; 
00211 } 

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

Reimplemented from osg::StateChunkBase.

Definition at line 213 of file OSGPointChunkBase.cpp.

References _type.

00214 {
00215     return _type;
00216 } 

UInt32 PointChunkBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::StateChunkBase.

Definition at line 228 of file OSGPointChunkBase.cpp.

00229 { 
00230     return sizeof(PointChunk); 
00231 }

SFReal32 * osg::PointChunkBase::getSFSize void   )  [inline]
 

Definition at line 101 of file OSGPointChunkBase.inl.

References _sfSize.

00102 {
00103     return &_sfSize;
00104 }

SFBool * osg::PointChunkBase::getSFSmooth void   )  [inline]
 

Definition at line 108 of file OSGPointChunkBase.inl.

References _sfSmooth.

00109 {
00110     return &_sfSmooth;
00111 }

SFReal32 * osg::PointChunkBase::getSFMinSize void   )  [inline]
 

Definition at line 115 of file OSGPointChunkBase.inl.

References _sfMinSize.

00116 {
00117     return &_sfMinSize;
00118 }

SFReal32 * osg::PointChunkBase::getSFMaxSize void   )  [inline]
 

Definition at line 122 of file OSGPointChunkBase.inl.

References _sfMaxSize.

00123 {
00124     return &_sfMaxSize;
00125 }

SFReal32 * osg::PointChunkBase::getSFConstantAttenuation void   )  [inline]
 

Definition at line 129 of file OSGPointChunkBase.inl.

References _sfConstantAttenuation.

00130 {
00131     return &_sfConstantAttenuation;
00132 }

SFReal32 * osg::PointChunkBase::getSFLinearAttenuation void   )  [inline]
 

Definition at line 136 of file OSGPointChunkBase.inl.

References _sfLinearAttenuation.

00137 {
00138     return &_sfLinearAttenuation;
00139 }

SFReal32 * osg::PointChunkBase::getSFQuadraticAttenuation void   )  [inline]
 

Definition at line 143 of file OSGPointChunkBase.inl.

References _sfQuadraticAttenuation.

00144 {
00145     return &_sfQuadraticAttenuation;
00146 }

SFReal32 * osg::PointChunkBase::getSFFadeThreshold void   )  [inline]
 

Definition at line 150 of file OSGPointChunkBase.inl.

References _sfFadeThreshold.

00151 {
00152     return &_sfFadeThreshold;
00153 }

SFBool * osg::PointChunkBase::getSFSprite void   )  [inline]
 

Definition at line 157 of file OSGPointChunkBase.inl.

References _sfSprite.

00158 {
00159     return &_sfSprite;
00160 }

SFGLenum * osg::PointChunkBase::getSFRMode void   )  [inline]
 

Definition at line 164 of file OSGPointChunkBase.inl.

References _sfRMode.

00165 {
00166     return &_sfRMode;
00167 }

Real32 & osg::PointChunkBase::getSize void   )  [inline]
 

Definition at line 172 of file OSGPointChunkBase.inl.

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

Referenced by osg::PointChunk::activate(), osg::PointChunk::changeFrom(), osg::PointChunk::deactivate(), and osg::PointChunk::operator==().

00173 {
00174     return _sfSize.getValue();
00175 }

const Real32 & osg::PointChunkBase::getSize void   )  const [inline]
 

Definition at line 179 of file OSGPointChunkBase.inl.

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

00180 {
00181     return _sfSize.getValue();
00182 }

bool & osg::PointChunkBase::getSmooth void   )  [inline]
 

Definition at line 193 of file OSGPointChunkBase.inl.

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

Referenced by osg::PointChunk::activate(), osg::PointChunk::changeFrom(), osg::PointChunk::deactivate(), and osg::PointChunk::operator==().

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

const bool & osg::PointChunkBase::getSmooth void   )  const [inline]
 

Definition at line 200 of file OSGPointChunkBase.inl.

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

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

Real32 & osg::PointChunkBase::getMinSize void   )  [inline]
 

Definition at line 214 of file OSGPointChunkBase.inl.

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

Referenced by osg::PointChunk::activate(), osg::PointChunk::changeFrom(), osg::PointChunk::deactivate(), osg::PointChunk::isTransparent(), and osg::PointChunk::operator==().

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

const Real32 & osg::PointChunkBase::getMinSize void   )  const [inline]
 

Definition at line 221 of file OSGPointChunkBase.inl.

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

00222 {
00223     return _