OSG::BlendChunkBase Class Reference

BlendChunk Base Class.

#include <OSGBlendChunkBase.h>

Inheritance diagram for OSG::BlendChunkBase:

OSG::StateChunk OSG::StateChunkBase OSG::FieldContainerAttachment OSG::FieldContainer OSG::ReflexiveContainer OSG::BlendChunk List of all members.

Type definitions



static const bool isNodeCore = false
 OSG_GEN_INTERNALPTR (FieldContainer)
 OSG_RC_FIRST_FIELD_DECL (ChangedCallbacks)
 OSG_RC_LAST_FIELD_DECL (ChangedCallbacks)

Public Types

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
}
typedef StateChunk Inherited
typedef StateChunk ParentContainer
typedef Inherited::TypeObject TypeObject
typedef TypeObject::InitPhase InitPhase
enum  { IgnoreFieldId = Inherited::NextFieldId, NextFieldId = IgnoreFieldId + 1 }
Type definitions


typedef Field *(ReflexiveContainer::*) FieldEditMethod (void)
typedef const Field *(ReflexiveContainer::*) FieldGetMethod (void) const

Public Member Functions

 OSG_GEN_INTERNALPTR (BlendChunk)
 OSG_GEN_INTERNALPTR (StateChunk)
FieldContainer Get


virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get


SFGLenum * editSFSrcFactor (void)
const SFGLenum * getSFSrcFactor (void) const
SFGLenum * editSFDestFactor (void)
const SFGLenum * getSFDestFactor (void) const
SFGLenum * editSFEquation (void)
const SFGLenum * getSFEquation (void) const
SFColor4f * editSFColor (void)
const SFColor4f * getSFColor (void) const
SFGLenum * editSFAlphaFunc (void)
const SFGLenum * getSFAlphaFunc (void) const
SFReal32 * editSFAlphaValue (void)
const SFReal32 * getSFAlphaValue (void) const
SFGLenum * editSFAlphaSrcFactor (void)
const SFGLenum * getSFAlphaSrcFactor (void) const
SFGLenum * editSFAlphaDestFactor (void)
const SFGLenum * getSFAlphaDestFactor (void) const
GLenum & editSrcFactor (void)
 Get the value of the BlendChunk::_sfSrcFactor field.
const GLenum & getSrcFactor (void) const
 Get the value of the BlendChunk::_sfSrcFactor field.
GLenum & editDestFactor (void)
 Get the value of the BlendChunk::_sfDestFactor field.
const GLenum & getDestFactor (void) const
 Get the value of the BlendChunk::_sfDestFactor field.
GLenum & editEquation (void)
 Get the value of the BlendChunk::_sfEquation field.
const GLenum & getEquation (void) const
 Get the value of the BlendChunk::_sfEquation field.
Color4feditColor (void)
 Get the value of the BlendChunk::_sfColor field.
const Color4fgetColor (void) const
 Get the value of the BlendChunk::_sfColor field.
GLenum & editAlphaFunc (void)
 Get the value of the BlendChunk::_sfAlphaFunc field.
const GLenum & getAlphaFunc (void) const
 Get the value of the BlendChunk::_sfAlphaFunc field.
Real32 & editAlphaValue (void)
 Get the value of the BlendChunk::_sfAlphaValue field.
const Real32 & getAlphaValue (void) const
 Get the value of the BlendChunk::_sfAlphaValue field.
GLenum & editAlphaSrcFactor (void)
 Get the value of the BlendChunk::_sfAlphaSrcFactor field.
const GLenum & getAlphaSrcFactor (void) const
 Get the value of the BlendChunk::_sfAlphaSrcFactor field.
GLenum & editAlphaDestFactor (void)
 Get the value of the BlendChunk::_sfAlphaDestFactor field.
const GLenum & getAlphaDestFactor (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 (ConstFieldMaskArg whichField)
virtual void copyToBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField)
virtual void copyFromBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField)
Copy


virtual FieldContainerPtr shallowCopy (void) const
Chunk Class Access


UInt32 getClassId (void) const
virtual const StateChunkClassgetClass (void) const
Chunk Id


virtual UInt16 getChunkId (void)
Sync


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


virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
State


virtual void update (DrawEnv *pEnv)
virtual void activate (DrawEnv *pEnv, UInt32 index=0)=0
virtual void changeFrom (DrawEnv *pEnv, StateChunk *pOld, UInt32 index=0)=0
virtual void deactivate (DrawEnv *pEnv, UInt32 index=0)=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
dcast


 OSG_GEN_INTERNALPTR (FieldContainerAttachment)
Field Get


SFBool * editSFIgnore (void)
const SFBool * getSFIgnore (void) const
bool & editIgnore (void)
 Get the value of the StateChunk::_sfIgnore field.
const bool & getIgnore (void) const
 Get the value of the StateChunk::_sfIgnore field.
Field Set


void setIgnore (const bool &value)
 Set the value of the StateChunk::_sfIgnore field.
Constructors


 OSG_RC_FIRST_FIELD_DECL (Parents)
 OSG_RC_FIELD_DECL (Internal, Parents)
 OSG_RC_LAST_FIELD_DECL (Internal)
Get


SFBool & editInternal (void)
const SFBool & getInternal (void) const
SFBool * editSFInternal (void)
const SFBool * getSFInternal (void) const
Set


void setInternal (bool bVal)
your_category


void addParent (FieldContainerPtrConst parent, const UInt16 uiStoredInFieldId=InvalidParentEPos)
void subParent (FieldContainerPtrConst parent)
Container Access


FieldContainerPtr getParent (UInt32 uiIdx)
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
Comparison


virtual OSG_SYSTEM_DLLMAPPING
void 
invalidateVolume (void)
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 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)

Public Attributes

General Fieldcontainer Declaration


 OSG_ABSTR_FIELD_CONTAINER_DECL

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 NextFieldMask
static const OSG::BitVector IgnoreFieldMask

Protected Types

typedef FieldContainerAttachment Self
typedef MFParentFieldContainerPtr ParentField

Protected Member Functions

Constructors


 BlendChunkBase (void)
 BlendChunkBase (const BlendChunkBase &source)
Destructors


virtual ~BlendChunkBase (void)
Generic Field Access


GetFieldHandlePtr getHandleSrcFactor (void) const
EditFieldHandlePtr editHandleSrcFactor (void)
GetFieldHandlePtr getHandleDestFactor (void) const
EditFieldHandlePtr editHandleDestFactor (void)
GetFieldHandlePtr getHandleEquation (void) const
EditFieldHandlePtr editHandleEquation (void)
GetFieldHandlePtr getHandleColor (void) const
EditFieldHandlePtr editHandleColor (void)
GetFieldHandlePtr getHandleAlphaFunc (void) const
EditFieldHandlePtr editHandleAlphaFunc (void)
GetFieldHandlePtr getHandleAlphaValue (void) const
EditFieldHandlePtr editHandleAlphaValue (void)
GetFieldHandlePtr getHandleAlphaSrcFactor (void) const
EditFieldHandlePtr editHandleAlphaSrcFactor (void)
GetFieldHandlePtr getHandleAlphaDestFactor (void) const
EditFieldHandlePtr editHandleAlphaDestFactor (void)
Sync


virtual void resolveLinks (void)
Generic Field Access


GetFieldHandlePtr getHandleIgnore (void) const
EditFieldHandlePtr editHandleIgnore (void)
Changed


const MFParentFieldContainerPtr & getParents (void) const
const MFParentFieldContainerPtr * getMFParents (void) const
MT Destruction


EditFieldHandlePtr editInternalHandler (void)
GetFieldHandlePtr getInternalHandler (void) const
GetFieldHandlePtr getHandleParents (void) const
Edit


OSG_SYSTEM_DLLMAPPING void subReferenceUnresolved (void)
MT Construction


