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

QSProjection3D Class Reference

Implementation of QSProjection for use in QSAxes3D. More...

#include <qsprojection3d.h>

Inheritance diagram for QSProjection3D:

Inheritance graph
[legend]
List of all members.

Public Types

typedef double Matrix [4][4]

Public Methods

 QSProjection3D ()
virtual ~QSProjection3D ()
void setProjection (double l, double r, double b, double t, double n, double f, bool perspective)
void getProjection (double *l, double *r, double *b, double *t, double *n, double *f, bool *perspective) const
void setViewport (double x, double y, double w, double h, double n=0.0, double f=0.0)
void getViewport (double *x, double *y, double *w, double *h, double *n, double *f) const
void fit (Matrix &S)
virtual QSPt2f middle () const
virtual QSPt3f furthest () const
QSPt3f nearest () const
QSPt3f left () const
QSPt3f right () const
virtual QSPt2f world2DToCanvas (const QSPt2f &p) const
virtual QSPt3f world2DToCanvas3 (const QSPt2f &p) const
virtual QSPt2f world3DToCanvas (const QSPt3f &p) const
virtual QSPt3f world3DToCanvas3 (const QSPt3f &p) const
virtual QSPt3f canvas3ToWorld3D (const QSPt3f &p) const

Static Public Methods

void matrix_to_stdout (const Matrix &m)
void matrixI (Matrix m)
void multiply (Matrix A, const Matrix B)
void inv (Matrix result, const Matrix m)
void copy (Matrix dst, const Matrix src)
void applyT (Matrix m, double dx, double dy, double dz)
void applyS (Matrix m, double sx, double sy, double sz)
void applyR (Matrix m, double alfay, double alfax, double alfaz=0.0)
void ortho (Matrix m, double l, double r, double b, double t, double n, double f)
void frustum (Matrix m, double l, double r, double b, double t, double n, double f)
void applyViewport (Matrix m, double x, double y, double w, double h, double n=0.0, double f=1.0)
QSPt3f worldTransformation (const Matrix T, const QSPt3f &p)

Public Attributes

Matrix M
Matrix P
Matrix T
QSPt3f lvector
QSPt3f dvector
QSPt3f eye
QSPt3f bmin
QSPt3f bmax

Detailed Description

Implementation of QSProjection for use in QSAxes3D.

Author:
Kamil Dobkowski


Constructor & Destructor Documentation

QSProjection3D::QSProjection3D  
 

constructor.

virtual QSProjection3D::~QSProjection3D   [virtual]
 

destuctor.


Member Function Documentation

void QSProjection3D::applyR Matrix    m,
double    alfay,
double    alfax,
double    alfaz = 0.0
[static]
 

Rotation.

void QSProjection3D::applyS Matrix    m,
double    sx,
double    sy,
double    sz
[static]
 

Scale .

void QSProjection3D::applyT Matrix    m,
double    dx,
double    dy,
double    dz
[static]
 

Shift ( translate ).

void QSProjection3D::applyViewport Matrix    m,
double    x,
double    y,
double    w,
double    h,
double    n = 0.0,
double    f = 1.0
[static]
 

Apply a viewport transformation.

virtual QSPt3f QSProjection3D::canvas3ToWorld3D const QSPt3f   p const [virtual]
 

Reimplemented. Maps the point to the screen coordinates.

Implements QSProjection.

void QSProjection3D::copy Matrix    dst,
const Matrix    src
[static]
 

Copies the given matrix : 'dst = src' .

void QSProjection3D::fit Matrix &    S
 

Fit the [(0,0,0) (1,1,1)] cube to the screen area. As result makes changes to QSProjection3D::S matrix.

See also:
QSProjection3D::M , QSProjection3D::P

void QSProjection3D::frustum Matrix    m,
double    l,
double    r,
double    b,
double    t,
double    n,
double    f
[static]
 

Apply a perspective projection.

virtual QSPt3f QSProjection3D::furthest   const [virtual]
 

Returns a point from [(0, 0, 0) ( 1, 1, 1 )] cube, which has the greatest z coordinate and all its three neighbourng walls are visible.

See also:
QSProjection3D::T

Reimplemented from QSProjection.

void QSProjection3D::inv Matrix    result,
const Matrix    m
[static]
 

Calculates inversion of the given matrix.

QSPt3f QSProjection3D::left   const
 

Returns a point which lies at the left to the QSProjection3D::furthest on the screen .

void QSProjection3D::matrixI Matrix    m [static]
 

Makes 'matrix' the unity matrix.

virtual QSPt2f QSProjection3D::middle   const [virtual]
 

See also:
QSProjection3D::T

Reimplemented from QSProjection.

void QSProjection3D::multiply Matrix    A,
const Matrix    B
[static]
 

Matrix multiplication : 'A = B*A'

QSPt3f QSProjection3D::nearest   const
 

Returns a point opposite to QSProjection3D::furthest .

void QSProjection3D::ortho Matrix    m,
double    l,
double    r,
double    b,
double    t,
double    n,
double    f
[static]
 

Apply an othogonal projection.

QSPt3f QSProjection3D::right   const
 

Returns an opposite point to QSProjection3D::left .

virtual QSPt2f QSProjection3D::world2DToCanvas const QSPt2f   p const [virtual]
 

Reimplemented. Maps the point to the screen coordinates.

Implements QSProjection.

virtual QSPt3f QSProjection3D::world2DToCanvas3 const QSPt2f   p const [virtual]
 

Reimplemented. Maps the point to the screen coordinates.

Implements QSProjection.

virtual QSPt2f QSProjection3D::world3DToCanvas const QSPt3f   p const [virtual]
 

Reimplemented. Maps the point to the screen coordinates.

Implements QSProjection.

virtual QSPt3f QSProjection3D::world3DToCanvas3 const QSPt3f   p const [virtual]
 

Reimplemented. Maps the point to the screen coordinates.

Implements QSProjection.

QSPt3f QSProjection3D::worldTransformation const Matrix    T,
const QSPt3f   p
[static]
 

Applies any transformation, given in 'T' to 'p'.


Member Data Documentation

QSPt3f QSProjection3D::bmax
 

Box maximum ( box + wall thickness ) in world coordinates.

QSPt3f QSProjection3D::bmin
 

Box minimum ( box + wall thickness ) in world coordinates.

QSPt3f QSProjection3D::dvector
 

The direction vector. Valid only if a perspective is off. ( world coordinates )

QSPt3f QSProjection3D::eye
 

Eye ( focuspoint ) position in world coordinates. Valid only if perspective is on.

QSPt3f QSProjection3D::lvector
 

The light vector.

Matrix QSProjection3D::M
 

The modelview matrix;.

Matrix QSProjection3D::P
 

The projection matrix.

Matrix QSProjection3D::T
 

The transformation matrix. t = QSProjection3D::S * QSProjection3D::P * QSProjection3D::M .


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