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

osg::LineChunk Class Reference
[OpenGL State Handling]

State chunk for line-specific attributes. See LineChunk for a description. More...

#include <OSGLineChunk.h>

Inheritance diagram for osg::LineChunk:

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

Public Types

typedef LineChunkPtr Ptr
enum  {
  WidthFieldId = Inherited::NextFieldId, StippleRepeatFieldId = WidthFieldId + 1, StipplePatternFieldId = StippleRepeatFieldId + 1, SmoothFieldId = StipplePatternFieldId + 1,
  NextFieldId = SmoothFieldId + 1
}

Public Member Functions

Chunk Class Access
*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 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
FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFReal32getSFWidth (void)
 Get the LineChunk::_sfWidth field.
SFInt32getSFStippleRepeat (void)
 Get the LineChunk::_sfStippleRepeat field.
SFUInt16getSFStipplePattern (void)
 Get the LineChunk::_sfStipplePattern field.
SFBoolgetSFSmooth (void)
 Get the LineChunk::_sfSmooth field.
Real32getWidth (void)
 Get the value of the LineChunk::_sfWidth field.
const Real32getWidth (void) const
 Get the value of the LineChunk::_sfWidth field.
Int32getStippleRepeat (void)
 Get the value of the LineChunk::_sfStippleRepeat field.
const Int32getStippleRepeat (void) const
 Get the value of the LineChunk::_sfStippleRepeat field.
UInt16getStipplePattern (void)
 Get the value of the LineChunk::_sfStipplePattern field.
const UInt16getStipplePattern (void) const
 Get the value of the LineChunk::_sfStipplePattern field.
bool & getSmooth (void)
 Get the value of the LineChunk::_sfSmooth field.
const bool & getSmooth (void) const
 Get the value of the LineChunk::_sfSmooth field.
Field Set
*void setWidth (const Real32 &value)
 Set the value of the LineChunk::_sfWidth field.
void setStippleRepeat (const Int32 &value)
 Set the value of the LineChunk::_sfStippleRepeat field.
void setStipplePattern (const UInt16 &value)
 Set the value of the LineChunk::_sfStipplePattern field.
void setSmooth (const bool &value)
 Set the value of the LineChunk::_sfSmooth 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 LineChunkPtr create (void)
 create a new instance of the class
static LineChunkPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype

Static Public Attributes

static const osg::BitVector WidthFieldMask
static const osg::BitVector StippleRepeatFieldMask
static const osg::BitVector StipplePatternFieldMask
static const osg::BitVector SmoothFieldMask
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
LineChunk (void)
 LineChunk (const LineChunk &source)
Destructors
*virtual ~LineChunk (void)
Sync
*void executeSyncImpl (LineChunkBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)

Protected Attributes

Fields
*SFReal32 _sfWidth
SFInt32 _sfStippleRepeat
SFUInt16 _sfStipplePattern
SFBool _sfSmooth

Private Types

typedef LineChunkBase Inherited

Private Member Functions

void operator= (const LineChunk &source)

Static Private Member Functions

static void initMethod (void)

Static Private Attributes

static StateChunkClass _class

Friends

class FieldContainer
class LineChunkBase

Detailed Description

See LineChunk for a decription.

The parameters of the following functions are wrapped here: glLineWidth (osg::LineChunk::_sfWidth), glLineStipple (osg::LineChunk::_sfStippleRepeat, osg::LineChunk::_sfStipplePattern), glEnable(GL_LINE_SMOOTH) (osg::LineChunk::_sfSmooth).

Definition at line 55 of file OSGLineChunk.h.


Member Typedef Documentation

typedef LineChunkBase osg::LineChunk::Inherited [private]
 

Reimplemented from osg::LineChunkBase.

Definition at line 59 of file OSGLineChunk.h.

typedef LineChunkPtr osg::LineChunkBase::Ptr [inherited]
 

Reimplemented from osg::StateChunkBase.

Definition at line 93 of file OSGLineChunkBase.h.


Member Enumeration Documentation

anonymous enum [inherited]
 

Enumerator:
WidthFieldId 
StippleRepeatFieldId 
StipplePatternFieldId 
SmoothFieldId 
NextFieldId 

Reimplemented from osg::Attachment.

Definition at line 95 of file OSGLineChunkBase.h.

00096     {
00097         WidthFieldId          = Inherited::NextFieldId,
00098         StippleRepeatFieldId  = WidthFieldId          + 1,
00099         StipplePatternFieldId = StippleRepeatFieldId  + 1,
00100         SmoothFieldId         = StipplePatternFieldId + 1,
00101         NextFieldId           = SmoothFieldId         + 1
00102     };


