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

osg::PolygonForeground Class Reference
[Foregrounds]

PolygonForeground class. See Polygon Foreground for a description. More...

#include <OSGPolygonForeground.h>

Inheritance diagram for osg::PolygonForeground:

osg::PolygonForegroundBase osg::Foreground osg::ForegroundBase osg::AttachmentContainer osg::FieldContainer List of all members.

Public Types

typedef PolygonForegroundPtr Ptr
enum  {
  MaterialFieldId = Inherited::NextFieldId, PositionsFieldId = MaterialFieldId + 1, TexCoordsFieldId = PositionsFieldId + 1, NormalizedXFieldId = TexCoordsFieldId + 1,
  NormalizedYFieldId = NormalizedXFieldId + 1, NextFieldId = NormalizedYFieldId + 1
}

Public Member Functions

Sync
*virtual void changed (BitVector whichField, UInt32 origin)
Output
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
draw
*virtual void draw (DrawActionBase *, Viewport *)
FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFMaterialPtrgetSFMaterial (void)
 Get the PolygonForeground::_sfMaterial field.
MFPnt2fgetMFPositions (void)
 Get the PolygonForeground::_mfPositions field.
MFVec3fgetMFTexCoords (void)
 Get the PolygonForeground::_mfTexCoords field.
SFBoolgetSFNormalizedX (void)
 Get the PolygonForeground::_sfNormalizedX field.
SFBoolgetSFNormalizedY (void)
 Get the PolygonForeground::_sfNormalizedY field.
MaterialPtrgetMaterial (void)
 Get the value of the PolygonForeground::_sfMaterial field.
const MaterialPtrgetMaterial (void) const
 Get the value of the PolygonForeground::_sfMaterial field.
bool & getNormalizedX (void)
 Get the value of the PolygonForeground::_sfNormalizedX field.
const bool & getNormalizedX (void) const
 Get the value of the PolygonForeground::_sfNormalizedX field.
bool & getNormalizedY (void)
 Get the value of the PolygonForeground::_sfNormalizedY field.
const bool & getNormalizedY (void) const
 Get the value of the PolygonForeground::_sfNormalizedY field.
Pnt2fgetPositions (const UInt32 index)
 Get the value of the index element the PolygonForeground::_mfPositions field.
MFPnt2fgetPositions (void)
 Get the PolygonForeground::_mfPositions field.
const MFPnt2fgetPositions (void) const
 Get the PolygonForeground::_mfPositions field.
Vec3fgetTexCoords (const UInt32 index)
 Get the value of the index element the PolygonForeground::_mfTexCoords field.
MFVec3fgetTexCoords (void)
 Get the PolygonForeground::_mfTexCoords field.
const MFVec3fgetTexCoords (void) const
 Get the PolygonForeground::_mfTexCoords field.
Field Set
*void setMaterial (const MaterialPtr &value)
 Set the value of the PolygonForeground::_sfMaterial field.
void setNormalizedX (const bool &value)
 Set the value of the PolygonForeground::_sfNormalizedX field.
void setNormalizedY (const bool &value)
 Set the value of the PolygonForeground::_sfNormalizedY 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

Class Get
*static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
Construction
*static PolygonForegroundPtr create (void)
 create a new instance of the class
static PolygonForegroundPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype

Static Public Attributes

static const osg::BitVector MaterialFieldMask
static const osg::BitVector PositionsFieldMask
static const osg::BitVector TexCoordsFieldMask
static const osg::BitVector NormalizedXFieldMask
static const osg::BitVector NormalizedYFieldMask
static const osg::BitVector MTInfluenceMask
static const osg::BitVector ActiveFieldMask
static const BitVector AttachmentsFieldMask
static const BitVector NextFieldMask

Protected Member Functions

Constructors
PolygonForeground (void)
 PolygonForeground (const PolygonForeground &source)
Destructors
*virtual ~PolygonForeground (void)
Helpers
*Real32 mapCoordinate (Real32 val, Real32 max, bool norm)
Sync
*void executeSyncImpl (PolygonForegroundBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)

Protected Attributes

Fields
*SFMaterialPtr _sfMaterial
MFPnt2f _mfPositions
MFVec3f _mfTexCoords
SFBool _sfNormalizedX
SFBool _sfNormalizedY

Private Types

typedef PolygonForegroundBase Inherited

