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

osg::ColorMaskChunk Class Reference

ColorMaskChunk class. See PageSystemColorMaskChunk for a description. More...

#include <OSGColorMaskChunk.h>

Inheritance diagram for osg::ColorMaskChunk:

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

Public Types

typedef ColorMaskChunkPtr Ptr
enum  {
  MaskRFieldId = Inherited::NextFieldId, MaskGFieldId = MaskRFieldId + 1, MaskBFieldId = MaskGFieldId + 1, MaskAFieldId = MaskBFieldId + 1,
  NextFieldId = MaskAFieldId + 1
}

Public Member Functions

Chunk Class Access
*virtual const StateChunkClassgetClass (void) const
State Commands
*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)
Comparison
*virtual Real32 switchCost (StateChunk *chunk)
virtual bool operator< (const StateChunk &other) const
 assignment
virtual bool operator== (const StateChunk &other) const
 equal
virtual bool operator!= (const StateChunk &other) const
 unequal
Sync
*virtual void changed (BitVector whichField, UInt32 origin)
Output
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
Field Set
*void setMask (const bool &r, const bool &g, const bool &b, const bool &a)
FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFBoolgetSFMaskR (void)
 Get the ColorMaskChunk::_sfMaskR field.
SFBoolgetSFMaskG (void)
 Get the ColorMaskChunk::_sfMaskG field.
SFBoolgetSFMaskB (void)
 Get the ColorMaskChunk::_sfMaskB field.
SFBoolgetSFMaskA (void)
 Get the ColorMaskChunk::_sfMaskA field.
bool & getMaskR (void)
 Get the value of the ColorMaskChunk::_sfMaskR field.
const bool & getMaskR (void) const
 Get the value of the ColorMaskChunk::_sfMaskR field.
bool & getMaskG (void)
 Get the value of the ColorMaskChunk::_sfMaskG field.
const bool & getMaskG (void) const
 Get the value of the ColorMaskChunk::_sfMaskG field.
bool & getMaskB (void)
 Get the value of the ColorMaskChunk::_sfMaskB field.
const bool & getMaskB (void) const
 Get the value of the ColorMaskChunk::_sfMaskB field.
bool & getMaskA (void)
 Get the value of the ColorMaskChunk::_sfMaskA field.
const bool & getMaskA (void) const
 Get the value of the ColorMaskChunk::_sfMaskA field.
Field Set
*void setMaskR (const bool &value)
 Set the value of the ColorMaskChunk::_sfMaskR field.
void setMaskG (const bool &value)
 Set the value of the ColorMaskChunk::_sfMaskG field.
void setMaskB (const bool &value)
 Set the value of the ColorMaskChunk::_sfMaskB field.
void setMaskA (const bool &value)
 Set the value of the ColorMaskChunk::_sfMaskA 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

Static Public Member Functions

Static Chunk Class Access
*static UInt32 getStaticClassId (void)
static const StateChunkClassgetStaticClass (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 ColorMaskChunkPtr create (void)
 create a new instance of the class
static ColorMaskChunkPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype

Static Public Attributes

static const osg::BitVector MaskRFieldMask
static const osg::BitVector MaskGFieldMask
static const osg::BitVector MaskBFieldMask
static const osg::BitVector MaskAFieldMask
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
ColorMaskChunk (void)
 ColorMaskChunk (const ColorMaskChunk &source)
Destructors
*virtual ~ColorMaskChunk (void)
Sync
*void executeSyncImpl (ColorMaskChunkBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)

Protected Attributes

Fields
*SFBool _sfMaskR
SFBool _sfMaskG
SFBool _sfMaskB
SFBool _sfMaskA

Private Types

typedef ColorMaskChunkBase Inherited

Private Member Functions

void operator= (const ColorMaskChunk &source)

Static Private Member Functions

static void initMethod (void)

Static Private Attributes

static StateChunkClass _class

Friends

class FieldContainer
class ColorMaskChunkBase

Detailed Description

The color chunk contains the parameters that are specific for color write.

Definition at line 55 of file OSGColorMaskChunk.h.


Member Typedef Documentation

typedef ColorMaskChunkBase osg::ColorMaskChunk::Inherited [private]
 

Reimplemented from osg::ColorMaskChunkBase.

Definition at line 59 of file OSGColorMaskChunk.h.

typedef ColorMaskChunkPtr osg::ColorMaskChunkBase::Ptr [inherited]
 

Reimplemented from osg::StateChunkBase.

Definition at line 93 of file OSGColorMaskChunkBase.h.


Member Enumeration Documentation

anonymous enum [inherited]
 

Enumerator:
MaskRFieldId 
MaskGFieldId 
MaskBFieldId 
MaskAFieldId 
NextFieldId 

Reimplemented from osg::Attachment.

Definition at line 95 of file OSGColorMaskChunkBase.h.

00096     {
00097         MaskRFieldId = Inherited::NextFieldId,
00098         MaskGFieldId = MaskRFieldId + 1,
00099         MaskBFieldId = MaskGFieldId + 1,
00100         MaskAFieldId = MaskBFieldId + 1,
00101         NextFieldId  = MaskAFieldId + 1
00102     };


Constructor & Destructor Documentation

ColorMaskChunk::ColorMaskChunk void   )  [protected]
 

