Walls And Holes  1
AbstractDrawableGLObject Class Referenceabstract

Abstract class for objects with special OpenGL rendering. More...

#include <abstractdrawableglobject.h>

Inheritance diagram for AbstractDrawableGLObject:

Public Member Functions

virtual ~AbstractDrawableGLObject ()
 
virtual void initializeGL ()=0
 Called when this object is to be used with a new OpenGL context. Must be called before the first draw() call in the context. More...
 
virtual void draw (QMatrix4x4 projection, QMatrix4x4 transformation)=0
 Performs OpenGL calls to draw the object, assuming a context is bound. More...
 

Detailed Description

Abstract class for objects with special OpenGL rendering.

Abstract class containing a single draw() function for customized OpenGL rendering. The purpose of this class is to allow a scene to contain non-mesh widgets (like a widget for visualizing the axes).

Constructor & Destructor Documentation

◆ ~AbstractDrawableGLObject()

virtual AbstractDrawableGLObject::~AbstractDrawableGLObject ( )
inlinevirtual

Member Function Documentation

◆ draw()

virtual void AbstractDrawableGLObject::draw ( QMatrix4x4  projection,
QMatrix4x4  transformation 
)
pure virtual

Performs OpenGL calls to draw the object, assuming a context is bound.

Parameters
projectionThe projection matrix used for the meshes.
transformationThe transformation matrix used for the meshes. The purpose of separating this from the projection is to allow a user to extract the translation and rotation components.

The gl_Position of a vertex V is given by (projection * transformation * V).

Implemented in DrawableAxes.

◆ initializeGL()

virtual void AbstractDrawableGLObject::initializeGL ( )
pure virtual

Called when this object is to be used with a new OpenGL context. Must be called before the first draw() call in the context.

Implemented in DrawableAxes.


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