#include <OSGSimpleStatisticsForeground.h>
Inheritance diagram for osg::SimpleStatisticsForeground:

Public Types | |
| typedef SimpleStatisticsForegroundPtr | Ptr |
| enum | { FormatsFieldId = Inherited::NextFieldId, SizeFieldId = FormatsFieldId + 1, ColorFieldId = SizeFieldId + 1, NextFieldId = ColorFieldId + 1 } |
Public Member Functions | |
Handle Attachments | |
| *void | addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| void | subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| AttachmentPtr | findAttachment (UInt32 groupId, UInt16 binding=0) |
| AttachmentPtr | findAttachment (const FieldContainerType &type, UInt16 binding=0) |
| Field Access *SFAttachmentMap * | getSFAttachments (void) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Generic Field Access *Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
Handle Attachments | |
| *void | addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| void | subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| AttachmentPtr | findAttachment (UInt32 groupId, UInt16 binding=0) |
| AttachmentPtr | findAttachment (const FieldContainerType &type, UInt16 binding=0) |
| Field Access *SFAttachmentMap * | getSFAttachments (void) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Generic Field Access *Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
Handle Attachments | |
| *void | addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| void | subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| AttachmentPtr | findAttachment (UInt32 groupId, UInt16 binding=0) |
| AttachmentPtr | findAttachment (const FieldContainerType &type, UInt16 binding=0) |
| Field Access *SFAttachmentMap * | getSFAttachments (void) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Generic Field Access *Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Generic Field Access *Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
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 *action, Viewport *port) |
Convenience Functions | |
| *void | addElement (StatElemDescBase &desc, const char *format=NULL) |
| void | addElement (Int32 id, const char *format=NULL) |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *MFString * | getMFFormats (void) |
| Get the SimpleStatisticsForeground::_mfFormats field. | |
| SFReal32 * | getSFSize (void) |
| Get the SimpleStatisticsForeground::_sfSize field. | |
| SFColor4f * | getSFColor (void) |
| Get the SimpleStatisticsForeground::_sfColor field. | |
| Real32 & | getSize (void) |
| Get the value of the SimpleStatisticsForeground::_sfSize field. | |
| const Real32 & | getSize (void) const |
| Get the value of the SimpleStatisticsForeground::_sfSize field. | |
| Color4f & | getColor (void) |
| Get the value of the SimpleStatisticsForeground::_sfColor field. | |
| const Color4f & | getColor (void) const |
| Get the value of the SimpleStatisticsForeground::_sfColor field. | |
| std::string & | getFormats (const UInt32 index) |
| Get the value of the index element the SimpleStatisticsForeground::_mfFormats field. | |
| MFString & | getFormats (void) |
| Get the SimpleStatisticsForeground::_mfFormats field. | |
| const MFString & | getFormats (void) const |
| Get the SimpleStatisticsForeground::_mfFormats field. | |
Field Set | |
| *void | setSize (const Real32 &value) |
| Set the value of the SimpleStatisticsForeground::_sfSize field. | |
| void | setColor (const Color4f &value) |
| Set the value of the SimpleStatisticsForeground::_sfColor 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 |
Field Get | |
| *MFInt32 * | getMFElementIDs (void) |
| Get the StatisticsForeground::_mfElementIDs field. | |
| SFStatCollector * | getSFCollector (void) |
| Get the StatisticsForeground::_sfCollector field. | |
| StatCollector & | getCollector (void) |
| Get the value of the StatisticsForeground::_sfCollector field. | |
| const StatCollector & | getCollector (void) const |
| Get the value of the StatisticsForeground::_sfCollector field. | |
| Int32 & | getElementIDs (const UInt32 index) |
| Get the value of the index element the StatisticsForeground::_mfElementIDs field. | |
| MFInt32 & | getElementIDs (void) |
| Get the StatisticsForeground::_mfElementIDs field. | |
| const MFInt32 & | getElementIDs (void) const |
| Get the StatisticsForeground::_mfElementIDs field. | |
Field Set | |
| *void | setCollector (const StatCollector &value) |
| Set the value of the StatisticsForeground::_sfCollector field. | |
Field Get | |
| *SFBool * | getSFActive (void) |
| Get the Foreground::_sfActive field. | |
| bool & | getActive (void) |
| Get the value of the Foreground::_sfActive field. | |
| const bool & | getActive (void) const |
| Get the value of the Foreground::_sfActive field. | |
Field Set | |
| *void | setActive (const bool &value) |
| Set the value of the Foreground::_sfActive field. | |
Handle Attachments | |
| *void | addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| void | subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| AttachmentPtr | findAttachment (UInt32 groupId, UInt16 binding=0) |
| AttachmentPtr | findAttachment (const FieldContainerType &type, UInt16 binding=0) |
| Field Access *SFAttachmentMap * | getSFAttachments (void) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Generic Field Access *Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Generic Field Access *Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
Static Public Member Functions | |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Get Class Type Information | |
| static UInt16 | getClassGroupId (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 SimpleStatisticsForegroundPtr | create (void) |
| create a new instance of the class | |
| static SimpleStatisticsForegroundPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Class Get | |
| *static const char * | getClassname (void) |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Static Public Attributes | |
| static const osg::BitVector | FormatsFieldMask |
| static const osg::BitVector | SizeFieldMask |
| static const osg::BitVector | ColorFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const osg::BitVector | ElementIDsFieldMask |
| static const osg::BitVector | CollectorFieldMask |
| static const osg::BitVector | ActiveFieldMask |
| static const BitVector | AttachmentsFieldMask |
| static const BitVector | NextFieldMask |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
Protected Member Functions | |
Sync | |
| void | executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
Pointer | |
| *AttachmentContainerPtr | getPtr (void) |
MT Edit | |
| template<class FieldTypeT> | |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Sync | |
| void | executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
Pointer | |
| *AttachmentContainerPtr | getPtr (void) |
MT Edit | |
| template<class FieldTypeT> | |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Sync | |
| void | executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
Pointer | |
| *AttachmentContainerPtr | getPtr (void) |
MT Edit | |
| template<class FieldTypeT> | |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
MT Edit | |
| template<class FieldTypeT> | |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
Constructors | |
| * | SimpleStatisticsForeground (void) |
| SimpleStatisticsForeground (const SimpleStatisticsForeground &source) | |
Destructors | |
| *virtual | ~SimpleStatisticsForeground (void) |
Sync | |
| *void | executeSyncImpl (SimpleStatisticsForegroundBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (StatisticsForegroundBase *pOther, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (ForegroundBase *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
Pointer | |
| *AttachmentContainerPtr | getPtr (void) |
MT Edit | |
| template<class FieldTypeT> | |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
MT Edit | |
| template<class FieldTypeT> | |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
Static Protected Member Functions | |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Protected Attributes | |
Fields | |
| *SFAttachmentMap | _attachmentMap |
Member | |
| *UInt32 | _shares |
Fields | |
| *SFAttachmentMap | _attachmentMap |
Member | |
| *UInt32 | _shares |
Fields | |
| *SFAttachmentMap | _attachmentMap |
Member | |
| *UInt32 | _shares |
Member | |
| *UInt32 | _shares |
Fields | |
| *MFString | _mfFormats |
| SFReal32 | _sfSize |
| SFColor4f | _sfColor |
Fields | |
| *MFInt32 | _mfElementIDs |
| SFStatCollector | _sfCollector |
Fields | |
| *SFBool | _sfActive |
Fields | |
| *SFAttachmentMap | _attachmentMap |
Member | |
| *UInt32 | _shares |
Member | |
| *UInt32 | _shares |
Private Types | |
| typedef SimpleStatisticsForegroundBase | Inherited |
Private Member Functions | |
| void | operator= (const SimpleStatisticsForeground &source) |
Static Private Member Functions | |
| static void | initMethod (void) |
| static void | initText (void) |
Static Private Attributes | |
| static TextTXFFace * | _face = 0 |
| static TextureChunkPtr | _texchunk |
Friends | |
| class | FieldContainer |
| class | SimpleStatisticsForegroundBase |
The format string for the given elements are stored in the _mfFormats Field, the size and color used for all lines in _sfSize and _sfColor.
Definition at line 60 of file OSGSimpleStatisticsForeground.h.
|
|
Reimplemented from osg::SimpleStatisticsForegroundBase. Definition at line 64 of file OSGSimpleStatisticsForeground.h. |
|
|
Reimplemented from osg::StatisticsForegroundBase. Definition at line 92 of file OSGSimpleStatisticsForegroundBase.h. |
|
|
Reimplemented from osg::StatisticsForegroundBase. Definition at line 94 of file OSGSimpleStatisticsForegroundBase.h. 00095 { 00096 FormatsFieldId = Inherited::NextFieldId, 00097 SizeFieldId = FormatsFieldId + 1, 00098 ColorFieldId = SizeFieldId + 1, 00099 NextFieldId = ColorFieldId + 1 00100 };
|
|
|
Definition at line 82 of file OSGSimpleStatisticsForeground.cpp. 00082 : 00083 Inherited() 00084 { 00085 }
|
|
|
Definition at line 88 of file OSGSimpleStatisticsForeground.cpp. 00088 : 00089 Inherited(source) 00090 { 00091 }
|
|
|
Definition at line 94 of file OSGSimpleStatisticsForeground.cpp.
|
|
||||||||||||
|
Reimplemented from osg::StatisticsForeground. Definition at line 104 of file OSGSimpleStatisticsForeground.cpp. References osg::StatisticsForeground::changed(). 00105 { 00106 Inherited::changed(whichField, origin); 00107 }
|
|
||||||||||||
|
Reimplemented from osg::StatisticsForeground. Definition at line 110 of file OSGSimpleStatisticsForeground.cpp. References SLOG. 00111 { 00112 SLOG << "Dump SimpleStatisticsForeground NI" << std::endl; 00113 }
|
|
||||||||||||
|
Draw the statistics lines. Implements osg::StatisticsForeground. Definition at line 164 of file OSGSimpleStatisticsForeground.cpp. References _face, _texchunk, osg::TextLayoutParam::ALIGN_BEGIN, osg::TextTXFGlyph::COORD_BOTTOM, osg::TextTXFGlyph::COORD_LEFT, osg::TextTXFGlyph::COORD_RIGHT, osg::TextTXFGlyph::COORD_TOP, osg::StatisticsForegroundBase::getCollector(), osg::SimpleStatisticsForegroundBase::getColor(), osg::StatElem::getDesc(), osg::StatCollector::getElem(), osg::StatisticsForegroundBase::getElementIDs(), osg::SimpleStatisticsForegroundBase::getFormats(), osg::TextTXFGlyph::getHeight(), osg::StatElemDescBase::getName(), osg::TextLayoutResult::getNumGlyphs(), osg::StatCollector::getNumOfElems(), osg::Viewport::getPixelHeight(), osg::Viewport::getPixelWidth(), osg::SimpleStatisticsForegroundBase::getSize(), osg::TextTXFGlyph::getTexCoord(), osg::TextTXFFace::getTXFGlyph(), osg::TextTXFGlyph::getWidth(), GLboolean, osg::TextLayoutResult::indices, initText(), osg::TextTXFFace::layout(), osg::TextLayoutParam::majorAlignment, osg::TextLayoutParam::minorAlignment, osg::TextLayoutResult::positions, osg::StatElem::putToString(), osg::MField< FieldTypeT, fieldNameSpace >::size(), osg::IDString::str(), osg::VecStorage2< ValueTypeT >::x(), and osg::VecStorage2< ValueTypeT >::y(). 00165 { 00166 if (_face == 0) 00167 initText(); 00168 00169 Real32 pw = Real32(port->getPixelWidth ()); 00170 Real32 ph = Real32(port->getPixelHeight()); 00171 00172 if(pw < 1 || ph < 1) 00173 return; 00174 00175 GLboolean light = glIsEnabled(GL_LIGHTING); 00176 00177 GLint fill[2]; 00178 glGetIntegerv(GL_POLYGON_MODE, fill); 00179 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 00180 00181 GLboolean depth = glIsEnabled(GL_DEPTH_TEST); 00182 glDisable(GL_DEPTH_TEST); 00183 00184 GLboolean colmat = glIsEnabled(GL_COLOR_MATERIAL); 00185 glDisable(GL_COLOR_MATERIAL); 00186 00187 glMatrixMode(GL_MODELVIEW); 00188 glPushMatrix(); 00189 glLoadIdentity(); 00190 00191 glMatrixMode(GL_PROJECTION); 00192 glPushMatrix(); 00193 glLoadIdentity(); 00194 00195 Real32 aspect = pw / ph; 00196 Real32 size = getSize(); 00197 00198 glOrtho(-0.5, -0.5 + ph / size * aspect, 0.5 - ph / size, 0.5, 0, 1); 00199 00200 glAlphaFunc(GL_NOTEQUAL, 0); 00201 glEnable(GL_ALPHA_TEST); 00202 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 00203 glEnable(GL_BLEND); 00204 00205 // draw text 00206 std::vector < std::string > stat; 00207 00208 StatCollector *col = &getCollector(); 00209 StatElem *el; 00210 00211 if(getElementIDs().size() != 0) 00212 { 00213 for(UInt32 i = 0; i < getElementIDs().size(); ++i) 00214 { 00215 Int32 id(getElementIDs()[i]); 00216 el = ((id >= 0) ? col->getElem(id) : 0); 00217 00218 stat.resize(stat.size() + 1); 00219 std::vector < std::string >::iterator str = stat.end() - 1; 00220 00221 const char *format = NULL; 00222 if(i < getFormats().size() && getFormats()[i].length()) 00223 { 00224 format = getFormats()[i].c_str(); 00225 } 00226 00227 if (el) 00228 el->putToString(*str, format); 00229 else 00230 *str = format; 00231 } 00232 } 00233 else // fallback, show all elements 00234 { 00235 for(UInt32 i = 0; i < col->getNumOfElems(); ++i) 00236 { 00237 el = col->getElem(i, false); 00238 if(el) 00239 { 00240 std::string desc(el->getDesc()->getName().str()), eltext; 00241 00242 el->putToString(eltext); 00243 desc = desc + " : " + eltext; 00244 00245 stat.resize(stat.size() + 1); 00246 std::vector < std::string >::iterator str = stat.end() - 1; 00247 *str = desc; 00248 } 00249 } 00250 } 00251 00252 TextLayoutParam layoutParam; 00253 layoutParam.majorAlignment = TextLayoutParam::ALIGN_BEGIN; 00254 layoutParam.minorAlignment = TextLayoutParam::ALIGN_BEGIN; 00255 TextLayoutResult layoutResult; 00256 _face->layout(stat, layoutParam, layoutResult); 00257 00258 _texchunk->activate(action); 00259 00260 glColor4fv((GLfloat *) getColor().getValuesRGBA()); 00261 00262 glBegin(GL_QUADS); 00263 UInt32 i, numGlyphs = layoutResult.getNumGlyphs(); 00264 for(i = 0; i < numGlyphs; ++i) 00265 { 00266 const TextTXFGlyph &glyph = _face->getTXFGlyph(layoutResult.indices[i]); 00267 Real32 width = glyph.getWidth(); 00268 Real32 height = glyph.getHeight(); 00269 // No need to draw invisible glyphs 00270 if ((width <= 0.f) || (height <= 0.f)) 00271 continue; 00272 00273 // Calculate coordinates 00274 const Vec2f &pos = layoutResult.positions[i]; 00275 Real32 posLeft = pos.x(); 00276 Real32 posTop = pos.y(); 00277 Real32 posRight = pos.x() + width; 00278 Real32 posBottom = pos.y() - height; 00279 Real32 texCoordLeft = glyph.getTexCoord(TextTXFGlyph::COORD_LEFT); 00280 Real32 texCoordTop = glyph.getTexCoord(TextTXFGlyph::COORD_TOP); 00281 Real32 texCoordRight = glyph.getTexCoord(TextTXFGlyph::COORD_RIGHT); 00282 Real32 texCoordBottom = glyph.getTexCoord(TextTXFGlyph::COORD_BOTTOM); 00283 00284 // lower left corner 00285 glTexCoord2f(texCoordLeft, texCoordBottom); 00286 glVertex2f(posLeft, posBottom); 00287 00288 // lower right corner 00289 glTexCoord2f(texCoordRight, texCoordBottom); 00290 glVertex2f(posRight, posBottom); 00291 00292 // upper right corner 00293 glTexCoord2f(texCoordRight, texCoordTop); 00294 glVertex2f(posRight, posTop); 00295 00296 // upper left corner 00297 glTexCoord2f(texCoordLeft, texCoordTop); 00298 glVertex2f(posLeft, posTop); 00299 } 00300 glEnd(); 00301 00302 _texchunk->deactivate(action); 00303 00304 glDisable(GL_ALPHA_TEST); 00305 glDisable(GL_BLEND); 00306 00307 glMatrixMode(GL_PROJECTION); 00308 glPopMatrix(); 00309 00310 glMatrixMode(GL_MODELVIEW); 00311 glPopMatrix(); 00312 00313 if(depth == GL_TRUE) 00314 glEnable(GL_DEPTH_TEST); 00315 if(light == GL_TRUE) 00316 glEnable(GL_LIGHTING); 00317 if(colmat == GL_TRUE) 00318 glEnable(GL_COLOR_MATERIAL); 00319 00320 glPolygonMode(GL_FRONT_AND_BACK, fill[0]); 00321 }
|
|
||||||||||||
|
Convenience function to add an element and format. Definition at line 117 of file OSGSimpleStatisticsForeground.cpp. References osg::StatisticsForegroundBase::getElementIDs(), osg::SimpleStatisticsForegroundBase::getFormats(), osg::StatElemDescBase::getID(), and osg::MField< FieldTypeT, fieldNameSpace >::push_back(). |