Private Member Functions

void operator= (const PolygonForeground &source)

Static Private Member Functions

static void initMethod (void)

Friends

class FieldContainer
class PolygonForegroundBase

Detailed Description

A foreground that renders a single polygon used the specified material, see Polygon Foreground for a description.

The polygon material is defined by _sfMaterial, the positions by _mfPositions, the texture coordinates by _mfTexCoords. The interpretation of the positions is controlled by _sfNormalizedX and _sfNormalizedY.

Definition at line 55 of file OSGPolygonForeground.h.


Member Typedef Documentation

typedef PolygonForegroundBase osg::PolygonForeground::Inherited [private]
 

Reimplemented from osg::PolygonForegroundBase.

Definition at line 59 of file OSGPolygonForeground.h.

typedef PolygonForegroundPtr osg::PolygonForegroundBase::Ptr [inherited]
 

Reimplemented from osg::ForegroundBase.

Definition at line 94 of file OSGPolygonForegroundBase.h.


Member Enumeration Documentation

anonymous enum [inherited]
 

Enumerator:
MaterialFieldId 
PositionsFieldId 
TexCoordsFieldId 
NormalizedXFieldId 
NormalizedYFieldId 
NextFieldId 

Reimplemented from osg::ForegroundBase.

Definition at line 96 of file OSGPolygonForegroundBase.h.

00097     {
00098         MaterialFieldId    = Inherited::NextFieldId,
00099         PositionsFieldId   = MaterialFieldId    + 1,
00100         TexCoordsFieldId   = PositionsFieldId   + 1,
00101         NormalizedXFieldId = TexCoordsFieldId   + 1,
00102         NormalizedYFieldId = NormalizedXFieldId + 1,
00103         NextFieldId        = NormalizedYFieldId + 1
00104     };


Constructor & Destructor Documentation

PolygonForeground::PolygonForeground void   )  [protected]
 

Definition at line 95 of file OSGPolygonForeground.cpp.

00095                                          :
00096     Inherited()
00097 {
00098 }

PolygonForeground::PolygonForeground const PolygonForeground source  )  [protected]
 

Definition at line 100 of file OSGPolygonForeground.cpp.

00100                                                                     :
00101     Inherited(source)
00102 {
00103 }

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

Definition at line 105 of file OSGPolygonForeground.cpp.

00106 {
00107 }


Member Function Documentation

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

Reimplemented from osg::Foreground.

Definition at line 111 of file OSGPolygonForeground.cpp.

References osg::Foreground::changed().

00112 {
00113     Inherited::changed(whichField, origin);
00114 }

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

Reimplemented from osg::Foreground.

Definition at line 116 of file OSGPolygonForeground.cpp.

References SLOG.

00118 {
00119     SLOG << "Dump PolygonForeground NI" << std::endl;
00120 }

void PolygonForeground::draw DrawActionBase ,
Viewport
[virtual]
 

Implements osg::Foreground.

Definition at line 142 of file OSGPolygonForeground.cpp.

References FWARNING, osg::PolygonForegroundBase::getMaterial(), osg::PolygonForegroundBase::getNormalizedX(), osg::PolygonForegroundBase::getNormalizedY(), osg::Viewport::getPixelHeight(), osg::Viewport::getPixelWidth(), osg::PolygonForegroundBase::getPositions(), osg::MField< FieldTypeT, fieldNameSpace >::getSize(), osg::PolygonForegroundBase::getTexCoords(), mapCoordinate(), and osg::MField< FieldTypeT, fieldNameSpace >::size().

