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

osg::BlendChunkBase Class Reference

BlendChunk Base Class.

#include <OSGBlendChunkBase.h>

Inheritance diagram for osg::BlendChunkBase:

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

Public Types

typedef BlendChunkPtr Ptr
enum  {
  SrcFactorFieldId = Inherited::NextFieldId, DestFactorFieldId = SrcFactorFieldId + 1, EquationFieldId = DestFactorFieldId + 1, ColorFieldId = EquationFieldId + 1,
  AlphaFuncFieldId = ColorFieldId + 1, AlphaValueFieldId = AlphaFuncFieldId + 1, AlphaSrcFactorFieldId = AlphaValueFieldId + 1, AlphaDestFactorFieldId = AlphaSrcFactorFieldId + 1,
  NextFieldId = AlphaDestFactorFieldId + 1
}

Public Member Functions

FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFGLenumgetSFSrcFactor (void)
 Get the BlendChunk::_sfSrcFactor field.
SFGLenumgetSFDestFactor (void)
 Get the BlendChunk::_sfDestFactor field.
SFGLenumgetSFEquation (void)
 Get the BlendChunk::_sfEquation field.
SFColor4fgetSFColor (void)
 Get the BlendChunk::_sfColor field.
SFGLenumgetSFAlphaFunc (void)
 Get the BlendChunk::_sfAlphaFunc field.
SFReal32getSFAlphaValue (void)
 Get the BlendChunk::_sfAlphaValue field.
SFGLenumgetSFAlphaSrcFactor (void)
 Get the BlendChunk::_sfAlphaSrcFactor field.
SFGLenumgetSFAlphaDestFactor (void)
 Get the BlendChunk::_sfAlphaDestFactor field.
GLenumgetSrcFactor (void)
 Get the value of the BlendChunk::_sfSrcFactor field.
const GLenumgetSrcFactor (void) const
 Get the value of the BlendChunk::_sfSrcFactor field.
GLenumgetDestFactor (void)
 Get the value of the BlendChunk::_sfDestFactor field.
const GLenumgetDestFactor (void) const
 Get the value of the BlendChunk::_sfDestFactor field.
GLenumgetEquation (void)
 Get the value of the BlendChunk::_sfEquation field.
const GLenumgetEquation (void) const
 Get the value of the BlendChunk::_sfEquation field.
Color4fgetColor (void)
 Get the value of the BlendChunk::_sfColor field.
const Color4fgetColor (void) const
 Get the value of the BlendChunk::_sfColor field.
GLenumgetAlphaFunc (void)
 Get the value of the BlendChunk::_sfAlphaFunc field.
const GLenumgetAlphaFunc (void) const
 Get the value of the BlendChunk::_sfAlphaFunc field.
Real32getAlphaValue (void)
 Get the value of the BlendChunk::_sfAlphaValue field.
const Real32getAlphaValue (void) const
 Get the value of the BlendChunk::_sfAlphaValue field.
GLenumgetAlphaSrcFactor (void)
 Get the value of the BlendChunk::_sfAlphaSrcFactor field.
const GLenumgetAlphaSrcFactor (void) const
 Get the value of the BlendChunk::_sfAlphaSrcFactor field.
GLenumgetAlphaDestFactor (void)
 Get the value of the BlendChunk::_sfAlphaDestFactor field.
const GLenumgetAlphaDestFactor (void) const
 Get the value of the BlendChunk::_sfAlphaDestFactor field.
Field Set
*void setSrcFactor (const GLenum &value)
 Set the value of the BlendChunk::_sfSrcFactor field.
void setDestFactor (const GLenum &value)
 Set the value of the BlendChunk::_sfDestFactor field.
void setEquation (const GLenum &value)
 Set the value of the BlendChunk::_sfEquation field.
void setColor (const Color4f &value)
 Set the value of the BlendChunk::_sfColor field.
void setAlphaFunc (const GLenum &value)
 Set the value of the BlendChunk::_sfAlphaFunc field.
void setAlphaValue (const Real32 &value)
 Set the value of the BlendChunk::_sfAlphaValue field.
void setAlphaSrcFactor (const GLenum &value)
 Set the value of the BlendChunk::_sfAlphaSrcFactor field.
void setAlphaDestFactor (const GLenum &value)
 Set the value of the BlendChunk::_sfAlphaDestFactor 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)

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 BlendChunkPtr create (void)
 create a new instance of the class
static BlendChunkPtr 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)

Static Public Attributes

