#include <qsprojection3d.h>
Inheritance diagram for QSProjection3D:
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 |
|
constructor. |
|
destuctor. |
|
Rotation. |
|
Scale . |
|
Shift ( translate ). |
|
Apply a viewport transformation. |
|
Reimplemented. Maps the point to the screen coordinates. Implements QSProjection. |
|
Copies the given matrix : 'dst = src' . |
|
Fit the [(0,0,0) (1,1,1)] cube to the screen area. As result makes changes to QSProjection3D::S matrix.
|
|
Apply a perspective projection. |
|
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.
Reimplemented from QSProjection. |
|
Calculates inversion of the given matrix. |
|
Returns a point which lies at the left to the QSProjection3D::furthest on the screen . |
|
Makes 'matrix' the unity matrix. |
|
Reimplemented from QSProjection. |
|
Matrix multiplication : 'A = B*A' |
|
Returns a point opposite to QSProjection3D::furthest . |
|
Apply an othogonal projection. |
|
Returns an opposite point to QSProjection3D::left . |
|
Reimplemented. Maps the point to the screen coordinates. Implements QSProjection. |
|
Reimplemented. Maps the point to the screen coordinates. Implements QSProjection. |
|
Reimplemented. Maps the point to the screen coordinates. Implements QSProjection. |
|
Reimplemented. Maps the point to the screen coordinates. Implements QSProjection. |
|
Applies any transformation, given in 'T' to 'p'. |
|
Box maximum ( box + wall thickness ) in world coordinates. |
|
Box minimum ( box + wall thickness ) in world coordinates. |
|
The direction vector. Valid only if a perspective is off. ( world coordinates ) |
|
Eye ( focuspoint ) position in world coordinates. Valid only if perspective is on. |
|
The light vector. |
|
The modelview matrix;. |
|
The projection matrix. |
|
The transformation matrix. t = QSProjection3D::S * QSProjection3D::P * QSProjection3D::M . |