Definition at line 85 of file OSGColorMaskChunk.cpp.

00085                                    :
00086     Inherited()
00087 {
00088 }

ColorMaskChunk::ColorMaskChunk const ColorMaskChunk source  )  [protected]
 

Definition at line 90 of file OSGColorMaskChunk.cpp.

00090                                                            :
00091     Inherited(source)
00092 {
00093 }

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

Definition at line 95 of file OSGColorMaskChunk.cpp.

00096 {
00097 }


Member Function Documentation

const StateChunkClass * ColorMaskChunk::getClass void   )  const [virtual]
 

Reimplemented from osg::StateChunk.

Definition at line 101 of file OSGColorMaskChunk.cpp.

References _class.

00102 {
00103     return &_class;
00104 }

UInt32 osg::ColorMaskChunk::getStaticClassId void   )  [inline, static]
 

Reimplemented from osg::StateChunk.

Definition at line 46 of file OSGColorMaskChunk.inl.

References osg::StateChunkClass::getId(), and getStaticClass().

00047 {
00048     return getStaticClass()->getId();
00049 }

const StateChunkClass * osg::ColorMaskChunk::getStaticClass void   )  [inline, static]
 

Reimplemented from osg::StateChunk.

Definition at line 52 of file OSGColorMaskChunk.inl.

References _class.

Referenced by getStaticClassId().

00053 {
00054     return &ColorMaskChunk::_class;
00055 }

void ColorMaskChunk::activate DrawActionBase action,
UInt32  index = 0
[virtual]
 

Activate the chunk, i.e. set the OpenGl state covered by the chunk which is different from the default state to the given state.

Reimplemented from osg::StateChunk.

Definition at line 121 of file OSGColorMaskChunk.cpp.

References osg::ColorMaskChunkBase::getMaskA(), osg::ColorMaskChunkBase::getMaskB(), osg::ColorMaskChunkBase::getMaskG(), and osg::ColorMaskChunkBase::getMaskR().

Referenced by changeFrom().

00122 {
00123     glColorMask(getMaskR(), getMaskG(), getMaskB(), getMaskA());
00124 }

void ColorMaskChunk::changeFrom DrawActionBase act,
StateChunk old_chunk,
UInt32  index = 0
[virtual]
 

Change from an old chunk of the same type to this chunk. Note that in general no type checking is done, make sure to use this on a legal combination of chunks!

Reimplemented from osg::StateChunk.

Definition at line 126 of file OSGColorMaskChunk.cpp.

References activate(), and osg::StateChunk::deactivate().

00127 {
00128     old_chunk->deactivate( act, index );
00129     activate( act, index );
00130 }

void ColorMaskChunk::deactivate DrawActionBase action,
UInt32  index = 0
[virtual]
 

Deactivate the chunk, i.e. set the OpenGl state covered by the chunk which is different from the default state to the default state.

Reimplemented from osg::StateChunk.

Definition at line 132 of file OSGColorMaskChunk.cpp.

00133 {
00134     glColorMask(true, true, true, true);
00135 }

Real32 ColorMaskChunk::switchCost StateChunk chunk  )  [virtual]
 

Calculate how expensive it is to switch from one instance of the chunk class to another. In most cases not implemented yet, will return 0.

Reimplemented from osg::StateChunk.

Definition at line 139 of file OSGColorMaskChunk.cpp.

00140 {
00141     return 0;
00142 }

bool ColorMaskChunk::operator< const StateChunk other  )  const [virtual]
 

Reimplemented from osg::StateChunk.

Definition at line 147 of file OSGColorMaskChunk.cpp.

00148 {
00149     return this < &other;
00150 }

bool ColorMaskChunk::operator== const StateChunk other  )  const [virtual]
 

Reimplemented from osg::StateChunk.

Definition at line 155 of file OSGColorMaskChunk.cpp.

