Main Page   Class Hierarchy   Compound List   Header Files   Compound Members  

ddgContext Class Reference

The context object maintains the state of the current view. More...

#include <ddgcntxt.h>

List of all members.


Public Members

enum  Mode { ALL, CLIPPING, NOTEXT, FLAT, MINIMAL }
The rendering mode to use.

enum  Quality { NONE, DEBUG, LOW, MEDIUM, HIGH }
The quality at which the rendering is to be done.

 ddgContext (Mode m = ALL, Quality q = MEDIUM, ddgControl *ctrl = NULL, ddgClock *cl = NULL)
Constructor.

 ~ddgContext (void)
Destructor.

ddgClockclock (void)
Return the clock.

Mode mode (void)
Return the mode.

Quality quality (void)
Return the quality.

void mode (Mode m)
Set the rendering mode to use for this view.

void quality (Quality q)
Set the quality mode to use.

void clock (ddgClock *c)
Set the clock to use.

ddgCHull3rootHull (void)
Return the hullset.

ddgCHull2topDownWedge (void)
Return the hullset.

bool update (void)
Update the clock, control object, matrices and anything else. More...

void nearfar (float n, float f)
Set the near clipping plane.

void fov ( float f)
Modify the field of vision angle of the view.

float fov ( void )
Return the field of vision angle of the view.

void aspect ( float a)
Set aspect ratio of the view, width/height.

float aspect ( void )
Get aspect ratio of the view, width/height.

float tanHalfFOV ( void )
Return the tangent of half the field of vision angle of the view.

ddgControlcontrol (void)
Return the control object.

void control ( ddgControl *c )
Set the control object.

void clipbox ( ddgBBox3 *b)
Modify the bounding box of the view's viewing frustrum.

ddgBBox3clipbox ( void )
Return the bounding box of the view's viewing frustrum.

ddgInside clip ( ddgBBox3 *bbox)
Clip against the convex hull set.

ddgVector3up ( void)
Return the up vector of the view.

void up ( ddgVector3* u)
Modify the up vector of the view.

void forward ( ddgVector3* f)
Modify the forward vector of the view.

ddgVector3forward ( void)
Return the forward vector of the view.

void right ( ddgVector3* r)
Modify the right vector of the view.

ddgVector3right ( void)
Return the right vector of the view.

bool init (void)
Callback which is called to initialize the view.

bool visible ( ddgBBox3 * bbox )
Returns true if bbox is visible from this view.

void transform ( ddgVector3 vin, ddgVector3 *vout )
Convert the world coordinates to view coordinates.

bool visible ( ddgVector3 vin )
Returns true if world coordinates are visible from view.

bool dirty ( void )
Has context changed since last frame.

void clean ( void )
Set the context to clean.

void extractPlanesFromMatrix (ddgPlane3 planes[6])
Get frustrum clipping planes in world space coordinates.

void updateClippingInfo (void)
Update the clipping information based on the current viewpoint.

bool levelView ( void )
Return true if the view is practically level. More...

ddgPlane3frustrum (void)
Return the frustrum planes.

ddgMatrix4transformation (void)
World to view transformation matrix.

ddgMatrix4itransformation (void)
Return View to world transformation matrix. [Inverse].

ddgMatrix4projection (void)
Projection matrix.

void path ( ddgPath* p, bool r = false, unsigned int f = 0)
Set the path and whether it is a playback or recording session.

unsigned int frame (void)
Return the current frame.

bool ssdistance ( ddgVector3 *p1, ddgVector3 *p2, ddgVector3 *normal, bool pixels = false)
Calculate the screen disance between two points. returns True if screen distance is greater than tolerance.

float ssdistance2 ( ddgVector3 *p1, ddgVector3 *p2)
returns screen space distance between two points.

void extractPlanes ( ddgPlane3 planes[6])
Compute frustrum from 5 points in world space coordinates.

void frameNext (void)
Increment the frame counter.


Detailed Description

The context object maintains the state of the current view.

It defines a location/orientation and various view parameters.


Member Function Documentation

bool ddgContext::update (void)

Update the clock, control object, matrices and anything else.

Return true if something changed.

bool ddgContext::levelView (void) [inline]

Return true if the view is practically level.

That means up vector near [0,1,0] and forward vector near [x,0,y]


The documentation for this class was generated from the following files:
Generated at Sun Sep 17 19:27:52 2000 for Digital Dawn Graphics Toolkit by doxygen 0.49-991205 written by Dimitri van Heesch, © 1997-1999