TSPartInstance Class Reference#include <tsPartInstance.h>
List of all members.
|
Public Member Functions |
| | TSPartInstance (TSShapeInstance *source) |
| | TSPartInstance (TSShapeInstance *source, S32 objectIndex) |
| | ~TSPartInstance () |
| const TSShape * | getShape () |
| TSShapeInstance * | getSourceShapeInstance () |
| Point3F & | getCenter () |
| Box3F & | getBounds () |
| F32 & | getRadius () |
| void | render (const Point3F *objectScale=NULL) |
| void | render (S32 dl, const Point3F *objectScale=NULL) |
| void | setDetailData (F32 *sizeCutoffs, S32 numDetails) |
| | choose detail method -- pass in NULL for first parameter to just use shapes data
|
|
| void | selectCurrentDetail (F32 pixelSize) |
| void | selectCurrentDetail (F32 dist, F32 invScale) |
|
| F32 | getDetailSize (S32 dl) |
| S32 | getPolyCount (S32 dl) |
| S32 | getNumDetails () |
| S32 | getCurrentObjectDetail () |
| void | setCurrentObjectDetail (S32 od) |
| F32 | getCurrentIntraDetail () |
| void | setCurrentIntraDetail (F32 intra) |
Static Public Member Functions |
| static void | breakShape (TSShapeInstance *, S32 subShape, Vector< TSPartInstance * > &partList, F32 *probShatter, F32 *probBreak, S32 probDepth) |
Public Attributes |
| void * | mData |
| | for use by app
|
Private Member Functions |
| void | addObject (S32 objectIndex) |
| void | updateBounds () |
| void | renderDetailMap (S32 od) |
| void | renderEnvironmentMap (S32 od) |
| void | renderFog (S32 od) |
| void | init (TSShapeInstance *) |
|
| void | selectCurrentDetail (F32 *sizeCutoffs, S32 numDetails, bool ignoreScale) |
| void | selectCurrentDetail (F32 pixelSize, F32 *sizeCutoffs, S32 numDetails) |
| void | computePolyCount () |
Static Private Member Functions |
| static void | breakShape (TSShapeInstance *, TSPartInstance *, S32 currentNode, Vector< TSPartInstance * > &partList, F32 *probShatter, F32 *probBreak, S32 probDepth) |
Private Attributes |
| TSShapeInstance * | mSourceShape |
| | TSPartInstance assumes ownership (or shared ownership) of the source shape.
|
| F32 * | mSizeCutoffs |
| | detail selection uses the table pointed to by this member
|
| S32 * | mPolyCount |
| S32 | mNumDetails |
| Vector< TSShapeInstance::MeshObjectInstance * > | mMeshObjects |
|
| Box3F | mBounds |
| Point3F | mCenter |
| F32 | mRadius |
|
detail levels on part instance correspond directly to object details on objects -- this is different from shape instances where dl corresponds to a subtree number and object detail. The reason for this is that partinstances are derived from a single subtree of a shape instance, so the subtree is implied (implied by which objects are in the part instance)...
|
| S32 | mCurrentObjectDetail |
| F32 | mCurrentIntraDL |
Static Private Attributes |
| static MRandomR250 | smRandom |
Constructor & Destructor Documentation
| TSPartInstance::~TSPartInstance |
( |
|
) |
|
Member Function Documentation
| void TSPartInstance::addObject |
( |
S32 |
objectIndex |
) |
[private] |
| void TSPartInstance::updateBounds |
( |
|
) |
[private] |
| void TSPartInstance::renderDetailMap |
( |
S32 |
od |
) |
[private] |
| void TSPartInstance::renderEnvironmentMap |
( |
S32 |
od |
) |
[private] |
| void TSPartInstance::renderFog |
( |
S32 |
od |
) |
[private] |
| void TSPartInstance::selectCurrentDetail |
( |
F32 * |
sizeCutoffs, |
|
|
S32 |
numDetails, |
|
|
bool |
ignoreScale | |
|
) |
| | [private] |
| void TSPartInstance::selectCurrentDetail |
( |
F32 |
pixelSize, |
|
|
F32 * |
sizeCutoffs, |
|
|
S32 |
numDetails | |
|
) |
| | [private] |
| void TSPartInstance::computePolyCount |
( |
|
) |
[private] |
| const TSShape* TSPartInstance::getShape |
( |
|
) |
[inline] |
| Point3F& TSPartInstance::getCenter |
( |
|
) |
[inline] |
| Box3F& TSPartInstance::getBounds |
( |
|
) |
[inline] |
| F32& TSPartInstance::getRadius |
( |
|
) |
[inline] |
| void TSPartInstance::render |
( |
const Point3F * |
objectScale = NULL |
) |
[inline] |
| void TSPartInstance::render |
( |
S32 |
dl, |
|
|
const Point3F * |
objectScale = NULL | |
|
) |
| | |
| void TSPartInstance::setDetailData |
( |
F32 * |
sizeCutoffs, |
|
|
S32 |
numDetails | |
|
) |
| | |
choose detail method -- pass in NULL for first parameter to just use shapes data
| void TSPartInstance::selectCurrentDetail |
( |
F32 |
pixelSize |
) |
|
| void TSPartInstance::selectCurrentDetail |
( |
F32 |
dist, |
|
|
F32 |
invScale | |
|
) |
| | |
| F32 TSPartInstance::getDetailSize |
( |
S32 |
dl |
) |
|
| S32 TSPartInstance::getPolyCount |
( |
S32 |
dl |
) |
|
| S32 TSPartInstance::getNumDetails |
( |
|
) |
[inline] |
| S32 TSPartInstance::getCurrentObjectDetail |
( |
|
) |
[inline] |
| void TSPartInstance::setCurrentObjectDetail |
( |
S32 |
od |
) |
[inline] |
| F32 TSPartInstance::getCurrentIntraDetail |
( |
|
) |
[inline] |
| void TSPartInstance::setCurrentIntraDetail |
( |
F32 |
intra |
) |
[inline] |
Member Data Documentation
TSPartInstance assumes ownership (or shared ownership) of the source shape.
This means that the source shape cannot be deleted so long as the part instance is still around. This also means that any change to source shapes's transforms or other animation properties will affect how the part instance displays. It is ok (even expected), however, to have many part instances accessing the same shape.
detail selection uses the table pointed to by this member
if this member is blank, then it uses source shape to determine detail...
detail 0 draws up until size of shape is less than mSizeCutoffs[0], detail 1 until mSizeCutoffs[1], etc.
|