torque Torque Game Engine Documentation
TGE Version 1.5.2

SceneRenderImage Class Reference

#include <sceneState.h>

Inheritance diagram for SceneRenderImage:

Inheritance graph
[legend]

Detailed Description

A SceneRenderImage is used by the SceneState/SceneGraph to sort objects for rendering order.

The scene graph calls prepRenderImage on every SceneObject it intends to render every frame. The SceneObject will then insert one or more SceneRenderImages. These images describe what will be rendered by the object, whether it will have transparency, what type of object it is, etc. These images are sorted by SortType, and then rendered. If any images are translucent, the SceneState builds a BSP tree and then evaluates it back to front.


Public Types

enum  SortType {
  Sky = 0,
  Terrain = 1,
  Normal = 2,
  Point,
  Plane,
  EndSort,
  BeginSort
}
 Sort type indicates when the image should be rendered and how it should be sorted. More...

Public Member Functions

 SceneRenderImage ()
virtual ~SceneRenderImage ()

Data Fields

SceneObjectobj
 The SceneObject this image represents.
bool isTranslucent
 Is this image translucent?
bool tieBreaker
 If two objects have the same points, this is used to determine sorting order.
bool useSmallTextures
 If this is set to true, the object will render using a low-res version of its textures.
SortType sortType
PlaneF plane
 The plane if SortType::Plane is used.
Point3F poly [4]
 If SortType::Plane is used, this is the quad that defines the bounds for the plane.
F32 polyArea
 Area of the polygon defined by poly[].
F32 pointDistSq
 Distance from camera to poly[0] squared.
U32 textureSortKey
 This is used to sort objects of the same SortType into order if the objects have no translucency.
SceneRenderImagepNext
 Linked list implementation.


Member Enumeration Documentation

Sort type indicates when the image should be rendered and how it should be sorted.

The rendering order is this:

  • Sky
  • BeginSort
  • Terrain
  • Normal
  • Point
  • Plane
  • EndSort

Point and Plane are only valid if the object is translucent. The variables 'plane' and 'poly' are used for these sort types. If the point type is used, the actual point is specified in poly[0]

Enumerator:
Sky 
Terrain 
Normal 
Point 
Plane 
EndSort 
BeginSort 


Constructor & Destructor Documentation

SceneRenderImage::SceneRenderImage (  )  [inline]

virtual SceneRenderImage::~SceneRenderImage (  )  [virtual]


Field Documentation

The SceneObject this image represents.

Is this image translucent?

If two objects have the same points, this is used to determine sorting order.

If this is set to true, the object will render using a low-res version of its textures.

The plane if SortType::Plane is used.

If SortType::Plane is used, this is the quad that defines the bounds for the plane.

If SortType::Point is used, then poly[0] is the point, and the rest is ignored.

Area of the polygon defined by poly[].

Distance from camera to poly[0] squared.

Note:
This is set inside SceneState.

This is used to sort objects of the same SortType into order if the objects have no translucency.

Linked list implementation.

Note:
NEVER set this. This is managed by Torque.




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen