Version: 9.12.0
GEOM_Annotation::OpenGl_Annotation Class Reference

Custom element implementing dynamic rendering of 3D annotation and invoking dynamic callback in presentation class.

Inheritance diagram for GEOM_Annotation::OpenGl_Annotation:
Inheritance graph

Classes

struct  TextSize
 

Public Member Functions

 OpenGl_Annotation (GEOM_Annotation *theAnnotation, const Standard_Integer theTextHeight, const OpenGl_GraphicDriver *theDriver)
 Constructor. More...
 
virtual ~OpenGl_Annotation ()
 Destructor. Releases GL resources with NULL context. More...
 
virtual void Release (OpenGl_Context *theCtx) Standard_OVERRIDE
 Releases GL resources with the given GL context. More...
 
virtual void Render (const Handle(OpenGl_Workspace)&theWorkspace) const Standard_OVERRIDE
 Renders the annotation graphical elements. More...
 
void SetDepthMode (const int theMode)
 

Private Attributes

GEOM_AnnotationmyAISObject
 Instance of presentation class. More...
 
NCollection_String myText
 Text string of annotation label. More...
 
OpenGl_TextParam myTextParams
 Text draw parameters. More...
 
OpenGl_Text * myTextDraw
 Text draw element. More...
 
OpenGl_PrimitiveArray * myTextLineDraw
 Text underline draw element. More...
 
OpenGl_PrimitiveArray * myExtLineDraw
 Extension line draw element. More...
 
OpenGl_PrimitiveArray * myExtMarkerDraw
 Extension marker draw element. More...
 
int myDepthMode
 Depth mode for drawing hidden line presentation. More...
 
float myTextLineY
 Text's underlines relative position. More...
 
TextSize myTextSize
 Text's size parameters. More...
 
Graphic3d_Vec2 myTextUnderline
 Text's underline position. More...
 
unsigned int myTextDPI
 Text's DPI scale used for last rendering. More...
 

Constructor & Destructor Documentation

◆ OpenGl_Annotation()

GEOM_Annotation::OpenGl_Annotation::OpenGl_Annotation ( GEOM_Annotation theAnnotation,
const Standard_Integer  theTextHeight,
const OpenGl_GraphicDriver *  theDriver 
)

Some of the input properties are assigned by reference for dynamic draw (it is not likely that GL element will ever outlive the interactive object).

Parameters
theAnnotation[in] the instance of interactive presentation class.
theTextHeight[in] the height of the text label.
theDriver[in] the instance of graphical driver required for initialization.

References Handle(), myExtLineDraw, myExtMarkerDraw, myText, myTextDraw, myTextLineDraw, and myTextParams.

◆ ~OpenGl_Annotation()

GEOM_Annotation::OpenGl_Annotation::~OpenGl_Annotation ( )
virtual

Member Function Documentation

◆ Release()

void GEOM_Annotation::OpenGl_Annotation::Release ( OpenGl_Context *  theCtx)
virtual

◆ Render()

void GEOM_Annotation::OpenGl_Annotation::Render ( const Handle(OpenGl_Workspace)&  theWorkspace) const
virtual

◆ SetDepthMode()

void GEOM_Annotation::OpenGl_Annotation::SetDepthMode ( const int  theMode)
inline

References myDepthMode.

Member Data Documentation

◆ myAISObject

GEOM_Annotation* GEOM_Annotation::OpenGl_Annotation::myAISObject
private

◆ myDepthMode

int GEOM_Annotation::OpenGl_Annotation::myDepthMode
private

◆ myExtLineDraw

OpenGl_PrimitiveArray* GEOM_Annotation::OpenGl_Annotation::myExtLineDraw
private

◆ myExtMarkerDraw

OpenGl_PrimitiveArray* GEOM_Annotation::OpenGl_Annotation::myExtMarkerDraw
private

◆ myText

NCollection_String GEOM_Annotation::OpenGl_Annotation::myText
private

◆ myTextDPI

unsigned int GEOM_Annotation::OpenGl_Annotation::myTextDPI
mutableprivate

◆ myTextDraw

OpenGl_Text* GEOM_Annotation::OpenGl_Annotation::myTextDraw
private

◆ myTextLineDraw

OpenGl_PrimitiveArray* GEOM_Annotation::OpenGl_Annotation::myTextLineDraw
private

◆ myTextLineY

float GEOM_Annotation::OpenGl_Annotation::myTextLineY
mutableprivate

◆ myTextParams

OpenGl_TextParam GEOM_Annotation::OpenGl_Annotation::myTextParams
private

◆ myTextSize

TextSize GEOM_Annotation::OpenGl_Annotation::myTextSize
mutableprivate

◆ myTextUnderline

Graphic3d_Vec2 GEOM_Annotation::OpenGl_Annotation::myTextUnderline
mutableprivate

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