OSG_SYSTEM_DLLMAPPING void onCreateAspect (const FieldContainer *createAspect, const FieldContainer *source=NULL)
OSG_SYSTEM_DLLMAPPING void onCreate (const FieldContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroy (UInt32 uiContainerId)
Changed


OSG_SYSTEM_DLLMAPPING void onCreate (const ReflexiveContainer *source=NULL)
virtual OSG_SYSTEM_DLLMAPPING
void 
onDestroyAspect (UInt32 uiContainerId, UInt32 uiAspect)
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 Char8 * getClassname (void)
static void initMethod (InitPhase ePhase)
Fields


static void classDescInserter (TypeObject &oType)
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


SFGLenum _sfSrcFactor
SFGLenum _sfDestFactor
SFGLenum _sfEquation
SFColor4f _sfColor
SFGLenum _sfAlphaFunc
SFReal32 _sfAlphaValue
SFGLenum _sfAlphaSrcFactor
SFGLenum _sfAlphaDestFactor
Fields


SFBool _sfIgnore
Fields


MFParentFieldContainerPtr _mfParents
SFBool _sfInternal
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 BlendChunkBase &source)

Detailed Description

Definition at line 85 of file OSGBlendChunkBase.h.


Member Typedef Documentation

Reimplemented from OSG::StateChunk.

Reimplemented in OSG::BlendChunk.

Definition at line 89 of file OSGBlendChunkBase.h.

Reimplemented from OSG::StateChunkBase.

Definition at line 90 of file OSGBlendChunkBase.h.

Reimplemented from OSG::StateChunkBase.

Definition at line 92 of file OSGBlendChunkBase.h.

Reimplemented from OSG::StateChunkBase.

Definition at line 93 of file OSGBlendChunkBase.h.

typedef MFParentFieldContainerPtr OSG::FieldContainerAttachment::ParentField [protected, inherited]

Definition at line 169 of file OSGFieldContainerAttachment.h.

typedef Field*(ReflexiveContainer::*) OSG::ReflexiveContainer::FieldEditMethod(void) [inherited]

Definition at line 79 of file OSGReflexiveContainer.h.

typedef const Field*(ReflexiveContainer::*) OSG::ReflexiveContainer::FieldGetMethod(void) const [inherited]

Definition at line 81 of file OSGReflexiveContainer.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
SrcFactorFieldId 
DestFactorFieldId 
EquationFieldId 
ColorFieldId 
AlphaFuncFieldId 
AlphaValueFieldId 
AlphaSrcFactorFieldId 
AlphaDestFactorFieldId 
NextFieldId 

Definition at line 101 of file OSGBlendChunkBase.h.

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

anonymous enum [inherited]

Enumerator:
IgnoreFieldId 
NextFieldId 

Definition at line 94 of file OSGStateChunkBase.h.

00095     {
00096         IgnoreFieldId = Inherited::NextFieldId,
00097         NextFieldId = IgnoreFieldId + 1
00098     };


Constructor & Destructor Documentation

OSG::BlendChunkBase::BlendChunkBase ( void   )  [protected]

Definition at line 715 of file OSGBlendChunkBase.cpp.

00715                                    :
00716     Inherited(),
00717     _sfSrcFactor              (GLenum(GL_ONE)),
00718     _sfDestFactor             (GLenum(GL_ZERO)),
00719     _sfEquation               (GLenum(GL_NONE)),
00720     _sfColor                  (Color4f(0,0,0,0)),
00721     _sfAlphaFunc              (GLenum(GL_NONE)),
00722     _sfAlphaValue             (Real32(0)),
00723     _sfAlphaSrcFactor         (GLenum(OSG_GL_UNUSED)),
00724     _sfAlphaDestFactor        (GLenum(OSG_GL_UNUSED))
00725 {
00726 }

OSG::BlendChunkBase::BlendChunkBase ( const BlendChunkBase source  )  [protected]

Definition at line 728 of file OSGBlendChunkBase.cpp.

00728                                                            :
00729     Inherited(source),
00730     _sfSrcFactor              (source._sfSrcFactor              ),
00731     _sfDestFactor             (source._sfDestFactor             ),
00732     _sfEquation               (source._sfEquation               ),
00733     _sfColor                  (source._sfColor                  ),
00734     _sfAlphaFunc              (source._sfAlphaFunc              ),
00735     _sfAlphaValue             (source._sfAlphaValue             ),
00736     _sfAlphaSrcFactor         (source._sfAlphaSrcFactor         ),
00737     _sfAlphaDestFactor        (source._sfAlphaDestFactor        )
00738 {
00739 }

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

Definition at line 744 of file OSGBlendChunkBase.cpp.

00745 {
00746 }


Member Function Documentation

OSG::BlendChunkBase::OSG_GEN_INTERNALPTR ( BlendChunk   ) 

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

Reimplemented from OSG::StateChunkBase.

Definition at line 56 of file OSGBlendChunkBase.inl.

References _type.

Referenced by create(), and modifyMaterial().

00057 {
00058     return _type;
00059 }

OSG::UInt32 OSG::BlendChunkBase::getClassTypeId ( void   )  [inline, static]

Reimplemented from OSG::StateChunkBase.

Definition at line 63 of file OSGBlendChunkBase.inl.

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

00064 {
00065     return _type.getId();
00066 }

OSG::UInt16 OSG::BlendChunkBase::getClassGroupId ( void   )  [inline, static]

Reimplemented from OSG::StateChunkBase.

Definition at line 69 of file OSGBlendChunkBase.inl.

References _type, and OSG::ReflexiveContainerType::getGroupId().

00070 {
00071     return _type.getGroupId();
00072 }

FieldContainerType & OSG::BlendChunkBase::getType ( void   )  [virtual]

Reimplemented from OSG::StateChunkBase.

Definition at line 384 of file OSGBlendChunkBase.cpp.

References _type.

00385 {
00386     return _type;
00387 }

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

Reimplemented from OSG::StateChunkBase.

Definition at line 389 of file OSGBlendChunkBase.cpp.

References _type.

00390 {
00391     return _type;
00392 }

UInt32 OSG::BlendChunkBase::getContainerSize ( void   )  const [virtual]

Reimplemented from OSG::StateChunkBase.

Definition at line 394 of file OSGBlendChunkBase.cpp.

00395 {
00396     return sizeof(BlendChunk);
00397 }

SFGLenum * OSG::BlendChunkBase::editSFSrcFactor ( void   ) 

Definition at line 402 of file OSGBlendChunkBase.cpp.

References _sfSrcFactor, OSG::FieldContainer::editSField(), and SrcFactorFieldMask.

00403 {
00404     editSField(SrcFactorFieldMask);
00405 
00406     return &_sfSrcFactor;
00407 }

const SFGLenum * OSG::BlendChunkBase::getSFSrcFactor ( void   )  const

Definition at line 409 of file OSGBlendChunkBase.cpp.

References _sfSrcFactor.

00410 {
00411     return &_sfSrcFactor;
00412 }

SFGLenum * OSG::BlendChunkBase::editSFDestFactor ( void   ) 

Definition at line 421 of file OSGBlendChunkBase.cpp.

References _sfDestFactor, DestFactorFieldMask, and OSG::FieldContainer::editSField().

00422 {
00423     editSField(DestFactorFieldMask);
00424 
00425     return &_sfDestFactor;
00426 }

const SFGLenum * OSG::BlendChunkBase::getSFDestFactor ( void   )  const

Definition at line 428 of file OSGBlendChunkBase.cpp.

References _sfDestFactor.

00429 {
00430     return &_sfDestFactor;
00431 }

SFGLenum * OSG::BlendChunkBase::editSFEquation ( void   ) 

Definition at line 440 of file OSGBlendChunkBase.cpp.

References _sfEquation, OSG::FieldContainer::editSField(), and EquationFieldMask.

00441 {
00442     editSField(EquationFieldMask);
00443 
00444     return &_sfEquation;
00445 }

const SFGLenum * OSG::BlendChunkBase::getSFEquation ( void   )  const

Definition at line 447 of file OSGBlendChunkBase.cpp.

References _sfEquation.

00448 {
00449     return &_sfEquation;
00450 }

SFColor4f * OSG::BlendChunkBase::editSFColor ( void   ) 

Definition at line 459 of file OSGBlendChunkBase.cpp.

References _sfColor, ColorFieldMask, and OSG::FieldContainer::editSField().

00460 {
00461     editSField(ColorFieldMask);
00462 
00463     return &_sfColor;
00464 }

const SFColor4f * OSG::BlendChunkBase::getSFColor ( void   )  const

Definition at line 466 of file OSGBlendChunkBase.cpp.

References _sfColor.

00467 {
00468     return &_sfColor;
00469 }

SFGLenum * OSG::BlendChunkBase::editSFAlphaFunc ( void