Class: TRootMatrix3DState

Declaration: Matrix3DState.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TMatrix3DState

Inherited By:

None.

Purpose:

TRootMatrix3DState is a concrete class, derived from TMatrix3DState, that is ideal for the root 3-D matrix state of a graphic hierarchy. The class supplies the 3-D identity matrix and its own shared time stamp. A camera is passed in as a constructor argument; this camera's matrix is used as TRootMatrix3DState's projection matrix. The TRootGrafState class uses a TRootMatrix3DState to represent the default 3-D matrix state. To create a hierarchy, you can link TLinkableMatrix3DState objects to a TRootMatrix3DState object by passing it as an argument to their LinkTo member functions.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TRootMatrix3DState::TRootMatrix3DState

  1. TRootMatrix3DState (const TCamera * camera)
  2. TRootMatrix3DState (const TRootMatrix3DState &)

Interface Category:

API.

Purpose:

  1. Constructor that takes a camera argument and uses the camera's transformation matrix as this object's projection matrix.
  2. Copy constructor.

Calling Context:

  1. Call this function directly.
  2. Called to copy an object. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRootMatrix3DState::~TRootMatrix3DState

virtual ~ TRootMatrix3DState ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRootMatrix3DState::GetMatrixWithProjection

virtual const TGrafMatrix3D * GetMatrixWithProjection () const

Interface Category:

API.

Purpose:

Returns a constant pointer to the camera's projection matrix.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a constant pointer to a TGrafMatix3D object that represents the projection matrix for this object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRootMatrix3DState::GetMatrix

virtual const TGrafMatrix3D * GetMatrix () const

Interface Category:

API.

Purpose:

Returns a constant pointer to an identity matrix.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a constant pointer to a TGrafMatrix3D object that represents the identity matrix for this object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRootMatrix3DState::GetSharedTimeStampState

virtual TTimeStampState * GetSharedTimeStampState () const

Interface Category:

API.

Purpose:

Returns the value of the time stamp that is shared by the objects within this hierarchy. A state object's value is typically dependent on its parent's value. This means that when an object's value is queried, it must check to see if its parent's state has changed, and its parent must do the same, until it reaches the root of the hierarchy. Because state queries are done quite often, such as in a rendering process, shared time stamp states were invented to improve the performance of noticing whether some state in the hierarchy has changed. GetSharedTimeStampState returns a pointer to an object that contains a single time stamp that changes whenever any part of the hierarchy changes. An object can tell if any of the hierarchy above it changed by looking at the shared time stamp, instead of looking at its parent's time stamp, causing the parent to look at its parent's time stamp, and so on.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to a TTimeStampState object that represents the last modification time of any object in this hierarchy.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.