DigitalSpaces::DIOGRERenderable Struct Reference
[Ogre]

#include <OGREInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Public Member Functions

DIOGREMaterialGetMaterial (void)
 Retrieves a weak reference to the material this renderable object uses.
DIOGRETechniqueGetTechnique (void)
 Retrieves a pointer to the Material Technique this renderable object uses.
void GetWorldTransforms (out_Matrix4f *xform)
 Gets the render operation required to send this object to the frame buffer.
void GetWorldOrientation (out_Quaternionf *orient)
 Gets the worldspace orientation of this renderable; this is used in order to more efficiently update parameters to vertex & fragment programs, since inverting Quaterion and Vector in order to derive object-space positions / directions for cameras and lights is much more efficient than inverting a complete 4x4 matrix, and also eliminates problems introduced by scaling.
void GetWorldPosition (out_Vector3f *pos)
 Gets the worldspace orientation of this renderable; this is used in order to more efficiently update parameters to vertex & fragment programs, since inverting Quaterion and Vector in order to derive object-space positions / directions for cameras and lights is much more efficient than inverting a complete 4x4 matrix, and also eliminates problems introduced by scaling.
unsigned short GetNumWorldTransforms (void)
 Returns the number of world transform matrices this renderable requires.
bool getUseIdentityProjection (void)
 Returns whether or not to use an 'identity' projection.
bool getUseIdentityView (void)
 Returns whether or not to use an 'identity' projection.
float GetSquaredViewDepth (DIOGRECamera *cam)
 Returns the camera-relative squared depth of this renderable.
bool GetNormaliseNormals (void)
 Returns whether or not this Renderable wishes the hardware to normalise normals.
bool GetCastsShadows (void)
 Gets a list of lights, ordered relative to how close they are to this renderable.
void SetCustomParameter (unsigned long index, in_Vector4f *value)
 Sets a custom parameter for this Renderable, which may be used to drive calculations for this specific Renderable, like GPU program parameters.
void GetCustomParameter (unsigned long index, out_Vector4f *value)
 Gets the custom value associated with this Renderable at the given index.
void SetPolygonModeOverrideable (bool override)
 Sets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.
bool GetPolygonModeOverrideable (void)
 Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.

Member Function Documentation

DIOGREMaterial* DigitalSpaces::DIOGRERenderable::GetMaterial ( void   ) 

Retrieves a weak reference to the material this renderable object uses.

Remarks:
Note that the Renderable also has the option to override the getTechnique method to specify a particular Technique to use instead of the best one available.

DIOGRETechnique* DigitalSpaces::DIOGRERenderable::GetTechnique ( void   ) 

Retrieves a pointer to the Material Technique this renderable object uses.

Remarks:
This is to allow Renderables to use a chosen Technique if they wish, otherwise they will use the best Technique available for the Material they are using.

void DigitalSpaces::DIOGRERenderable::GetWorldTransforms ( out_Matrix4f xform  ) 

Gets the render operation required to send this object to the frame buffer.

Gets the world transform matrix / matrices for this renderable object.

Remarks:
If the object has any derived transforms, these are expected to be up to date as long as all the SceneNode structures have been updated before this is called.
This method will populate xform with 1 matrix if it does not use vertex blending. If it does use vertex blending it will fill the passed in pointer with an array of matrices, the length being the value returned from getNumWorldTransforms.

void DigitalSpaces::DIOGRERenderable::GetWorldOrientation ( out_Quaternionf orient  ) 

Gets the worldspace orientation of this renderable; this is used in order to more efficiently update parameters to vertex & fragment programs, since inverting Quaterion and Vector in order to derive object-space positions / directions for cameras and lights is much more efficient than inverting a complete 4x4 matrix, and also eliminates problems introduced by scaling.

void DigitalSpaces::DIOGRERenderable::GetWorldPosition ( out_Vector3f pos  ) 

Gets the worldspace orientation of this renderable; this is used in order to more efficiently update parameters to vertex & fragment programs, since inverting Quaterion and Vector in order to derive object-space positions / directions for cameras and lights is much more efficient than inverting a complete 4x4 matrix, and also eliminates problems introduced by scaling.

unsigned short DigitalSpaces::DIOGRERenderable::GetNumWorldTransforms ( void   ) 

Returns the number of world transform matrices this renderable requires.

Remarks:
When a renderable uses vertex blending, it uses multiple world matrices instead of a single one. Each vertex sent to the pipeline can reference one or more matrices in this list with given weights. If a renderable does not use vertex blending this method returns 1, which is the default for simplicity.

bool DigitalSpaces::DIOGRERenderable::getUseIdentityProjection ( void   ) 

Returns whether or not to use an 'identity' projection.

Remarks:
Usually Renderable objects will use a projection matrix as determined by the active camera. However, if they want they can cancel this out and use an identity projection, which effectively projects in 2D using a {-1, 1} view space. Useful for overlay rendering. Normal renderables need not override this.

bool DigitalSpaces::DIOGRERenderable::getUseIdentityView ( void   ) 

Returns whether or not to use an 'identity' projection.

Remarks:
Usually Renderable objects will use a view matrix as determined by the active camera. However, if they want they can cancel this out and use an identity matrix, which means all geometry is assumed to be relative to camera space already. Useful for overlay rendering. Normal renderables need not override this.

float DigitalSpaces::DIOGRERenderable::GetSquaredViewDepth ( DIOGRECamera cam  ) 

Returns the camera-relative squared depth of this renderable.

Remarks:
Used to sort transparent objects. Squared depth is used rather than actual depth to avoid having to perform a square root on the result.

bool DigitalSpaces::DIOGRERenderable::GetNormaliseNormals ( void   ) 

Returns whether or not this Renderable wishes the hardware to normalise normals.

bool DigitalSpaces::DIOGRERenderable::GetCastsShadows ( void   ) 

Gets a list of lights, ordered relative to how close they are to this renderable.

Remarks:
Directional lights, which have no position, will always be first on this list. Method which reports whether this renderable would normally cast a shadow.

Subclasses should override this if they could have been used to generate a shadow.

void DigitalSpaces::DIOGRERenderable::SetCustomParameter ( unsigned long  index,
in_Vector4f value 
)

Sets a custom parameter for this Renderable, which may be used to drive calculations for this specific Renderable, like GPU program parameters.

Remarks:
Calling this method simply associates a numeric index with a 4-dimensional value for this specific Renderable. This is most useful if the material which this Renderable uses a vertex or fragment program, and has an ACT_CUSTOM parameter entry. This parameter entry can refer to the index you specify as part of this call, thereby mapping a custom parameter for this renderable to a program parameter.
Parameters:
index The index with which to associate the value. Note that this does not have to start at 0, and can include gaps. It also has no direct correlation with a GPU program parameter index - the mapping between the two is performed by the ACT_CUSTOM entry, if that is used.
value The value to associate.

void DigitalSpaces::DIOGRERenderable::GetCustomParameter ( unsigned long  index,
out_Vector4f value 
)

Gets the custom value associated with this Renderable at the given index.

Parameters:
@see setCustomParaemter for full details.

void DigitalSpaces::DIOGRERenderable::SetPolygonModeOverrideable ( bool  override  ) 

Sets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.

Parameters:
override true means that a lower camera detail will override this renderables detail level, false means it won't.

bool DigitalSpaces::DIOGRERenderable::GetPolygonModeOverrideable ( void   ) 

Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setting.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:31 2008 for Digital Spaces by  doxygen 1.5.6