torque Torque Game Engine Documentation
TGE Version 1.5.2

TSLastDetail Class Reference

#include <tsLastDetail.h>


Detailed Description

This neat little class renders the object to a texture so that when the object is far away, it can be drawn as a billboard instead of a mesh.

This happens when the model is first loaded as to keep the realtime render as fast as possible. It also renders the model from a few different perspectives so that it would actually pass as a model instead of a silly old billboard.


Public Member Functions

 TSLastDetail (TSShapeInstance *shape, U32 numEquatorSteps, U32 numPolarSteps, F32 polarAngle, bool includePoles, S32 dl, S32 dim)
 ~TSLastDetail ()
void render (F32 alpha, bool drawFog)
void renderNoFog (F32 alpha)
void renderFog_Combine (F32 alpha)
void renderFog_MultiCombine (F32 alpha)
void chooseView (const MatrixF &, const Point3F &scale)

Static Public Attributes

static bool smDirtyMode
 If you're doing a more complex renderer this is a useful trick.

Private Attributes

U32 mNumEquatorSteps
 number steps around the equator of the globe
U32 mNumPolarSteps
 number of steps to go from equator to each polar region (0 means equator only)
F32 mPolarAngle
 angle in radians of sub-polar regions
bool mIncludePoles
 include poles in snapshot?
Point3F mCenter
U32 mBitmapIndex
 remember these values so we can save some work next time we render...
F32 mRotY
Vector< GBitmap * > mBitmaps
 Rendered bitmaps.
Vector< TextureHandle * > mTextures
 Texture handles for those bitmaps.
Point3F mPoints [4]
 always draw poly defined by these points...

Static Private Attributes

static Point3F smNorms [4]
static Point2F smTVerts [4]


Constructor & Destructor Documentation

TSLastDetail::TSLastDetail ( TSShapeInstance shape,
U32  numEquatorSteps,
U32  numPolarSteps,
F32  polarAngle,
bool  includePoles,
S32  dl,
S32  dim 
)

TSLastDetail::~TSLastDetail (  ) 


Member Function Documentation

void TSLastDetail::render ( F32  alpha,
bool  drawFog 
)

void TSLastDetail::renderNoFog ( F32  alpha  ) 

void TSLastDetail::renderFog_Combine ( F32  alpha  ) 

void TSLastDetail::renderFog_MultiCombine ( F32  alpha  ) 

void TSLastDetail::chooseView ( const MatrixF ,
const Point3F scale 
)


Field Documentation

number steps around the equator of the globe

number of steps to go from equator to each polar region (0 means equator only)

angle in radians of sub-polar regions

include poles in snapshot?

remember these values so we can save some work next time we render...

Rendered bitmaps.

Vector<TextureHandle*> TSLastDetail::mTextures [private]

Texture handles for those bitmaps.

always draw poly defined by these points...

Point3F TSLastDetail::smNorms[4] [static, private]

Point2F TSLastDetail::smTVerts[4] [static, private]

If you're doing a more complex renderer this is a useful trick.




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