In file include/csengine/tranman.h:

class csTransformationManager

The transformation manager is responsible for maintaining all vertex arrays of camera space coordinates for things, sectors,

Public Methods

csVertexArray* Alloc()
Return a new vertex array
csTransformationManager()
Construct the manager.
csTranCookie GetCookie()
Get the current cookie.
csTranCookie GetFrameCookie()
Get the current frame cookie.
bool HasFrameChanged(csTranCookie test_cookie)
Given a cookie number (camera frame cookie), this function will test if the frame has changed
csTranCookie NewCameraFrame()
Start a new camera frame (i
void NewFrame()
Start a new frame.
void RestoreCameraFrame(csTranCookie prev_cookie)
Restore a camera frame (within the same frame)
virtual ~csTransformationManager()
Destruct.

Private Fields

csVertexArray* alloced
Pool of allocated vertex arrays (currently in use).
csTranCookie cookie
Current cookie.
csTranCookie frame_cookie
Current frame cookie. This cookie indicates the start of this frame.
csVertexArray* freed
Pool of free vertex arrays.
csVertexArray* last_alloced
Last allocated vertex array.
csTranCookie max_cookie
Maximum frame/camera frame cookie used upto now.

Documentation

The transformation manager is responsible for maintaining all vertex arrays of camera space coordinates for things, sectors, .... Every such entity has a csTransformedSet instance which holds a csVertexArray as given by this manager. The transformation manager also has a pool of csVertexArray's that it will give to the csTransformedSet instances that are being used and it will also keep track of a global transformation cookie so that we can detect when a csTransformedSet needs to be updated with a new csVertexArray. Every csTransformedSet has internal information which enables it to do that.

We define two states in the session manager:


Cookies for camera frames are guaranteed to be larger than the current frame cookie. Also they are guaranteed to be lower than the next frame cookie. This can be used to detect if you have data relevant for this frame or obsoleted because we are in a new frame.
csVertexArray* freed
Pool of free vertex arrays.

csVertexArray* alloced
Pool of allocated vertex arrays (currently in use).

csVertexArray* last_alloced
Last allocated vertex array.

csTranCookie cookie
Current cookie.

csTranCookie max_cookie
Maximum frame/camera frame cookie used upto now.

csTranCookie frame_cookie
Current frame cookie. This cookie indicates the start of this frame.

csTransformationManager()
Construct the manager.

virtual ~csTransformationManager()
Destruct.

csVertexArray* Alloc()
Return a new vertex array. Note that it is not possible to free arrays. They are automatically freed every frame.

void NewFrame()
Start a new frame.

csTranCookie NewCameraFrame()
Start a new camera frame (i.e. a sub-frame within a frame). This is used when going through a space-warping portal for example. The cookie returned by this function can be given by RestoreCameraFrame() when coming back from the portal.

void RestoreCameraFrame(csTranCookie prev_cookie)
Restore a camera frame (within the same frame)

csTranCookie GetCookie()
Get the current cookie.

csTranCookie GetFrameCookie()
Get the current frame cookie.

bool HasFrameChanged(csTranCookie test_cookie)
Given a cookie number (camera frame cookie), this function will test if the frame has changed


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de