00143 {
00144     if(getPositions().getSize() == 0) // nothing to render
00145         return;
00146 
00147     if(port->getPixelWidth()  == 0 ||
00148        port->getPixelHeight() == 0   ) // nothing to render to
00149         return;
00150         
00151     if(getPositions().getSize() != getTexCoords().getSize())
00152     {
00153         FWARNING(("PolygonForeground::draw: positions and texcoords have "
00154                   "different sizes (%d vs. %d)!\n", 
00155                   getPositions().getSize(), getTexCoords().getSize()));
00156         return;
00157     }
00158        
00159     glPushAttrib(GL_ALL_ATTRIB_BITS);
00160  
00161     glPushMatrix();
00162     glLoadIdentity();
00163     glMatrixMode(GL_PROJECTION);
00164     glPushMatrix();
00165     glLoadIdentity();
00166     
00167     glOrtho(0, port->getPixelWidth(), 0, port->getPixelHeight(), 0, 1);
00168     
00169     getMaterial()->getState()->activate(act);
00170    
00171     UInt16 i;
00172     
00173     Vec3f *tc  = &getTexCoords()[0];
00174     Pnt2f *pos = &getPositions()[0];
00175     
00176     glBegin(GL_POLYGON);
00177     
00178     for(i = 0; i < getPositions().size(); i++)
00179     {
00180         glTexCoord3fv( tc[i].getValues() );
00181         glVertex2f( mapCoordinate(pos[i][0], Real32(port->getPixelWidth()),
00182                                              getNormalizedX()),
00183                     mapCoordinate(pos[i][1], Real32(port->getPixelHeight()),
00184                                              getNormalizedY()) );
00185     }
00186 
00187     glEnd();
00188     
00189     getMaterial()->getState()->deactivate(act);
00190     
00191     glPopMatrix();
00192     glMatrixMode(GL_MODELVIEW);
00193     glPopMatrix();
00194 
00195     glPopAttrib();
00196 }

Real32 PolygonForeground::mapCoordinate Real32  val,
Real32  max,
bool  norm
[protected]
 

Definition at line 122 of file OSGPolygonForeground.cpp.

Referenced by draw().

00123 {
00124     if(val >= 0)
00125     {
00126         if (norm)
00127             val *= max;
00128     }
00129     else
00130     {
00131         val += 1;
00132         
00133         if (norm)
00134             val *= max;
00135         
00136         val = max + val;
00137     }
00138    
00139     return val;
00140 }

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

Reimplemented from osg::Foreground.

Definition at line 80 of file OSGPolygonForeground.cpp.

00081 {
00082 }

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

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

Reimplemented from osg::ForegroundBase.

Definition at line 58 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_type.

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

00059 {
00060     return _type; 
00061 } 

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

Reimplemented from osg::ForegroundBase.

Definition at line 65 of file OSGPolygonForegroundBase.inl.

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

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

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

Reimplemented from osg::ForegroundBase.

Definition at line 150 of file OSGPolygonForegroundBase.cpp.

References osg::PolygonForegroundBase::_type.

00151 {
00152     return _type; 
00153 } 

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

Reimplemented from osg::ForegroundBase.

Definition at line 155 of file OSGPolygonForegroundBase.cpp.

References osg::PolygonForegroundBase::_type.

00156 {
00157     return _type;
00158 } 

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

Reimplemented from osg::ForegroundBase.

Definition at line 170 of file OSGPolygonForegroundBase.cpp.

00171 { 
00172     return sizeof(PolygonForeground); 
00173 }

SFMaterialPtr * osg::PolygonForegroundBase::getSFMaterial void   )  [inline, inherited]
 

Definition at line 101 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_sfMaterial.

00102 {
00103     return &_sfMaterial;
00104 }

MFPnt2f * osg::PolygonForegroundBase::getMFPositions void   )  [inline, inherited]
 

Definition at line 108 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_mfPositions.

00109 {
00110     return &_mfPositions;
00111 }

MFVec3f * osg::PolygonForegroundBase::getMFTexCoords void   )  [inline, inherited]
 

Definition at line 115 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_mfTexCoords.

00116 {
00117     return &_mfTexCoords;
00118 }

SFBool * osg::PolygonForegroundBase::getSFNormalizedX void   )  [inline, inherited]
 

Definition at line 122 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_sfNormalizedX.

00123 {
00124     return &_sfNormalizedX;
00125 }

SFBool * osg::PolygonForegroundBase::getSFNormalizedY void   )  [inline, inherited]
 

Definition at line 129 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_sfNormalizedY.

00130 {
00131     return &_sfNormalizedY;
00132 }

MaterialPtr & osg::PolygonForegroundBase::getMaterial void   )  [inline, inherited]
 

Definition at line 137 of file OSGPolygonForegroundBase.inl.

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

Referenced by draw().

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

const MaterialPtr & osg::PolygonForegroundBase::getMaterial void   )  const [inline, inherited]
 

Definition at line 144 of file OSGPolygonForegroundBase.inl.

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

00145 {
00146     return _sfMaterial.getValue();
00147 }

bool & osg::PolygonForegroundBase::getNormalizedX void   )  [inline, inherited]
 