static const osg::BitVector SrcFactorFieldMask
static const osg::BitVector DestFactorFieldMask
static const osg::BitVector EquationFieldMask
static const osg::BitVector ColorFieldMask
static const osg::BitVector AlphaFuncFieldMask
static const osg::BitVector AlphaValueFieldMask
static const osg::BitVector AlphaSrcFactorFieldMask
static const osg::BitVector AlphaDestFactorFieldMask
static const osg::BitVector MTInfluenceMask
static const BitVector InternalFieldMask = (1 << Attachment::InternalFieldId)
static const BitVector ParentsFieldMask = (1 << Attachment::ParentsFieldId)
static const BitVector NextFieldMask

Protected Member Functions

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

Static Protected Member Functions

static void initMethod (void)

Protected Attributes

Fields
*SFGLenum _sfSrcFactor
SFGLenum _sfDestFactor
SFGLenum _sfEquation
SFColor4f _sfColor
SFGLenum _sfAlphaFunc
SFReal32 _sfAlphaValue
SFGLenum _sfAlphaSrcFactor
SFGLenum _sfAlphaDestFactor
Fields
*SFBool _sfInternal
MFFieldContainerPtr _parents

Private Types

typedef StateChunk Inherited

Private Member Functions

void operator= (const BlendChunkBase &source)

Static Private Attributes

static FieldDescription_desc []
 BlendChunk description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 88 of file OSGBlendChunkBase.h.


Member Typedef Documentation

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

Reimplemented from osg::StateChunk.

Reimplemented in osg::BlendChunk.

Definition at line 92 of file OSGBlendChunkBase.h.

typedef BlendChunkPtr osg::BlendChunkBase::Ptr
 

Reimplemented from osg::StateChunkBase.

Definition at line 97 of file OSGBlendChunkBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
SrcFactorFieldId 
DestFactorFieldId 
EquationFieldId 
ColorFieldId 
AlphaFuncFieldId 
AlphaValueFieldId 
AlphaSrcFactorFieldId 
AlphaDestFactorFieldId 
NextFieldId 

Reimplemented from osg::Attachment.

Definition at line 99 of file OSGBlendChunkBase.h.

00100     {
00101         SrcFactorFieldId       = Inherited::NextFieldId,
00102         DestFactorFieldId      = SrcFactorFieldId       + 1,
00103         EquationFieldId        = DestFactorFieldId      + 1,
00104         ColorFieldId           = EquationFieldId        + 1,
00105         AlphaFuncFieldId       = ColorFieldId           + 1,
00106         AlphaValueFieldId      = AlphaFuncFieldId       + 1,
00107         AlphaSrcFactorFieldId  = AlphaValueFieldId      + 1,
00108         AlphaDestFactorFieldId = AlphaSrcFactorFieldId  + 1,
00109         NextFieldId            = AlphaDestFactorFieldId + 1
00110     };


Constructor & Destructor Documentation

BlendChunkBase::BlendChunkBase void   )  [protected]
 

Definition at line 247 of file OSGBlendChunkBase.cpp.

00247                                    :
00248     _sfSrcFactor              (GLenum(GL_ONE)), 
00249     _sfDestFactor             (GLenum(GL_ZERO)), 
00250     _sfEquation               (GLenum(GL_NONE)), 
00251     _sfColor                  (Color4f(0,0,0,0)), 
00252     _sfAlphaFunc              (GLenum(GL_NONE)), 
00253     _sfAlphaValue             (Real32(0)), 
00254     _sfAlphaSrcFactor         (GLenum(OSG_GL_UNUSED)), 
00255     _sfAlphaDestFactor        (GLenum(OSG_GL_UNUSED)), 
00256     Inherited() 
00257 {
00258 }

BlendChunkBase::BlendChunkBase const BlendChunkBase source  )  [protected]
 

Definition at line 264 of file OSGBlendChunkBase.cpp.

00264                                                            :
00265     _sfSrcFactor              (source._sfSrcFactor              ), 
00266     _sfDestFactor             (source._sfDestFactor             ), 
00267     _sfEquation               (source._sfEquation               ), 
00268     _sfColor                  (source._sfColor                  ), 
00269     _sfAlphaFunc              (source._sfAlphaFunc              ), 
00270     _sfAlphaValue             (source._sfAlphaValue             ), 
00271     _sfAlphaSrcFactor         (source._sfAlphaSrcFactor         ), 
00272     _sfAlphaDestFactor        (source._sfAlphaDestFactor        ), 
00273     Inherited                 (source)
00274 {
00275 }

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

Definition at line 279 of file OSGBlendChunkBase.cpp.

00280 {
00281 }