Constructor & Destructor Documentation

LineChunk::LineChunk void   )  [protected]
 

Definition at line 99 of file OSGLineChunk.cpp.

00099                          :
00100     Inherited()
00101 {
00102 }

LineChunk::LineChunk const LineChunk source  )  [protected]
 

Definition at line 104 of file OSGLineChunk.cpp.

00104                                             :
00105     Inherited(source)
00106 {
00107 }

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

Definition at line 109 of file OSGLineChunk.cpp.

00110 {
00111 }


Member Function Documentation

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

Reimplemented from osg::StateChunk.

Definition at line 115 of file OSGLineChunk.cpp.

References _class.

00116 {
00117     return &_class;
00118 }

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

Reimplemented from osg::StateChunk.

Definition at line 46 of file OSGLineChunk.inl.

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

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

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

Reimplemented from osg::StateChunk.

Definition at line 52 of file OSGLineChunk.inl.

References _class.

Referenced by getStaticClassId().

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

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

Reimplemented from osg::StateChunk.

Definition at line 122 of file OSGLineChunk.cpp.

References osg::StateChunk::changed().

00123 {
00124     Inherited::changed(whichField, origin);
00125 }

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

Reimplemented from osg::StateChunk.

Definition at line 129 of file OSGLineChunk.cpp.

References SLOG.

00131 {
00132     SLOG << "Dump LineChunk NI" << std::endl;
00133 }

void LineChunk::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 138 of file OSGLineChunk.cpp.

References osg::LineChunkBase::_sfSmooth, osg::LineChunkBase::_sfStipplePattern, osg::LineChunkBase::_sfStippleRepeat, osg::LineChunkBase::_sfWidth, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by changeFrom().

00139 {
00140     if(_sfWidth.getValue() != 1)
00141     {
00142         glLineWidth(_sfWidth.getValue());
00143     }
00144     
00145     if(_sfStipplePattern.getValue() != 0xffffu)
00146     {
00147         glLineStipple(_sfStippleRepeat.getValue(), 
00148                       _sfStipplePattern.getValue());
00149         glEnable(GL_LINE_STIPPLE);
00150     }
00151     
00152     if(_sfSmooth.getValue())
00153     {
00154         glEnable(GL_LINE_SMOOTH);
00155     }
00156 }

void LineChunk::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 158 of file OSGLineChunk.cpp.

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

00159 {
00160     old_chunk->deactivate( act, index );
00161     activate( act, index );
00162 }

void LineChunk::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 164 of file OSGLineChunk.cpp.

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

00165 {
00166     if(_sfWidth.getValue() != 1)
00167     {
00168         glLineWidth(1);
00169     }
00170     
00171     if(_sfStipplePattern.getValue() != 0xffffu)
00172     {
00173         glDisable(GL_LINE_STIPPLE);
00174     }
00175     
00176     if(_sfSmooth.getValue())
00177     {
00178         glDisable(GL_LINE_SMOOTH);
00179     }
00180 }

Real32 LineChunk::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 184 of file OSGLineChunk.cpp.

00185 {
00186     return 0;
00187 }

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

Reimplemented from osg::StateChunk.

Definition at line 192 of file OSGLineChunk.cpp.

00193 {
00194     return this < &other;
00195 }

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

Reimplemented from osg::StateChunk.

Definition at line 200 of file OSGLineChunk.cpp.

References osg::LineChunkBase::getSmooth(), osg::LineChunkBase::getStipplePattern(), and osg::LineChunkBase::getWidth().

00201 {
00202     LineChunk const *tother = dynamic_cast<LineChunk const*>(&other);
00203 
00204     if(!tother)
00205         return false;
00206 
00207     if(tother == this)
00208         return true;
00209 
00210     if(getWidth()          != tother->getWidth()          ||
00211        getStipplePattern() != tother->getStipplePattern() ||
00212        getSmooth()         != tother->getSmooth()           )
00213         return false;
00214 
00215     return true;
00216 }

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

Reimplemented from osg::StateChunk.

Definition at line 221 of file OSGLineChunk.cpp.

00222 {
00223     return ! (*this == other);
00224 }

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

Reimplemented from osg::StateChunk.

Definition at line 83 of file OSGLineChunk.cpp.

References osg::StateChunk::initMethod().

00084 {
00085     Inherited::initMethod();
00086 }

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

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

Reimplemented from osg::StateChunkBase.

Definition at line 58 of file OSGLineChunkBase.inl.

References osg::LineChunkBase::_type.

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

00059 {
00060     return _type; 
00061 } 

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

Reimplemented from osg::StateChunkBase.

Definition at line 65 of file OSGLineChunkBase.inl.

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

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

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

Reimplemented from osg::StateChunkBase.

Definition at line 140 of file OSGLineChunkBase.cpp.

References osg::LineChunkBase::_type.

00141 {
00142     return _type; 
00143 } 

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

Reimplemented from osg::StateChunkBase.

Definition at line 145 of file OSGLineChunkBase.cpp.

References osg::LineChunkBase::_type.

00146 {
00147     return _type;
00148 } 

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

Reimplemented from osg::StateChunkBase.

Definition at line 160 of file OSGLineChunkBase.cpp.

00161 { 
00162     return sizeof(LineChunk); 
00163 }

SFReal32 * osg::LineChunkBase::getSFWidth void   )  [inline, inherited]
 

Definition at line 101 of file OSGLineChunkBase.inl.

References osg::LineChunkBase::_sfWidth.

00102 {
00103     return &_sfWidth;
00104 }

SFInt32 * osg::LineChunkBase::getSFStippleRepeat void   )  [inline, inherited]
 

Definition at line 108 of file OSGLineChunkBase.inl.

References osg::LineChunkBase::_sfStippleRepeat.

00109 {
00110     return &_sfStippleRepeat;
00111 }

SFUInt16 * osg::LineChunkBase::getSFStipplePattern void   )  [inline, inherited]
 

Definition at line 115 of file OSGLineChunkBase.inl.

References osg::LineChunkBase::_sfStipplePattern.

00116 {
00117     return &_sfStipplePattern;
00118 }

SFBool * osg::LineChunkBase::getSFSmooth void   )  [inline, inherited]
 

Definition at line 122 of file OSGLineChunkBase.inl.

References osg::LineChunkBase::_sfSmooth.

00123 {
00124     return &_sfSmooth;
00125 }

Real32 & osg::LineChunkBase::getWidth void   )  [inline, inherited]
 

Definition at line 130 of file OSGLineChunkBase.inl.

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

Referenced by operator==().

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

const Real32 & osg::LineChunkBase::getWidth void   )  const [inline, inherited]
 

Definition at line 137 of file OSGLineChunkBase.inl.

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

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

Int32 & osg::LineChunkBase::getStippleRepeat void   )  [inline, inherited]
 

Definition at line 151 of file OSGLineChunkBase.inl.

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

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

const Int32 & osg::LineChunkBase::getStippleRepeat void   )  const [inline, inherited]
 

Definition at line 158 of file OSGLineChunkBase.inl.

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

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

UInt16 & osg::LineChunkBase::getStipplePattern void   )  [inline, inherited]
 

Definition at line 172 of file OSGLineChunkBase.inl.

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

Referenced by operator==().

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

const UInt16 & osg::LineChunkBase::getStipplePattern void   )  const [inline, inherited]
 

Definition at line 179 of file OSGLineChunkBase.inl.

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

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

bool & osg::LineChunkBase::getSmooth void   )  [inline, inherited]
 

Definition at line 193 of file OSGLineChunkBase.inl.

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

Referenced by operator==().

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

const bool & osg::LineChunkBase::getSmooth void   )  const [inline, inherited]
 

Definition at line 200 of file OSGLineChunkBase.inl.

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

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

void osg::LineChunkBase::setWidth const Real32 value  )  [inline, inherited]
 

Definition at line 144 of file OSGLineChunkBase.inl.

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

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

void osg::LineChunkBase::setStippleRepeat const Int32 value  )  [inline, inherited]
 

Definition at line 165 of file OSGLineChunkBase.inl.

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

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

void osg::LineChunkBase::setStipplePattern const UInt16 value  )  [inline, inherited]
 

Definition at line 186 of file OSGLineChunkBase.inl.

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

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

void osg::LineChunkBase::setSmooth const bool &  value  )  [inline, inherited]
 

Definition at line 207 of file OSGLineChunkBase.inl.

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

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

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

Reimplemented from osg::StateChunkBase.

Definition at line 228 of file OSGLineChunkBase.cpp.

References osg::LineChunkBase::_sfSmooth, osg::LineChunkBase::_sfStipplePattern, osg::LineChunkBase::_sfStippleRepeat, osg::LineChunkBase::_sfWidth, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::StateChunkBase::getBinSize(), osg::FieldBits::NoField, osg::LineChunkBase::SmoothFieldMask, osg::LineChunkBase::StipplePatternFieldMask, osg::LineChunkBase::StippleRepeatFieldMask, and osg::LineChunkBase::WidthFieldMask.

