#include <OSGLineChunk.h>
Inheritance diagram for osg::LineChunk:

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 StateChunkClass * | getClass (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 FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFReal32 * | getSFWidth (void) |
| Get the LineChunk::_sfWidth field. | |
| SFInt32 * | getSFStippleRepeat (void) |
| Get the LineChunk::_sfStippleRepeat field. | |
| SFUInt16 * | getSFStipplePattern (void) |
| Get the LineChunk::_sfStipplePattern field. | |
| SFBool * | getSFSmooth (void) |
| Get the LineChunk::_sfSmooth field. | |
| Real32 & | getWidth (void) |
| Get the value of the LineChunk::_sfWidth field. | |
| const Real32 & | getWidth (void) const |
| Get the value of the LineChunk::_sfWidth field. | |
| Int32 & | getStippleRepeat (void) |
| Get the value of the LineChunk::_sfStippleRepeat field. | |
| const Int32 & | getStippleRepeat (void) const |
| Get the value of the LineChunk::_sfStippleRepeat field. | |
| UInt16 & | getStipplePattern (void) |
| Get the value of the LineChunk::_sfStipplePattern field. | |
| const UInt16 & | getStipplePattern (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 StateChunkClass * | getStaticClass (void) |
Class Get | |
| *static FieldContainerType & | getClassType (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 |
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.
|
|
Reimplemented from osg::LineChunkBase. Definition at line 59 of file OSGLineChunk.h. |
|
|
Reimplemented from osg::StateChunkBase. Definition at line 93 of file OSGLineChunkBase.h. |
|
|
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 };
|
|
|
Definition at line 99 of file OSGLineChunk.cpp. 00099 : 00100 Inherited() 00101 { 00102 }
|
|
|
Definition at line 104 of file OSGLineChunk.cpp. 00104 : 00105 Inherited(source) 00106 { 00107 }
|
|
|
Definition at line 109 of file OSGLineChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 115 of file OSGLineChunk.cpp. References _class. 00116 { 00117 return &_class; 00118 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 46 of file OSGLineChunk.inl. References osg::StateChunkClass::getId(), and getStaticClass(). 00047 { 00048 return getStaticClass()->getId(); 00049 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 52 of file OSGLineChunk.inl. References _class. Referenced by getStaticClassId(). 00053 { 00054 return &LineChunk::_class; 00055 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Definition at line 122 of file OSGLineChunk.cpp. References osg::StateChunk::changed(). 00123 { 00124 Inherited::changed(whichField, origin); 00125 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Definition at line 129 of file OSGLineChunk.cpp. References SLOG. 00131 { 00132 SLOG << "Dump LineChunk NI" << std::endl; 00133 }
|
|
||||||||||||
|
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 }
|
|
||||||||||||||||
|
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 }
|
|
||||||||||||
|
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 }
|
|
|
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.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 192 of file OSGLineChunk.cpp.
|
|
|
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 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 221 of file OSGLineChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 83 of file OSGLineChunk.cpp. References osg::StateChunk::initMethod(). 00084 { 00085 Inherited::initMethod(); 00086 }
|
|
|
|
|
|
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 }
|
|
|
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 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 140 of file OSGLineChunkBase.cpp. References osg::LineChunkBase::_type. 00141 { 00142 return _type; 00143 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 145 of file OSGLineChunkBase.cpp. References osg::LineChunkBase::_type. 00146 { 00147 return _type; 00148 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 160 of file OSGLineChunkBase.cpp. 00161 { 00162 return sizeof(LineChunk); 00163 }
|
|
|
Definition at line 101 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfWidth. 00102 { 00103 return &_sfWidth; 00104 }
|
|
|
Definition at line 108 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfStippleRepeat. 00109 { 00110 return &_sfStippleRepeat; 00111 }
|
|
|
Definition at line 115 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfStipplePattern. 00116 { 00117 return &_sfStipplePattern; 00118 }
|
|
|
Definition at line 122 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfSmooth. 00123 { 00124 return &_sfSmooth; 00125 }
|
|
|
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 }
|
|
|
Definition at line 137 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfWidth, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00138 { 00139 return _sfWidth.getValue(); 00140 }
|
|
|
Definition at line 151 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfStippleRepeat, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00152 { 00153 return _sfStippleRepeat.getValue(); 00154 }
|
|
|
Definition at line 158 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfStippleRepeat, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00159 { 00160 return _sfStippleRepeat.getValue(); 00161 }
|
|
|
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 }
|
|
|
Definition at line 179 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfStipplePattern, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00180 { 00181 return _sfStipplePattern.getValue(); 00182 }
|
|
|
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 }
|
|
|
Definition at line 200 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfSmooth, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00201 { 00202 return _sfSmooth.getValue(); 00203 }
|
|
|
Definition at line 144 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfWidth, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Definition at line 165 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfStippleRepeat, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00166 { 00167 _sfStippleRepeat.setValue(value); 00168 }
|
|
|
Definition at line 186 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfStipplePattern, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00187 { 00188 _sfStipplePattern.setValue(value); 00189 }
|
|
|
Definition at line 207 of file OSGLineChunkBase.inl. References osg::LineChunkBase::_sfSmooth, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
||||||||||||
|
||||||||||||
|
|
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 }
|
|
|
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 }
|
|
|
Reimplemented from osg::Attachment. Definition at line 151 of file OSGLineChunkBase.cpp. References osg::FieldContainer::newPtr(). Referenced by osg::LineChunkBase::create(). |