References osg::ColorMaskChunkBase::getMaskA(), osg::ColorMaskChunkBase::getMaskB(), osg::ColorMaskChunkBase::getMaskG(), and osg::ColorMaskChunkBase::getMaskR().

00156 {
00157     ColorMaskChunk const *tother = dynamic_cast<ColorMaskChunk const*>(&other);
00158 
00159     if(!tother)
00160         return false;
00161 
00162     if(tother == this)
00163         return true;
00164 
00165     if(getMaskR()          != tother->getMaskR()  ||
00166        getMaskG()          != tother->getMaskG()  ||
00167        getMaskB()          != tother->getMaskB()  ||
00168        getMaskA()          != tother->getMaskA()    )
00169         return false;
00170 
00171     return true;
00172 }

bool ColorMaskChunk::operator!= const StateChunk other  )  const [virtual]
 

Reimplemented from osg::StateChunk.

Definition at line 177 of file OSGColorMaskChunk.cpp.

00178 {
00179     return ! (*this == other);
00180 }

void ColorMaskChunk::changed BitVector  whichField,
UInt32  origin
[virtual]
 

Reimplemented from osg::StateChunk.

Definition at line 108 of file OSGColorMaskChunk.cpp.

References osg::StateChunk::changed().

00109 {
00110     Inherited::changed(whichField, origin);
00111 }

void ColorMaskChunk::dump UInt32  uiIndent = 0,
const BitVector  bvFlags = 0
const [virtual]
 

Reimplemented from osg::StateChunk.

Definition at line 113 of file OSGColorMaskChunk.cpp.

References SLOG.

00115 {
00116     SLOG << "Dump ColorMaskChunk NI" << std::endl;
00117 }

void osg::ColorMaskChunk::setMask const bool &  r,
const bool &  g,
const bool &  b,
const bool &  a
[inline]
 

Definition at line 58 of file OSGColorMaskChunk.inl.

References osg::ColorMaskChunkBase::_sfMaskA, osg::ColorMaskChunkBase::_sfMaskB, osg::ColorMaskChunkBase::_sfMaskG, osg::ColorMaskChunkBase::_sfMaskR, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00062 {
00063     _sfMaskR.setValue(r);
00064     _sfMaskG.setValue(g);
00065     _sfMaskB.setValue(b);
00066     _sfMaskA.setValue(a);
00067 }

void ColorMaskChunk::initMethod void   )  [static, private]
 

Reimplemented from osg::StateChunk.

Definition at line 70 of file OSGColorMaskChunk.cpp.

00071 {
00072 }

void osg::ColorMaskChunk::operator= const ColorMaskChunk source  )  [private]
 

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

Reimplemented from osg::StateChunkBase.

Definition at line 58 of file OSGColorMaskChunkBase.inl.

References osg::ColorMaskChunkBase::_type.

Referenced by osg::ColorMaskChunkBase::create().

00059 {
00060     return _type; 
00061 } 

osg::UInt32 osg::ColorMaskChunkBase::getClassTypeId void   )  [inline, static, inherited]
 

Reimplemented from osg::StateChunkBase.

Definition at line 65 of file OSGColorMaskChunkBase.inl.

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

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

FieldContainerType & ColorMaskChunkBase::getType void   )  [virtual, inherited]
 

Reimplemented from osg::StateChunkBase.

Definition at line 139 of file OSGColorMaskChunkBase.cpp.

References osg::ColorMaskChunkBase::_type.

00140 {
00141     return _type; 
00142 } 

const FieldContainerType & ColorMaskChunkBase::getType void   )  const [virtual, inherited]
 

Reimplemented from osg::StateChunkBase.

Definition at line 144 of file OSGColorMaskChunkBase.cpp.

References osg::ColorMaskChunkBase::_type.

00145 {
00146     return _type;
00147 } 

UInt32 ColorMaskChunkBase::getContainerSize void   )  const [virtual, inherited]
 

Reimplemented from osg::StateChunkBase.

Definition at line 159 of file OSGColorMaskChunkBase.cpp.

00160 { 
00161     return sizeof(ColorMaskChunk); 
00162 }

SFBool * osg::ColorMaskChunkBase::getSFMaskR void   )  [inline, inherited]
 

Definition at line 101 of file OSGColorMaskChunkBase.inl.

References osg::ColorMaskChunkBase::_sfMaskR.

00102 {
00103     return &_sfMaskR;
00104 }

SFBool * osg::ColorMaskChunkBase::getSFMaskG void   )  [inline, inherited]
 

Definition at line 108 of file OSGColorMaskChunkBase.inl.

