Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Examples  

QSDrvOpenGL Class Reference

OpenGL 3d graphics driver. More...

#include <qsdrvopengl.h>

Inheritance diagram for QSDrvOpenGL:

Inheritance graph
List of all members.

Public Methods

 QSDrvOpenGL ()
virtual ~QSDrvOpenGL ()
virtual QSDrvOpenGL * copy ()
void copySettingsFrom (const QSDrvOpenGL *drv)
void setAlpha (bool enabled)
void setShadeWalls (bool enabled)
void setGlobalTransparency (unsigned char value)
void setMeshAutoStroke (bool enabled)
void setAutoStrokeLightness (int value)
bool alpha () const
bool shadeWalls () const
int globalTransparency () const
bool meshAutoStroke () const
int meshAutoStrokeLightness () const
void init (QSAxes3D *parent)
QSAxes3DparentAxes () const
virtual void setClipping (bool enabled)
virtual void setCurrentElement (int category, int element)
virtual CNormals cNormals () const
virtual CColors cColors () const
virtual COrdering cOrdering () const
virtual void setDC (QPainter *p, double dpi=72, bool deletePainter=false)
virtual void startDrawing ()
virtual void stopDrawing ()
virtual void clearCanvas (const QSGFill &f, const QSPt2 &pos, const QSPt2 &size)
virtual void drawPoly3 (const QSPt3f pts[], int npoints, const QSPt3f *nor, const QSGFill *col, const bool *edges=NULL, int edgeAutoColor=0)
virtual void drawLine3 (const QSPt3f &begin, const QSPt3f &end, const QSPt3f norm[2])
virtual void setFill (const QSGFill &f)
virtual void setLine (const QSGLine &l)

Protected Methods

void loadMatrix (const double m[4][4])
void get_qpainter_wmatrix (const QPainter *p, double m[4][4])
void glError ()

Protected Attributes

QPainter * m_opaint
QGLContext * pgl
QPainter * ppic
QPixmap * pix
QPicture * pic
QPointArray * points
GLuint plist
GLubyte color [4]
GLubyte lcolor [4]
bool axis_mode
bool m_alpha
bool m_shade_walls
bool m_auto_stroke
bool dpaint
int m_global_transparency
int trv
int m_stroke_lightness
int pasize
const QSProjection3Dt

Detailed Description

OpenGL 3d graphics driver.

Notice that it is suppesed to use only with QSAxes3D.and it uses Qt for drawing 2D, text etc.

Kamil Dobkowski

Constructor & Destructor Documentation



virtual QSDrvOpenGL::~QSDrvOpenGL   [virtual]


Member Function Documentation

bool QSDrvOpenGL::alpha   const [inline]

Returns alpha setting.

virtual CColors QSDrvOpenGL::cColors   const [virtual]

Returns a color mode required by this driver.

Reimplemented from QSDrv.

virtual CNormals QSDrvOpenGL::cNormals   const [virtual]

Return a normals mode required by this driver.

Reimplemented from QSDrv.

virtual QSDrvOpenGL* QSDrvOpenGL::copy   [virtual]

Returns new copy of this driver with all settings set.

Reimplemented from QSDrvQt.

void QSDrvOpenGL::copySettingsFrom const QSDrvOpenGL *    drv

Copies all settings from another driver

virtual COrdering QSDrvOpenGL::cOrdering   const [virtual]

Returns an ordering required by this driver.

Reimplemented from QSDrv.

virtual void QSDrvOpenGL::drawLine3 const QSPt3f   begin,
const QSPt3f   end,
const QSPt3f    norm[2]

Draws a line. Default implementation maps 3d points on 2d plane and draws 2d line.

Reimplemented from QSDrv.

int QSDrvOpenGL::globalTransparency   const [inline]

Returns global transparency

void QSDrvOpenGL::init QSAxes3D   parent

Prepare driver

bool QSDrvOpenGL::meshAutoStroke   const [inline]

Returns if mesh auto stroke colors is enabled

int QSDrvOpenGL::meshAutoStrokeLightness   const [inline]

Returns how much auto stroke is lighter than mesh fill color.

QSAxes3D* QSDrvOpenGL::parentAxes   const [inline]

Returns parent axes

void QSDrvOpenGL::setAlpha bool    enabled

Enable/disable alpha.

void QSDrvOpenGL::setAutoStrokeLightness int    value

How mush mesh stroke is lighter than a mesh fill

virtual void QSDrvOpenGL::setClipping bool    enabled [virtual]

Turns on clipping when drawing ( ..2(), *3() methods ). Must be called after startDrawing() Always clips polygons,lines,points using clipPoly2,clipLine2,clipPoint2,clipPoint3, clipPoly3.

Reimplemented from QSDrv.

virtual void QSDrvOpenGL::setCurrentElement int    category,
int    element

Sets a currently drawn element. It has no meaning for this objects - just a pair of ints. It is called by a graphic object, which uses this driver. It can be used for example in QSHitDrv to see what part of an object was exacly hit by mouse. It can be read, but further interpretation must be done in an other place. It is reset to -1, -1 in stopDrawing(). See QSAxes::ElementCategory

Reimplemented from QSDrv.

virtual void QSDrvOpenGL::setDC QPainter *    p,
double    dpi = 72,
bool    deletePainter = false

Sets a painter for this driver. If deletePainter is true, painter will be deleted in destructor. If p->device() isn't an external one, no world or view transformation of the painter are used.

Reimplemented from QSDrvQt.

virtual void QSDrvOpenGL::setFill const QSGFill   f [virtual]

Set the current fill .

Reimplemented from QSDrvQt.

void QSDrvOpenGL::setGlobalTransparency unsigned char    value

Global transparency

virtual void QSDrvOpenGL::setLine const QSGLine   l [virtual]

Set the current line style.

Reimplemented from QSDrvQt.

void QSDrvOpenGL::setMeshAutoStroke bool    enabled

Mesh stoke auto-colors

void QSDrvOpenGL::setShadeWalls bool    enabled

Shade walls

bool QSDrvOpenGL::shadeWalls   const [inline]

Returns shade walls setting

virtual void QSDrvOpenGL::startDrawing   [virtual]

Reimplemented from QSDrv::startDraw .

Reimplemented from QSDrvQt.

virtual void QSDrvOpenGL::stopDrawing   [virtual]

Reimplemented from QSDrv::stopDraw . Doesn,t call paint->end().

Reimplemented from QSDrvQt.

The documentation for this class was generated from the following file:
Generated on Mon Mar 18 19:16:44 2002 for KMatplot library by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002