Definition at line 158 of file OSGPolygonForegroundBase.inl.

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

Referenced by draw().

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

const bool & osg::PolygonForegroundBase::getNormalizedX void   )  const [inline, inherited]
 

Definition at line 165 of file OSGPolygonForegroundBase.inl.

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

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

bool & osg::PolygonForegroundBase::getNormalizedY void   )  [inline, inherited]
 

Definition at line 179 of file OSGPolygonForegroundBase.inl.

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

Referenced by draw().

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

const bool & osg::PolygonForegroundBase::getNormalizedY void   )  const [inline, inherited]
 

Definition at line 186 of file OSGPolygonForegroundBase.inl.

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

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

Pnt2f & osg::PolygonForegroundBase::getPositions const UInt32  index  )  [inline, inherited]
 

Definition at line 201 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_mfPositions.

00202 {
00203     return _mfPositions[index];
00204 }

MFPnt2f & osg::PolygonForegroundBase::getPositions void   )  [inline, inherited]
 

Definition at line 208 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_mfPositions.

Referenced by draw().

00209 {
00210     return _mfPositions;
00211 }

const MFPnt2f & osg::PolygonForegroundBase::getPositions void   )  const [inline, inherited]
 

Definition at line 215 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_mfPositions.

00216 {
00217     return _mfPositions;
00218 }

Vec3f & osg::PolygonForegroundBase::getTexCoords const UInt32  index  )  [inline, inherited]
 

Definition at line 222 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_mfTexCoords.

00223 {
00224     return _mfTexCoords[index];
00225 }

MFVec3f & osg::PolygonForegroundBase::getTexCoords void   )  [inline, inherited]
 

Definition at line 229 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_mfTexCoords.

Referenced by draw().

00230 {
00231     return _mfTexCoords;
00232 }

const MFVec3f & osg::PolygonForegroundBase::getTexCoords void   )  const [inline, inherited]
 

Definition at line 236 of file OSGPolygonForegroundBase.inl.

References osg::PolygonForegroundBase::_mfTexCoords.

00237 {
00238     return _mfTexCoords;
00239 }

void osg::PolygonForegroundBase::setMaterial const MaterialPtr value  )  [inline, inherited]
 

Definition at line 151 of file OSGPolygonForegroundBase.inl.

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

00152 {
00153     _sfMaterial.setValue(value);
00154 }

void osg::PolygonForegroundBase::setNormalizedX const bool &  value  )  [inline, inherited]
 

Definition at line 172 of file OSGPolygonForegroundBase.inl.

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

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

void osg::PolygonForegroundBase::setNormalizedY const bool &  value  )  [inline, inherited]
 

Definition at line 193 of file OSGPolygonForegroundBase.inl.

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

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

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

Reimplemented from osg::ForegroundBase.

Definition at line 242 of file OSGPolygonForegroundBase.cpp.

References osg::PolygonForegroundBase::_mfPositions, osg::PolygonForegroundBase::_mfTexCoords, osg::PolygonForegroundBase::_sfMaterial, osg::PolygonForegroundBase::_sfNormalizedX, osg::PolygonForegroundBase::_sfNormalizedY, osg::MField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::ForegroundBase::getBinSize(), osg::PolygonForegroundBase::MaterialFieldMask, osg::FieldBits::NoField, osg::PolygonForegroundBase::NormalizedXFieldMask, osg::PolygonForegroundBase::NormalizedYFieldMask, osg::PolygonForegroundBase::PositionsFieldMask, and osg::PolygonForegroundBase::TexCoordsFieldMask.

00243 {
00244     UInt32 returnValue = Inherited::getBinSize(whichField);
00245 
00246     if(FieldBits::NoField != (MaterialFieldMask & whichField))
00247     {
00248         returnValue += _sfMaterial.getBinSize();
00249     }
00250 
00251     if(FieldBits::NoField != (PositionsFieldMask & whichField))
00252     {
00253         returnValue += _mfPositions.getBinSize();
00254     }
00255 
00256     if(FieldBits::NoField != (TexCoordsFieldMask & whichField))
00257     {
00258         returnValue += _mfTexCoords.getBinSize();
00259     }
00260 
00261     if(FieldBits::NoField != (NormalizedXFieldMask & whichField))
00262     {
00263         returnValue += _sfNormalizedX.getBinSize();
00264     }
00265 
00266     if(FieldBits::NoField != (NormalizedYFieldMask & whichField))
00267     {
00268         returnValue += _sfNormalizedY.getBinSize();
00269     }
00270 
00271 
00272     return returnValue;
00273 }

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