References osg::ColorMaskChunkBase::_sfMaskG.

00109 {
00110     return &_sfMaskG;
00111 }

SFBool * osg::ColorMaskChunkBase::getSFMaskB void   )  [inline, inherited]
 

Definition at line 115 of file OSGColorMaskChunkBase.inl.

References osg::ColorMaskChunkBase::_sfMaskB.

00116 {
00117     return &_sfMaskB;
00118 }

SFBool * osg::ColorMaskChunkBase::getSFMaskA void   )  [inline, inherited]
 

Definition at line 122 of file OSGColorMaskChunkBase.inl.

References osg::ColorMaskChunkBase::_sfMaskA.

00123 {
00124     return &_sfMaskA;
00125 }

bool & osg::ColorMaskChunkBase::getMaskR void   )  [inline, inherited]
 

Definition at line 130 of file OSGColorMaskChunkBase.inl.

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

Referenced by activate(), and operator==().

00131 {
00132     return _sfMaskR.getValue();
00133 }

const bool & osg::ColorMaskChunkBase::getMaskR void   )  const [inline, inherited]
 

Definition at line 137 of file OSGColorMaskChunkBase.inl.

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

00138 {
00139     return _sfMaskR.getValue();
00140 }

bool & osg::ColorMaskChunkBase::getMaskG void   )  [inline, inherited]
 

Definition at line 151 of file OSGColorMaskChunkBase.inl.

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

Referenced by activate(), and operator==().

00152 {
00153     return _sfMaskG.getValue();
00154 }

const bool & osg::ColorMaskChunkBase::getMaskG void   )  const [inline, inherited]
 

Definition at line 158 of file OSGColorMaskChunkBase.inl.

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

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

bool & osg::ColorMaskChunkBase::getMaskB void   )  [inline, inherited]
 

Definition at line 172 of file OSGColorMaskChunkBase.inl.

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

Referenced by activate(), and operator==().

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

const bool & osg::ColorMaskChunkBase::getMaskB void   )  const [inline, inherited]
 

Definition at line 179 of file OSGColorMaskChunkBase.inl.

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

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

bool & osg::ColorMaskChunkBase::getMaskA void   )  [inline, inherited]
 

Definition at line 193 of file OSGColorMaskChunkBase.inl.

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

Referenced by activate(), and operator==().

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

const bool & osg::ColorMaskChunkBase::getMaskA void   )  const [inline, inherited]
 

Definition at line 200 of file OSGColorMaskChunkBase.inl.

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

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

void osg::ColorMaskChunkBase::setMaskR const bool &  value  )  [inline, inherited]
 

Definition at line 144 of file OSGColorMaskChunkBase.inl.

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

00145 {
00146     _sfMaskR.setValue(value);
00147 }

void osg::ColorMaskChunkBase::setMaskG const bool &  value  )  [inline, inherited]
 

Definition at line 165 of file OSGColorMaskChunkBase.inl.

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

00166 {
00167     _sfMaskG.setValue(value);
00168 }

void osg::ColorMaskChunkBase::setMaskB const bool &  value  )  [inline, inherited]
 

Definition at line 186 of file OSGColorMaskChunkBase.inl.

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

00187 {
00188     _sfMaskB.setValue(value);
00189 }

void osg::ColorMaskChunkBase::setMaskA const bool &  value  )  [inline, inherited]
 

Definition at line 207 of file OSGColorMaskChunkBase.inl.

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

00208 {
00209     _sfMaskA.setValue(value);
00210 }

UInt32 ColorMaskChunkBase::getBinSize const BitVector whichField  )  [virtual, inherited]
 

Reimplemented from osg::StateChunkBase.

Definition at line 227 of file OSGColorMaskChunkBase.cpp.

References osg::ColorMaskChunkBase::_sfMaskA, osg::ColorMaskChunkBase::_sfMaskB, osg::ColorMaskChunkBase::_sfMaskG, osg::ColorMaskChunkBase::_sfMaskR, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::StateChunkBase::getBinSize(), osg::ColorMaskChunkBase::MaskAFieldMask, osg::ColorMaskChunkBase::MaskBFieldMask, osg::ColorMaskChunkBase::MaskGFieldMask, osg::ColorMaskChunkBase::MaskRFieldMask, and osg::FieldBits::NoField.

00228 {
00229     UInt32 returnValue = Inherited::getBinSize(whichField);
00230 
00231     if(FieldBits::NoField != (MaskRFieldMask & whichField))
00232     {
00233         returnValue += _sfMaskR.getBinSize();
00234     }
00235 
00236     if(FieldBits::NoField != (MaskGFieldMask & whichField))
00237     {
00238         returnValue += _sfMaskG.getBinSize();
00239     }
00240 
00241     if(FieldBits::NoField != (MaskBFieldMask & whichField))
00242     {
00243         returnValue += _sfMaskB.getBinSize();
00244     }
00245 
00246     if(FieldBits::NoField != (MaskAFieldMask & whichField))
00247     {
00248         returnValue += _sfMaskA.getBinSize();
00249     }
00250 
00251 
00252     return returnValue;
00253 }

void ColorMaskChunkBase::copyToBin BinaryDataHandler pMem,
const BitVector whichField
[virtual, inherited]
 

Reimplemented from osg::StateChunkBase.

Definition at line 255 of file OSGColorMaskChunkBase.cpp.

References osg::ColorMaskChunkBase::_sfMaskA, osg::ColorMaskChunkBase::_sfMaskB, osg::ColorMaskChunkBase::_sfMaskG, osg::ColorMaskChunkBase::_sfMaskR, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::StateChunkBase::copyToBin(), osg::ColorMaskChunkBase::MaskAFieldMask, osg::ColorMaskChunkBase::MaskBFieldMask, osg::ColorMaskChunkBase::MaskGFieldMask, osg::ColorMaskChunkBase::MaskRFieldMask, and osg::FieldBits::NoField.

00257 {
00258     Inherited::copyToBin(pMem, whichField);
00259 
00260     if(FieldBits::NoField != (MaskRFieldMask & whichField))
00261     {
00262         _sfMaskR.copyToBin(pMem);
00263     }
00264 
00265     if(FieldBits::NoField != (MaskGFieldMask & whichField))
00266     {
00267         _sfMaskG.copyToBin(pMem);
00268     }
00269 
00270     if(FieldBits::NoField != (MaskBFieldMask & whichField))
00271     {
00272         _sfMaskB.copyToBin(pMem);
00273     }
00274 
00275     if(FieldBits::NoField != (MaskAFieldMask & whichField))
00276     {
00277         _sfMaskA.copyToBin(pMem);
00278     }
00279 
00280 
00281 }

void ColorMaskChunkBase::copyFromBin BinaryDataHandler pMem,
const BitVector whichField
[virtual, inherited]
 

Reimplemented from osg::StateChunkBase.

Definition at line 283 of file OSGColorMaskChunkBase.cpp.

References osg::ColorMaskChunkBase::_sfMaskA, osg::ColorMaskChunkBase::_sfMaskB, osg::ColorMaskChunkBase::_sfMaskG, osg::ColorMaskChunkBase::_sfMaskR, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::StateChunkBase::copyFromBin(), osg::ColorMaskChunkBase::MaskAFieldMask, osg::ColorMaskChunkBase::MaskBFieldMask, osg::ColorMaskChunkBase::MaskGFieldMask, osg::ColorMaskChunkBase::MaskRFieldMask, and osg::FieldBits::NoField.

00285 {
00286     Inherited::copyFromBin(pMem, whichField);
00287 
00288     if(FieldBits::NoField != (MaskRFieldMask & whichField))
00289     {
00290         _sfMaskR.copyFromBin(pMem);
00291     }
00292 
00293     if(FieldBits::NoField != (MaskGFieldMask & whichField))
00294     {
00295         _sfMaskG.copyFromBin(pMem);
00296     }
00297 
00298     if(FieldBits::NoField != (MaskBFieldMask & whichField))
00299     {
00300         _sfMaskB.copyFromBin(pMem);
00301     }
00302 
00303     if(FieldBits::NoField != (MaskAFieldMask & whichField))
00304     {
00305         _sfMaskA.copyFromBin(pMem);
00306     }
00307 
00308 
00309 }

ColorMaskChunkPtr osg::ColorMaskChunkBase::create void   )  [inline, static, inherited]
 

Reimplemented from osg::Attachment.

Definition at line 72 of file OSGColorMaskChunkBase.inl.

References osg::AttachmentPtr::dcast(), osg::ColorMaskChunkBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::ColorMaskChunkBase::shallowCopy().

00073 {
00074     ColorMaskChunkPtr fc; 
00075 
00076     if(getClassType().getPrototype() != OSG::NullFC) 
00077     {
00078         fc = ColorMaskChunkPtr::dcast(
00079             getClassType().getPrototype()-> shallowCopy()); 
00080     }
00081     
00082     return fc; 
00083 }

ColorMaskChunkPtr osg::ColorMaskChunkBase::createEmpty void