Open CASCADE Technology  7.3.0
Public Member Functions | Protected Attributes

OpenGl_FrameStatsPrs Class Reference

Element rendering frame statistics. More...

#include <OpenGl_FrameStatsPrs.hxx>

Inheritance diagram for OpenGl_FrameStatsPrs:
Inheritance graph
[legend]

Public Member Functions

 OpenGl_FrameStatsPrs ()
 Default constructor. More...
 
virtual ~OpenGl_FrameStatsPrs ()
 Destructor. More...
 
virtual void Render (const Handle< OpenGl_Workspace > &theWorkspace) const override
 Render element. More...
 
virtual void Release (OpenGl_Context *theCtx) override
 Release OpenGL resources. More...
 
void Update (const Handle< OpenGl_Workspace > &theWorkspace)
 Update text. More...
 
void SetTextAspect (const Handle< Graphic3d_AspectText3d > &theAspect)
 Assign text aspect. More...
 
- Public Member Functions inherited from OpenGl_Text
 OpenGl_Text (const Standard_Utf8Char *theText, const OpenGl_Vec3 &thePoint, const OpenGl_TextParam &theParams)
 Main constructor. More...
 
 OpenGl_Text (const Standard_Utf8Char *theText, const gp_Ax2 &theOrientation, const OpenGl_TextParam &theParams, const bool theHasOwnAnchor=true)
 Creates new text in 3D space. More...
 
void Init (const Handle< OpenGl_Context > &theCtx, const Standard_Utf8Char *theText, const OpenGl_Vec3 &thePoint)
 Setup new string and position. More...
 
void Init (const Handle< OpenGl_Context > &theCtx, const Standard_Utf8Char *theText, const OpenGl_Vec3 &thePoint, const OpenGl_TextParam &theParams)
 Setup new string and parameters. More...
 
void SetPosition (const OpenGl_Vec3 &thePoint)
 Setup new position. More...
 
void SetFontSize (const Handle< OpenGl_Context > &theContext, const Standard_Integer theFontSize)
 Setup new font size. More...
 
 OpenGl_Text ()
 Empty constructor. More...
 
void Init (const Handle< OpenGl_Context > &theCtx, const TCollection_ExtendedString &theText, const OpenGl_Vec2 &thePoint, const OpenGl_TextParam &theParams)
 Setup new string and parameters. More...
 
void Render (const Handle< OpenGl_Context > &theCtx, const OpenGl_AspectText &theTextAspect, const unsigned int theResolution=Graphic3d_RenderingParams::THE_DEFAULT_RESOLUTION) const
 Perform rendering. More...
 
- Public Member Functions inherited from OpenGl_Element
 OpenGl_Element ()
 
virtual Standard_Boolean IsFillDrawMode () const
 Return TRUE if primitive type generates shaded triangulation (to be used in filters). More...
 
Standard_Boolean RenderFiltered (const Handle< OpenGl_Workspace > &theWorkspace, const Handle< OpenGl_RenderFilter > &theFilter) const
 Render element if it passes the filtering procedure. This method should be used for elements which can be used in scope of rendering algorithms. E.g. elements of groups during recursive rendering. If render filter is null, pure rendering is performed. More...
 

Protected Attributes

OpenGl_AspectText myTextAspect
 text aspect More...
 
Handle< Graphic3d_TransformPersmyTrsfPers
 transformation persistence More...
 
Handle< OpenGl_FrameStatsmyStatsPrev
 currently displayed stats More...
 
- Protected Attributes inherited from OpenGl_Text
Handle< OpenGl_FontmyFont
 textures' IDs More...
 
NCollection_Vector< GLuint > myTextures
 textures' IDs More...
 
NCollection_Vector< Handle< OpenGl_VertexBuffer > > myVertsVbo
 VBOs of vertices. More...
 
NCollection_Vector< Handle< OpenGl_VertexBuffer > > myTCrdsVbo
 VBOs of texture coordinates. More...
 
Handle< OpenGl_VertexBuffermyBndVertsVbo
 VBOs of vertices for bounding box. More...
 
Font_Rect myBndBox
 textures' IDs More...
 
