|
Public Types |
| enum | Type {
OSG_ANALOG = 0,
OSG_BAR = 1,
OSG_CHART = 2,
OSG_LINE_CHART = 3,
OSG_TEXT = 4
} |
| enum | Mode {
OSG_OVERFLOW_RESIZE = 1,
OSG_UNDERFLOW_RESIZE = 2,
OSG_RECIPROC = 4,
OSG_SMOOTH = 8,
OSG_ENABLE_POINTS = 16,
OSG_MAX_TEXT = 32,
OSG_MIN_TEXT = 64
} |
| enum | TextHA { OSG_LEFT = 0,
OSG_RIGHT = 1,
OSG_CENTER = 2
} |
| enum | TextVA { OSG_BOTTOM = 0,
OSG_MIDDLE = 1,
OSG_TOP = 2
} |
| typedef GraphicStatisticsForegroundPtr | Ptr |
| enum | {
DisplayTypeFieldId = Inherited::NextFieldId,
SizeFieldId = DisplayTypeFieldId + 1,
PosFieldId = SizeFieldId + 1,
ColorMaxFieldId = PosFieldId + 1,
ColorMinFieldId = ColorMaxFieldId + 1,
ColorCurrentFieldId = ColorMinFieldId + 1,
MinValueFieldId = ColorCurrentFieldId + 1,
MaxValueFieldId = MinValueFieldId + 1,
FlagsFieldId = MaxValueFieldId + 1,
HistorySizeFieldId = FlagsFieldId + 1,
DescriptionFieldId = HistorySizeFieldId + 1,
LineWidthFieldId = DescriptionFieldId + 1,
BackgroundColorFieldId = LineWidthFieldId + 1,
TextEnabledFieldId = BackgroundColorFieldId + 1,
BackgroundEnabledFieldId = TextEnabledFieldId + 1,
BorderEnabledFieldId = BackgroundEnabledFieldId + 1,
NextFieldId = BorderEnabledFieldId + 1
} |
Public Member Functions |
|
| *virtual void | changed (BitVector whichField, UInt32 from) |
|
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
| void | draw (DrawActionBase *, Viewport *) |
| | draws the forground
|
| void | addElement (StatElemDescBase &desc, UInt32 displayType, Vec2f pos, Vec2f size, Color4f highColor, Color4f lowColor, Color4f currentColor, Real32 minValue=0.0, Real32 maxValue=0.0, UInt32 Flags=OSG_UNDERFLOW_RESIZE|OSG_OVERFLOW_RESIZE, UInt32 historySize=0, std::string description="") |
| | Add an Element to be shown.
|
| void | removeElement (StatElemDescBase &desc) |
|
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
|
| *MFString * | getMFDescription (void) |
| | Get the GraphicStatisticsForeground::_mfDescription field.
|
| SFReal32 * | getSFLineWidth (void) |
| | Get the GraphicStatisticsForeground::_sfLineWidth field.
|
| SFColor3f * | getSFBackgroundColor (void) |
| | Get the GraphicStatisticsForeground::_sfBackgroundColor field.
|
| SFBool * | getSFTextEnabled (void) |
| | Get the GraphicStatisticsForeground::_sfTextEnabled field.
|
| SFBool * | getSFBackgroundEnabled (void) |
| | Get the GraphicStatisticsForeground::_sfBackgroundEnabled field.
|
| SFBool * | getSFBorderEnabled (void) |
| | Get the GraphicStatisticsForeground::_sfBorderEnabled field.
|
| Real32 & | getLineWidth (void) |
| | Get the value of the GraphicStatisticsForeground::_sfLineWidth field.
|
| const Real32 & | getLineWidth (void) const |
| | Get the value of the GraphicStatisticsForeground::_sfLineWidth field.
|
| Color3f & | getBackgroundColor (void) |
| | Get the value of the GraphicStatisticsForeground::_sfBackgroundColor field.
|
| const Color3f & | getBackgroundColor (void) const |
| | Get the value of the GraphicStatisticsForeground::_sfBackgroundColor field.
|
| bool & | getTextEnabled (void) |
| | Get the value of the GraphicStatisticsForeground::_sfTextEnabled field.
|
| const bool & | getTextEnabled (void) const |
| | Get the value of the GraphicStatisticsForeground::_sfTextEnabled field.
|
| bool & | getBackgroundEnabled (void) |
| | Get the value of the GraphicStatisticsForeground::_sfBackgroundEnabled field.
|
| const bool & | getBackgroundEnabled (void) const |
| | Get the value of the GraphicStatisticsForeground::_sfBackgroundEnabled field.
|
| bool & | getBorderEnabled (void) |
| | Get the value of the GraphicStatisticsForeground::_sfBorderEnabled field.
|
| const bool & | getBorderEnabled (void) const |
| | Get the value of the GraphicStatisticsForeground::_sfBorderEnabled field.
|
| std::string & | getDescription (const UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfDescription field.
|
| MFString & | getDescription (void) |
| | Get the GraphicStatisticsForeground::_mfDescription field.
|
| const MFString & | getDescription (void) const |
| | Get the GraphicStatisticsForeground::_mfDescription field.
|
|
| *void | setLineWidth (const Real32 &value) |
| | Set the value of the GraphicStatisticsForeground::_sfLineWidth field.
|
| void | setBackgroundColor (const Color3f &value) |
| | Set the value of the GraphicStatisticsForeground::_sfBackgroundColor field.
|
| void | setTextEnabled (const bool &value) |
| | Set the value of the GraphicStatisticsForeground::_sfTextEnabled field.
|
| void | setBackgroundEnabled (const bool &value) |
| | Set the value of the GraphicStatisticsForeground::_sfBackgroundEnabled field.
|
| void | setBorderEnabled (const bool &value) |
| | Set the value of the GraphicStatisticsForeground::_sfBorderEnabled field.
|
|
| *virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
|
| *virtual FieldContainerPtr | shallowCopy (void) const |
|
| *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.
|
|
| *void | setCollector (const StatCollector &value) |
| | Set the value of the StatisticsForeground::_sfCollector field.
|
|
| *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.
|
|
| *void | setActive (const bool &value) |
| | Set the value of the Foreground::_sfActive field.
|
|
| *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) |
|
| 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 |
|
| *static FieldContainerType & | getClassType (void) |
| | access the type of the class
|
| static UInt32 | getClassTypeId (void) |
| | access the numerical type of the class
|
|
| *static GraphicStatisticsForegroundPtr | create (void) |
| | create a new instance of the class
|
| static GraphicStatisticsForegroundPtr | createEmpty (void) |
| | create an empty new instance of the class, do not copy the prototype
|
|
| *static const char * | getClassname (void) |
|
| static UInt16 | getClassGroupId (void) |
Static Public Attributes |
| static const osg::BitVector | DisplayTypeFieldMask |
| static const osg::BitVector | SizeFieldMask |
| static const osg::BitVector | PosFieldMask |
| static const osg::BitVector | ColorMaxFieldMask |
| static const osg::BitVector | ColorMinFieldMask |
| static const osg::BitVector | ColorCurrentFieldMask |
| static const osg::BitVector | MinValueFieldMask |
| static const osg::BitVector | MaxValueFieldMask |
| static const osg::BitVector | FlagsFieldMask |
| static const osg::BitVector | HistorySizeFieldMask |
| static const osg::BitVector | DescriptionFieldMask |
| static const osg::BitVector | LineWidthFieldMask |
| static const osg::BitVector | BackgroundColorFieldMask |
| static const osg::BitVector | TextEnabledFieldMask |
| static const osg::BitVector | BackgroundEnabledFieldMask |
| static const osg::BitVector | BorderEnabledFieldMask |
| 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 |
|
| static const bool | isNodeCore = false |
Protected Member Functions |
| void | drawAnalog (UInt32, StatElem *, DrawActionBase *, Viewport *) |
| | Draw an analog Display.
|
| void | drawChart (UInt32, StatElem *, DrawActionBase *, Viewport *) |
| | Draw a chart of the StatElem.
|
| void | drawLineChart (UInt32, StatElem *, DrawActionBase *, Viewport *) |
| | Draw a line-chart of the StatElem.
|
| void | drawBar (UInt32, StatElem *, DrawActionBase *, Viewport *) |
| | Draw a Bar of the StatElem.
|
| void | drawText (UInt32, StatElem *, DrawActionBase *, Viewport *) |
| | Draw just Text to represent the Statistics Data.
|
| void | initText (void) |
| | initializes the text
|
| void | drawString (DrawActionBase *base, const std::string &text, TextLayoutParam::Alignment majorAlignment=TextLayoutParam::ALIGN_FIRST, TextLayoutParam::Alignment minorAlignment=TextLayoutParam::ALIGN_END) |
| | Draws a string.
|
| std::string | real2String (Real32 value, char *format=0) |
| | Converts a Real32 to a string.
|
| void | calcPosAndSize (const UInt32 &elementID, Viewport *port, Vec2f *Position, Vec2f *Size) |
| | Calculate the position an size of an element.
|
| void | processValue (Real32 &value, const UInt32 &elementID) |
| | Calculate the "real" value based on the value and the Flags.
|
| void | processOnlyValue (Real32 &value, const UInt32 &elementID) |
| void | addValueToHistory (Real32 &value, const UInt32 &elementID) |
|
| * | GraphicStatisticsForeground (void) |
| | GraphicStatisticsForeground (const GraphicStatisticsForeground &source) |
|
| *virtual | ~GraphicStatisticsForeground (void) |
|
| *MFUInt32 * | getMFDisplayType (void) |
| | Get the GraphicStatisticsForeground::_mfDisplayType field.
|
| MFVec2f * | getMFSize (void) |
| | Get the GraphicStatisticsForeground::_mfSize field.
|
| MFVec2f * | getMFPos (void) |
| | Get the GraphicStatisticsForeground::_mfPos field.
|
| MFColor4f * | getMFColorMax (void) |
| | Get the GraphicStatisticsForeground::_mfColorMax field.
|
| MFColor4f * | getMFColorMin (void) |
| | Get the GraphicStatisticsForeground::_mfColorMin field.
|
| MFColor4f * | getMFColorCurrent (void) |
| | Get the GraphicStatisticsForeground::_mfColorCurrent field.
|
| MFReal32 * | getMFMinValue (void) |
| | Get the GraphicStatisticsForeground::_mfMinValue field.
|
| MFReal32 * | getMFMaxValue (void) |
| | Get the GraphicStatisticsForeground::_mfMaxValue field.
|
| MFUInt32 * | getMFFlags (void) |
| | Get the GraphicStatisticsForeground::_mfFlags field.
|
| MFUInt32 * | getMFHistorySize (void) |
| | Get the GraphicStatisticsForeground::_mfHistorySize field.
|
| UInt32 & | getDisplayType (UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfDisplayType field.
|
| MFUInt32 & | getDisplayType (void) |
| | Get the GraphicStatisticsForeground::_mfDisplayType field.
|
| const MFUInt32 & | getDisplayType (void) const |
| | Get the GraphicStatisticsForeground::_mfDisplayType field.
|
| Vec2f & | getSize (UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfSize field.
|
| MFVec2f & | getSize (void) |
| | Get the GraphicStatisticsForeground::_mfSize field.
|
| const MFVec2f & | getSize (void) const |
| | Get the GraphicStatisticsForeground::_mfSize field.
|
| Vec2f & | getPos (UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfPos field.
|
| MFVec2f & | getPos (void) |
| | Get the GraphicStatisticsForeground::_mfPos field.
|
| const MFVec2f & | getPos (void) const |
| | Get the GraphicStatisticsForeground::_mfPos field.
|
| Color4f & | getColorMax (UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfColorMax field.
|
| MFColor4f & | getColorMax (void) |
| | Get the GraphicStatisticsForeground::_mfColorMax field.
|
| const MFColor4f & | getColorMax (void) const |
| | Get the GraphicStatisticsForeground::_mfColorMax field.
|
| Color4f & | getColorMin (UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfColorMin field.
|
| MFColor4f & | getColorMin (void) |
| | Get the GraphicStatisticsForeground::_mfColorMin field.
|
| const MFColor4f & | getColorMin (void) const |
| | Get the GraphicStatisticsForeground::_mfColorMin field.
|
| Color4f & | getColorCurrent (UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfColorCurrent field.
|
| MFColor4f & | getColorCurrent (void) |
| | Get the GraphicStatisticsForeground::_mfColorCurrent field.
|
| const MFColor4f & | getColorCurrent (void) const |
| | Get the GraphicStatisticsForeground::_mfColorCurrent field.
|
| Real32 & | getMinValue (UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfMinValue field.
|
| MFReal32 & | getMinValue (void) |
| | Get the GraphicStatisticsForeground::_mfMinValue field.
|
| const MFReal32 & | getMinValue (void) const |
| | Get the GraphicStatisticsForeground::_mfMinValue field.
|
| Real32 & | getMaxValue (UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfMaxValue field.
|
| MFReal32 & | getMaxValue (void) |
| | Get the GraphicStatisticsForeground::_mfMaxValue field.
|
| const MFReal32 & | getMaxValue (void) const |
| | Get the GraphicStatisticsForeground::_mfMaxValue field.
|
| UInt32 & | getFlags (UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfFlags field.
|
| MFUInt32 & | getFlags (void) |
| | Get the GraphicStatisticsForeground::_mfFlags field.
|
| const MFUInt32 & | getFlags (void) const |
| | Get the GraphicStatisticsForeground::_mfFlags field.
|
| UInt32 & | getHistorySize (UInt32 index) |
| | Get the value of the index element the GraphicStatisticsForeground::_mfHistorySize field.
|
| MFUInt32 & | getHistorySize (void) |
| | Get the GraphicStatisticsForeground::_mfHistorySize field.
|
| const MFUInt32 & | getHistorySize (void) const |
| | Get the GraphicStatisticsForeground::_mfHistorySize field.
|
|
| *void | executeSyncImpl (GraphicStatisticsForegroundBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
|
| *void | executeSyncImpl (StatisticsForegroundBase *pOther, const BitVector &whichField) |
|
| *void | executeSyncImpl (ForegroundBase *pOther, const BitVector &whichField) |
|
| void | executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField) |
|
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
|
| *AttachmentContainerPtr | getPtr (void) |
|
| template<class FieldTypeT> |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
|
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
|
| *virtual void | onDestroy (void) |
Static Protected Member Functions |
|
| template<class ObjectPtrT> |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> |
| static void | newPtr (ObjectPtrT &result) |
Protected Attributes |
|
| *MFUInt32 | _mfDisplayType |
| MFVec2f | _mfSize |
| MFVec2f | _mfPos |
| MFColor4f | _mfColorMax |
| MFColor4f | _mfColorMin |
| MFColor4f | _mfColorCurrent |
| MFReal32 | _mfMinValue |
| MFReal32 | _mfMaxValue |
| MFUInt32 | _mfFlags |
| MFUInt32 | _mfHistorySize |
| MFString | _mfDescription |
| SFReal32 | _sfLineWidth |
| SFColor3f | _sfBackgroundColor |
| SFBool | _sfTextEnabled |
| SFBool | _sfBackgroundEnabled |
| SFBool | _sfBorderEnabled |
|
| *MFInt32 | _mfElementIDs |
| SFStatCollector | _sfCollector |
|
| *SFBool | _sfActive |
|
| *SFAttachmentMap | _attachmentMap |
|
| *UInt32 | _shares |
Private Types |
| typedef GraphicStatisticsForegroundBase | Inherited |
Private Member Functions |
| void | operator= (const GraphicStatisticsForeground &source) |
Static Private Member Functions |
| static void | initMethod (void) |
Private Attributes |
std::vector< std::vector<
Real32 > > | _history |
| std::vector< UInt32 > | _historyID |
Static Private Attributes |
| static TextTXFFace * | _face = 0 |
| static TextureChunkPtr | _texchunk |
Friends |
| class | FieldContainer |
| class | GraphicStatisticsForegroundBase |
The different parameters for all the displays are spread over a lot of fields. Thus it is stringly advised to use the addElement and removeElement convenience functions to add and remove elements, to ensure consistency.
The _sfLineWidth, _sfBackgroundColor, _sfBackgroundEnabled and _sfBorderEnabled Fields control the parameters used for all displays.