Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GEOM_Annotation::OpenGl_Annotation Class Reference

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

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...
 

Detailed Description

Constructor & Destructor Documentation

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.

GEOM_Annotation::OpenGl_Annotation::~OpenGl_Annotation ( )
virtual

References NULL.

Member Function Documentation

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

References NULL.

void GEOM_Annotation::OpenGl_Annotation::Render ( const Handle(OpenGl_Workspace)&  theWorkspace) const
virtual
void GEOM_Annotation::OpenGl_Annotation::SetDepthMode ( const int  theMode)
inline

References myDepthMode.

Member Data Documentation

GEOM_Annotation* GEOM_Annotation::OpenGl_Annotation::myAISObject
private
int GEOM_Annotation::OpenGl_Annotation::myDepthMode
private
OpenGl_PrimitiveArray* GEOM_Annotation::OpenGl_Annotation::myExtLineDraw
private
OpenGl_PrimitiveArray* GEOM_Annotation::OpenGl_Annotation::myExtMarkerDraw
private
NCollection_String GEOM_Annotation::OpenGl_Annotation::myText
private
unsigned int GEOM_Annotation::OpenGl_Annotation::myTextDPI
mutableprivate
OpenGl_Text* GEOM_Annotation::OpenGl_Annotation::myTextDraw
private
OpenGl_PrimitiveArray* GEOM_Annotation::OpenGl_Annotation::myTextLineDraw
private
float GEOM_Annotation::OpenGl_Annotation::myTextLineY
mutableprivate
OpenGl_TextParam GEOM_Annotation::OpenGl_Annotation::myTextParams
private
TextSize GEOM_Annotation::OpenGl_Annotation::myTextSize
mutableprivate
Graphic3d_Vec2 GEOM_Annotation::OpenGl_Annotation::myTextUnderline
mutableprivate

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