Member Function Documentation

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

Reimplemented from osg::StateChunkBase.

Definition at line 58 of file OSGBlendChunkBase.inl.

References _type.

Referenced by create(), and modifyMaterial().

00059 {
00060     return _type; 
00061 } 

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

Reimplemented from osg::StateChunkBase.

Definition at line 65 of file OSGBlendChunkBase.inl.

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

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

FieldContainerType & BlendChunkBase::getType void   )  [virtual]
 

Reimplemented from osg::StateChunkBase.

Definition at line 189 of file OSGBlendChunkBase.cpp.

References _type.

00190 {
00191     return _type; 
00192 } 

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

Reimplemented from osg::StateChunkBase.

Definition at line 194 of file OSGBlendChunkBase.cpp.

References _type.

00195 {
00196     return _type;
00197 } 

UInt32 BlendChunkBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::StateChunkBase.

Definition at line 209 of file OSGBlendChunkBase.cpp.

00210 { 
00211     return sizeof(BlendChunk); 
00212 }

SFGLenum * osg::BlendChunkBase::getSFSrcFactor void   )  [inline]
 

Definition at line 101 of file OSGBlendChunkBase.inl.

References _sfSrcFactor.

00102 {
00103     return &_sfSrcFactor;
00104 }

SFGLenum * osg::BlendChunkBase::getSFDestFactor void   )  [inline]
 

Definition at line 108 of file OSGBlendChunkBase.inl.

References _sfDestFactor.

00109 {
00110     return &_sfDestFactor;
00111 }

SFGLenum * osg::BlendChunkBase::getSFEquation void   )  [inline]
 

Definition at line 115 of file OSGBlendChunkBase.inl.

References _sfEquation.

00116 {
00117     return &_sfEquation;
00118 }

SFColor4f * osg::BlendChunkBase::getSFColor void   )  [inline]
 

Definition at line 122 of file OSGBlendChunkBase.inl.

References _sfColor.

00123 {
00124     return &_sfColor;
00125 }

SFGLenum * osg::BlendChunkBase::getSFAlphaFunc void   )  [inline]
 

Definition at line 129 of file OSGBlendChunkBase.inl.

References _sfAlphaFunc.

00130 {
00131     return &_sfAlphaFunc;
00132 }

SFReal32 * osg::BlendChunkBase::getSFAlphaValue void   )  [inline]
 

Definition at line 136 of file OSGBlendChunkBase.inl.

References _sfAlphaValue.

00137 {
00138     return &_sfAlphaValue;
00139 }

SFGLenum * osg::BlendChunkBase::getSFAlphaSrcFactor void   )  [inline]
 

Definition at line 143 of file OSGBlendChunkBase.inl.

References _sfAlphaSrcFactor.

00144 {
00145     return &_sfAlphaSrcFactor;
00146 }

SFGLenum * osg::BlendChunkBase::getSFAlphaDestFactor void   )  [inline]
 

Definition at line 150 of file OSGBlendChunkBase.inl.

References _sfAlphaDestFactor.

00151 {
00152     return &_sfAlphaDestFactor;
00153 }

GLenum & osg::BlendChunkBase::getSrcFactor void   )  [inline]
 

Definition at line 158 of file OSGBlendChunkBase.inl.

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

Referenced by osg::BlendChunk::operator==().

00159 {
00160     return _sfSrcFactor.getValue();
00161 }

const GLenum & osg::BlendChunkBase::getSrcFactor void   )  const [inline]
 

Definition at line 165 of file OSGBlendChunkBase.inl.

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

00166 {
00167     return _sfSrcFactor.getValue();
00168 }

GLenum & osg::BlendChunkBase::getDestFactor void   )  [inline]
 

Definition at line 179 of file OSGBlendChunkBase.inl.

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

Referenced by osg::BlendChunk::isTransparent(), and osg::BlendChunk::operator==().

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

const GLenum & osg::BlendChunkBase::getDestFactor void   )  const [inline]
 

Definition at line 186 of file OSGBlendChunkBase.inl.

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

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

GLenum & osg::BlendChunkBase::getEquation void   )  [inline]
 

Definition at line 200 of file OSGBlendChunkBase.inl.

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

Referenced by osg::BlendChunk::operator==().

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

const GLenum & osg::BlendChunkBase::getEquation void   )  const [inline]
 

Definition at line 207 of file OSGBlendChunkBase.inl.

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

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

Color4f & osg::BlendChunkBase::getColor void   )  [inline]
 

Definition at line 221 of file OSGBlendChunkBase.inl.

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

Referenced by osg::BlendChunk::operator==().

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

const Color4f & osg::BlendChunkBase::getColor void   )  const [inline]
 

Definition at line 228 of file OSGBlendChunkBase.inl.

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

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

GLenum & osg::BlendChunkBase::getAlphaFunc void   )  [inline]
 

Definition at line 242 of file OSGBlendChunkBase.inl.

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

Referenced by osg::BlendChunk::operator==().

00243 {
00244     return _sfAlphaFunc.getValue();
00245 }

const GLenum & osg::BlendChunkBase::getAlphaFunc void   )  const [inline]
 

Definition at line 249 of file OSGBlendChunkBase.inl.

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

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

Real32 & osg::BlendChunkBase::getAlphaValue void   )  [inline]
 

Definition at line 263 of file OSGBlendChunkBase.inl.

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

Referenced by osg::BlendChunk::operator==().

00264 {
00265     return _sfAlphaValue.getValue();
00266 }

const Real32 & osg::BlendChunkBase::getAlphaValue void   )  const [inline]
 

Definition at line 270 of file OSGBlendChunkBase.inl.

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

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

GLenum & osg::BlendChunkBase::getAlphaSrcFactor void   )  [inline]
 

Definition at line 284 of file OSGBlendChunkBase.inl.

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

00285 {
00286     return _sfAlphaSrcFactor.getValue();
00287 }

const GLenum & osg::BlendChunkBase::getAlphaSrcFactor void   )  const [inline]
 

Definition at line 291 of file OSGBlendChunkBase.inl.

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

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

GLenum & osg::BlendChunkBase::getAlphaDestFactor void   )  [inline]
 

Definition at line 305 of file OSGBlendChunkBase.inl.

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

00306 {
00307     return _sfAlphaDestFactor.getValue();
00308 }

const GLenum & osg::BlendChunkBase::getAlphaDestFactor void   )  const [inline]
 

Definition at line 312 of file OSGBlendChunkBase.inl.

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

00313 {
00314     return _sfAlphaDestFactor.getValue();
00315 }

void osg::BlendChunkBase::setSrcFactor const GLenum value  )  [inline]
 

Definition at line 172 of file OSGBlendChunkBase.inl.

References _sfSrcFactor, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00173 {
00174     _sfSrcFactor.setValue(value);
00175 }

void osg::BlendChunkBase::setDestFactor const GLenum value  )  [inline]
 

Definition at line 193 of file OSGBlendChunkBase.inl.

References _sfDestFactor, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00194 {
00195     _sfDestFactor.setValue(value);
00196 }

void osg::BlendChunkBase::setEquation const GLenum value  )  [inline]
 

Definition at line 214 of file OSGBlendChunkBase.inl.

References _sfEquation, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00215 {
00216     _sfEquation.setValue(value);
00217 }

void osg::BlendChunkBase::setColor const Color4f value  )  [inline]
 

Definition at line 235 of file OSGBlendChunkBase.inl.

References _sfColor, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00236 {
00237     _sfColor.setValue(value);
00238 }

void osg::BlendChunkBase::setAlphaFunc const GLenum value  )  [inline]
 

Definition at line 256 of file OSGBlendChunkBase.inl.

References _sfAlphaFunc, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00257 {
00258     _sfAlphaFunc.setValue(value);
00259 }

void osg::BlendChunkBase::setAlphaValue const Real32 value  )  [inline]
 

Definition at line 277 of file OSGBlendChunkBase.inl.

References _sfAlphaValue, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00278 {
00279     _sfAlphaValue.setValue(value);
00280 }

void osg::BlendChunkBase::setAlphaSrcFactor const GLenum value  )  [inline]
 

Definition at line 298 of file OSGBlendChunkBase.inl.

References _sfAlphaSrcFactor, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00299 {
00300     _sfAlphaSrcFactor.setValue(value);
00301 }

void osg::BlendChunkBase::setAlphaDestFactor const GLenum value  )  [inline]
 

Definition at line 319 of file OSGBlendChunkBase.inl.

References _sfAlphaDestFactor, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00320 {
00321     _sfAlphaDestFactor.setValue(value);
00322 }

UInt32 BlendChunkBase::getBinSize const BitVector whichField  )  [virtual]
 

Reimplemented from osg::StateChunkBase.

Definition at line 285 of file OSGBlendChunkBase.cpp.

References _sfAlphaDestFactor, _sfAlphaFunc, _sfAlphaSrcFactor, _sfAlphaValue, _sfColor, _sfDestFactor, _sfEquation,