QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Qwt3D::Drawable Class Referenceabstract

Abstract base class for Drawables. More...

#include <qwt3d_drawable.h>

Inheritance diagram for Qwt3D::Drawable:
Qwt3D::Axis Qwt3D::ColorLegend Qwt3D::CoordinateSystem Qwt3D::Label

Classes

class  PrivateData
 

Public Member Functions

virtual void draw ()
 
virtual void saveGLState ()
 
virtual void restoreGLState ()
 
void attach (Drawable *)
 
void detach (Drawable *)
 
void detachAll ()
 
virtual void setColor (double r, double g, double b, double a=1)
 
virtual void setColor (Qwt3D::RGBA rgba)
 
Qwt3D::Triple relativePosition (Qwt3D::Triple rel)
 Calculates world coordinates from relative viewport position.
 

Protected Member Functions

void Enable (GLenum what, GLboolean val)
 
Qwt3D::Triple ViewPort2World (Qwt3D::Triple win, bool *err=nullptr)
 Converts viewport coordinates to world coordinates (glUnProject)
 
Qwt3D::Triple World2ViewPort (Qwt3D::Triple obj, bool *err=nullptr)
 Converts world coordinates to viewport coordinates (glProject)
 
 Drawable (Drawable &&other) noexcept
 
Drawableoperator= (Drawable &&other) noexcept
 

Protected Attributes

Qwt3D::RGBA color
 
GLdouble modelMatrix [16]
 
GLdouble projMatrix [16]
 
GLint viewport [4]
 

Detailed Description

Abstract base class for Drawables.

Member Function Documentation

◆ draw()

void Drawable::draw ( )
virtual

◆ relativePosition()

Triple Drawable::relativePosition ( Qwt3D::Triple  rel)

Calculates world coordinates from relative viewport position.

Parameters
relRelative position in viewport coordinates
Returns
Corresponding world coordinates
Warning
Don't rely on (use) this in display lists!

◆ setColor() [1/2]

void Drawable::setColor ( double  r,
double  g,
double  b,
double  a = 1 
)
virtual

Reimplemented in Qwt3D::Label.

◆ setColor() [2/2]

void Drawable::setColor ( Qwt3D::RGBA  rgba)
virtual

Reimplemented in Qwt3D::Label.

◆ ViewPort2World()

Triple Drawable::ViewPort2World ( Qwt3D::Triple  win,
bool *  err = nullptr 
)
protected

Converts viewport coordinates to world coordinates (glUnProject)

Parameters
winViewport (window) coordinates
[out]errOptional error flag (true on failure)
Returns
World (object) coordinates
Warning
Don't rely on (use) this in display lists!

◆ World2ViewPort()

Triple Drawable::World2ViewPort ( Qwt3D::Triple  obj,
bool *  err = nullptr 
)
protected

Converts world coordinates to viewport coordinates (glProject)

Parameters
objWorld (object) coordinates
[out]errOptional error flag (true on failure)
Returns
Viewport (window) coordinates
Warning
Don't rely on (use) this in display lists!

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