Reimplemented from osg::ForegroundBase.

Definition at line 275 of file OSGPolygonForegroundBase.cpp.

References osg::PolygonForegroundBase::_mfPositions, osg::PolygonForegroundBase::_mfTexCoords, osg::PolygonForegroundBase::_sfMaterial, osg::PolygonForegroundBase::_sfNormalizedX, osg::PolygonForegroundBase::_sfNormalizedY, osg::MField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::ForegroundBase::copyToBin(), osg::PolygonForegroundBase::MaterialFieldMask, osg::FieldBits::NoField, osg::PolygonForegroundBase::NormalizedXFieldMask, osg::PolygonForegroundBase::NormalizedYFieldMask, osg::PolygonForegroundBase::PositionsFieldMask, and osg::PolygonForegroundBase::TexCoordsFieldMask.

00277 {
00278     Inherited::copyToBin(pMem, whichField);
00279 
00280     if(FieldBits::NoField != (MaterialFieldMask & whichField))
00281     {
00282         _sfMaterial.copyToBin(pMem);
00283     }
00284 
00285     if(FieldBits::NoField != (PositionsFieldMask & whichField))
00286     {
00287         _mfPositions.copyToBin(pMem);
00288     }
00289 
00290     if(FieldBits::NoField != (TexCoordsFieldMask & whichField))
00291     {
00292         _mfTexCoords.copyToBin(pMem);
00293     }
00294 
00295     if(FieldBits::NoField != (NormalizedXFieldMask & whichField))
00296     {
00297         _sfNormalizedX.copyToBin(pMem);
00298     }
00299 
00300     if(FieldBits::NoField != (NormalizedYFieldMask & whichField))
00301     {
00302         _sfNormalizedY.copyToBin(pMem);
00303     }
00304 
00305 
00306 }

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

Reimplemented from osg::ForegroundBase.

Definition at line 308 of file OSGPolygonForegroundBase.cpp.

References osg::PolygonForegroundBase::_mfPositions, osg::PolygonForegroundBase::_mfTexCoords, osg::PolygonForegroundBase::_sfMaterial, osg::PolygonForegroundBase::_sfNormalizedX, osg::PolygonForegroundBase::_sfNormalizedY, osg::MField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::ForegroundBase::copyFromBin(), osg::PolygonForegroundBase::MaterialFieldMask, osg::FieldBits::NoField, osg::PolygonForegroundBase::NormalizedXFieldMask, osg::PolygonForegroundBase::NormalizedYFieldMask, osg::PolygonForegroundBase::PositionsFieldMask, and osg::PolygonForegroundBase::TexCoordsFieldMask.

00310 {
00311     Inherited::copyFromBin(pMem, whichField);
00312 
00313     if(FieldBits::NoField != (MaterialFieldMask & whichField))
00314     {
00315         _sfMaterial.copyFromBin(pMem);
00316     }
00317 
00318     if(FieldBits::NoField != (PositionsFieldMask & whichField))
00319     {
00320         _mfPositions.copyFromBin(pMem);
00321     }
00322 
00323     if(FieldBits::NoField != (TexCoordsFieldMask & whichField))
00324     {
00325         _mfTexCoords.copyFromBin(pMem);
00326     }
00327 
00328     if(FieldBits::NoField != (NormalizedXFieldMask & whichField))
00329     {
00330         _sfNormalizedX.copyFromBin(pMem);
00331     }
00332 
00333     if(FieldBits::NoField != (NormalizedYFieldMask & whichField))
00334     {
00335         _sfNormalizedY.copyFromBin(pMem);
00336     }
00337 
00338 
00339 }

PolygonForegroundPtr osg::PolygonForegroundBase::create void   )  [inline, static, inherited]
 

Definition at line 72 of file OSGPolygonForegroundBase.inl.

References osg::AttachmentContainerPtr::dcast(), osg::PolygonForegroundBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::PolygonForegroundBase::shallowCopy().

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

PolygonForegroundPtr osg::PolygonForegroundBase::createEmpty void   )  [inline, static, inherited]
 

Definition at line