00229 {
00230     UInt32 returnValue = Inherited::getBinSize(whichField);
00231 
00232     if(FieldBits::NoField != (WidthFieldMask & whichField))
00233     {
00234         returnValue += _sfWidth.getBinSize();
00235     }
00236 
00237     if(FieldBits::NoField != (StippleRepeatFieldMask & whichField))
00238     {
00239         returnValue += _sfStippleRepeat.getBinSize();
00240     }
00241 
00242     if(FieldBits::NoField != (StipplePatternFieldMask & whichField))
00243     {
00244         returnValue += _sfStipplePattern.getBinSize();
00245     }
00246 
00247     if(FieldBits::NoField != (SmoothFieldMask & whichField))
00248     {
00249         returnValue += _sfSmooth.getBinSize();
00250     }
00251 
00252 
00253     return returnValue;
00254 }

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

Reimplemented from osg::StateChunkBase.

Definition at line 256 of file OSGLineChunkBase.cpp.

References osg::LineChunkBase::_sfSmooth, osg::LineChunkBase::_sfStipplePattern, osg::LineChunkBase::_sfStippleRepeat, osg::LineChunkBase::_sfWidth, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::StateChunkBase::copyToBin(), osg::FieldBits::NoField, osg::LineChunkBase::SmoothFieldMask, osg::LineChunkBase::StipplePatternFieldMask, osg::LineChunkBase::StippleRepeatFieldMask, and osg::LineChunkBase::WidthFieldMask.

00258 {
00259     Inherited::copyToBin(pMem, whichField);
00260 
00261     if(FieldBits::NoField != (WidthFieldMask & whichField))
00262     {
00263         _sfWidth.copyToBin(pMem);
00264     }
00265 
00266     if(FieldBits::NoField != (StippleRepeatFieldMask & whichField))
00267     {
00268         _sfStippleRepeat.copyToBin(pMem);
00269     }
00270 
00271     if(FieldBits::NoField != (StipplePatternFieldMask & whichField))
00272     {
00273         _sfStipplePattern.copyToBin(pMem);
00274     }
00275 
00276     if(FieldBits::NoField != (SmoothFieldMask & whichField))
00277     {
00278         _sfSmooth.copyToBin(pMem);
00279     }
00280 
00281 
00282 }

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

Reimplemented from osg::StateChunkBase.

Definition at line 284 of file OSGLineChunkBase.cpp.

References osg::LineChunkBase::_sfSmooth, osg::LineChunkBase::_sfStipplePattern, osg::LineChunkBase::_sfStippleRepeat, osg::LineChunkBase::_sfWidth, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::StateChunkBase::copyFromBin(), osg::FieldBits::NoField, osg::LineChunkBase::SmoothFieldMask, osg::LineChunkBase::StipplePatternFieldMask, osg::LineChunkBase::StippleRepeatFieldMask, and osg::LineChunkBase::WidthFieldMask.

00286 {
00287     Inherited::copyFromBin(pMem, whichField);
00288 
00289     if(FieldBits::NoField != (WidthFieldMask & whichField))
00290     {
00291         _sfWidth.copyFromBin(pMem);
00292     }
00293 
00294     if(FieldBits::NoField != (StippleRepeatFieldMask & whichField))
00295     {
00296         _sfStippleRepeat.copyFromBin(pMem);
00297     }
00298 
00299     if(FieldBits::NoField != (StipplePatternFieldMask & whichField))
00300     {
00301         _sfStipplePattern.copyFromBin(pMem);
00302     }
00303 
00304     if(FieldBits::NoField != (SmoothFieldMask & whichField))
00305     {
00306         _sfSmooth.copyFromBin(pMem);
00307     }
00308 
00309 
00310 }

LineChunkPtr osg::LineChunkBase::create void   )  [inline, static, inherited]
 

Reimplemented from osg::Attachment.

Definition at line 72 of file OSGLineChunkBase.inl.

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

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

LineChunkPtr osg::LineChunkBase::createEmpty void   )  [inline, static, inherited]
 

Reimplemented from osg::Attachment.

Definition at line 87 of file OSGLineChunkBase.inl.

References osg::FieldContainer::newPtr().

00088 { 
00089     LineChunkPtr returnValue; 
00090     
00091     newPtr(returnValue); 
00092 
00093     return returnValue; 
00094 }

FieldContainerPtr LineChunkBase::shallowCopy void   )  const [virtual, inherited]
 

Reimplemented from osg::Attachment.

Definition at line 151 of file OSGLineChunkBase.cpp.

References osg::FieldContainer::newPtr().

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