OpenGl_Mat4d myProjMatrix
 textures' IDs More...
 
OpenGl_Mat4d myModelMatrix
 textures' IDs More...
 
OpenGl_Mat4d myOrientationMatrix
 textures' IDs More...
 
GLdouble myWinX
 textures' IDs More...
 
GLdouble myWinY
 textures' IDs More...
 
GLdouble myWinZ
 textures' IDs More...
 
GLdouble myScaleHeight
 textures' IDs More...
 
GLdouble myExportHeight
 textures' IDs More...
 
OpenGl_TextParam myParams
 textures' IDs More...
 
NCollection_String myString
 textures' IDs More...
 
OpenGl_Vec3 myPoint
 textures' IDs More...
 
bool myIs2d
 textures' IDs More...
 
gp_Ax2 myOrientation
 Text orientation in 3D space. More...
 
bool myHasPlane
 Check if text have orientation in 3D space. More...
 
bool myHasAnchorPoint
 Shows if it has own attach point. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from OpenGl_Text
static TCollection_AsciiString FontKey (const OpenGl_AspectText &theAspect, const Standard_Integer theHeight, const unsigned int theResolution)
 Create key for shared resource. More...
 
static Handle< OpenGl_FontFindFont (const Handle< OpenGl_Context > &theCtx, const OpenGl_AspectText &theAspect, const Standard_Integer theHeight, const unsigned int theResolution, const TCollection_AsciiString theKey)
 Find shared resource for specified font or initialize new one. More...
 
static void StringSize (const Handle< OpenGl_Context > &theCtx, const NCollection_String &theText, const OpenGl_AspectText &theTextAspect, const OpenGl_TextParam &theParams, const unsigned int theResolution, Standard_ShortReal &theWidth, Standard_ShortReal &theAscent, Standard_ShortReal &theDescent)
 Compute text width. More...
 
- Static Public Member Functions inherited from OpenGl_Element
template<typename theResource_t >
static void Destroy (OpenGl_Context *theContext, theResource_t *&theElement)
 Pointer to the context is used because this method might be called when the context is already being destroyed and usage of a handle would be unsafe. More...
 
- Protected Member Functions inherited from OpenGl_Text
virtual ~OpenGl_Text ()
 Destructor. More...
 
void releaseVbos (OpenGl_Context *theCtx)
 Release cached VBO resources. More...
 
- Protected Member Functions inherited from OpenGl_Element
virtual ~OpenGl_Element ()
 

Detailed Description

Element rendering frame statistics.

Constructor & Destructor Documentation

◆ OpenGl_FrameStatsPrs()

OpenGl_FrameStatsPrs::OpenGl_FrameStatsPrs ( )

Default constructor.

◆ ~OpenGl_FrameStatsPrs()

virtual OpenGl_FrameStatsPrs::~OpenGl_FrameStatsPrs ( )
virtual

Destructor.

Member Function Documentation

◆ Release()

virtual void OpenGl_FrameStatsPrs::Release ( OpenGl_Context theCtx)
overridevirtual

Release OpenGL resources.

Reimplemented from OpenGl_Text.

◆ Render()

virtual void OpenGl_FrameStatsPrs::Render ( const Handle< OpenGl_Workspace > &  theWorkspace) const
overridevirtual

Render element.

Reimplemented from OpenGl_Text.

◆ SetTextAspect()

void OpenGl_FrameStatsPrs::SetTextAspect ( const Handle< Graphic3d_AspectText3d > &  theAspect)
inline

Assign text aspect.

◆ Update()

void OpenGl_FrameStatsPrs::Update ( const Handle< OpenGl_Workspace > &  theWorkspace)

Update text.

Field Documentation

◆ myStatsPrev

Handle< OpenGl_FrameStats > OpenGl_FrameStatsPrs::myStatsPrev
protected

currently displayed stats

◆ myTextAspect

OpenGl_AspectText OpenGl_FrameStatsPrs::myTextAspect
protected

text aspect

◆ myTrsfPers

Handle< Graphic3d_TransformPers > OpenGl_FrameStatsPrs::myTrsfPers
protected

transformation persistence


The documentation for this class was generated from the following file: