Text rendering.
More...
#include <OpenGl_Text.hxx>
|
| | 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...
|
| |
| virtual | ~OpenGl_Text () |
| | Destructor. 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...
|
| |
| virtual void | Render (const Handle< OpenGl_Workspace > &theWorkspace) const |
| |
| virtual void | Release (OpenGl_Context *theContext) |
| | Release GPU resources. 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...
|
| |
| const NCollection_String & | Text () const |
| | Return defined text. More...
|
| |
| const OpenGl_TextParam & | FormatParams () const |
| | Return text formatting parameters. More...
|
| |
| | OpenGl_Element () |
| |
| virtual Standard_Boolean | IsFillDrawMode () const |
| | Return TRUE if primitive type generates shaded triangulation (to be used in filters). More...
|
| |
| virtual void | SynchronizeAspects () |
| | Update parameters of the drawable elements. More...
|
| |
|
| Handle< OpenGl_Font > | myFont |
| | 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_VertexBuffer > | myBndVertsVbo |
| | 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...
|
| |
| | 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_Aspects &theTextAspect, unsigned int theResolution=Graphic3d_RenderingParams::THE_DEFAULT_RESOLUTION) const |
| | Perform rendering. More...
|
| |
| static TCollection_AsciiString | FontKey (const OpenGl_Aspects &theAspect, Standard_Integer theHeight, unsigned int theResolution) |
| | Create key for shared resource. More...
|
| |
| static Handle< OpenGl_Font > | FindFont (const Handle< OpenGl_Context > &theCtx, const OpenGl_Aspects &theAspect, Standard_Integer theHeight, 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_Aspects &theTextAspect, const OpenGl_TextParam &theParams, const unsigned int theResolution, Standard_ShortReal &theWidth, Standard_ShortReal &theAscent, Standard_ShortReal &theDescent) |
| | Compute text width. More...
|
| |
| void | releaseVbos (OpenGl_Context *theCtx) |
| | Release cached VBO resources. More...
|
| |
|
| 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...
|
| |
| virtual | ~OpenGl_Element () |
| |
◆ OpenGl_Text() [1/3]
◆ OpenGl_Text() [2/3]
Creates new text in 3D space.
◆ ~OpenGl_Text()
| virtual OpenGl_Text::~OpenGl_Text |
( |
| ) |
|
|
virtual |
◆ OpenGl_Text() [3/3]
| OpenGl_Text::OpenGl_Text |
( |
| ) |
|
◆ FindFont()
Find shared resource for specified font or initialize new one.
◆ FontKey()
Create key for shared resource.
◆ FormatParams()
Return text formatting parameters.
◆ Init() [1/3]
Setup new string and position.
◆ Init() [2/3]
Setup new string and parameters.
◆ Init() [3/3]
Setup new string and parameters.
◆ Release()
Release GPU resources. 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.
Implements OpenGl_Element.
◆ releaseVbos()
Release cached VBO resources.
◆ Render() [1/2]
◆ Render() [2/2]
◆ SetFontSize()
◆ SetPosition()
| void OpenGl_Text::SetPosition |
( |
const OpenGl_Vec3 & |
thePoint | ) |
|
◆ StringSize()
◆ Text()
◆ myBndBox
◆ myBndVertsVbo
VBOs of vertices for bounding box.
◆ myExportHeight
| GLdouble OpenGl_Text::myExportHeight |
|
mutableprotected |
◆ myFont
◆ myHasAnchorPoint
| bool OpenGl_Text::myHasAnchorPoint |
|
protected |
Shows if it has own attach point.
◆ myHasPlane
| bool OpenGl_Text::myHasPlane |
|
protected |
Check if text have orientation in 3D space.
◆ myIs2d
◆ myModelMatrix
◆ myOrientation
| gp_Ax2 OpenGl_Text::myOrientation |
|
protected |
Text orientation in 3D space.
◆ myOrientationMatrix
◆ myParams
◆ myPoint
◆ myProjMatrix
◆ myScaleHeight
| GLdouble OpenGl_Text::myScaleHeight |
|
mutableprotected |
◆ myString
◆ myTCrdsVbo
VBOs of texture coordinates.
◆ myTextures
◆ myVertsVbo
◆ myWinX
| GLdouble OpenGl_Text::myWinX |
|
mutableprotected |
◆ myWinY
| GLdouble OpenGl_Text::myWinY |
|
mutableprotected |
◆ myWinZ
| GLdouble OpenGl_Text::myWinZ |
|
mutableprotected |
The documentation for this class was generated from the following file: