|
Persist Helper Functions |
void | fixEndian (S32 *, S16 *, S8 *, S32, S32, S32) |
static TSShapeAlloc | tsalloc |
Public Types |
| UniformScale = BIT(0) |
| AlignedScale = BIT(1) |
| ArbitraryScale = BIT(2) |
| Blend = BIT(3) |
| Cyclic = BIT(4) |
| MakePath = BIT(5) |
| IflInit = BIT(6) |
| HasTranslucency = BIT(7) |
| AnyScale = UniformScale | AlignedScale | ArbitraryScale |
enum | {
UniformScale = BIT(0),
AlignedScale = BIT(1),
ArbitraryScale = BIT(2),
Blend = BIT(3),
Cyclic = BIT(4),
MakePath = BIT(5),
IflInit = BIT(6),
HasTranslucency = BIT(7),
AnyScale = UniformScale | AlignedScale | ArbitraryScale
} |
Public Member Functions |
| TSShape () |
| ~TSShape () |
void | init () |
void | initMaterialList () |
| you can swap in a new material list, but call this if you do
|
bool | preloadMaterialList (const Torque::Path &path) |
| called to preload and validate the materials in the mat list
|
void | setupBillboardDetails (TSShapeInstance *shape) |
bool | getSequencesConstructed () const |
void | setSequencesConstructed (const bool c) |
void | computeAccelerator (S32 dl) |
| build LOS collision detail
|
bool | buildConvexHull (S32 dl) const |
void | computeBounds (S32 dl, Box3F &bounds) const |
bool | checkSkip (S32 meshNum, S32 &curObject, S32 skipDL) |
| mem buffer transfer helper (indicate when we don't want to include a particular mesh/decal)
|
void | fixupOldSkins (S32 numMeshes, S32 numSkins, S32 numDetails, S32 *detailFirstSkin, S32 *detailNumSkins) |
|
For speeding up buildpolylist and support calls.
|
ConvexHullAccelerator * | getAccelerator (S32 dl) |
|
indexed by keyframe number and offset (which object/node/decal of the animated objects/nodes/decals you want information for).
|
QuatF & | getRotation (const Sequence &seq, S32 keyframeNum, S32 rotNum, QuatF *) const |
const Point3F & | getTranslation (const Sequence &seq, S32 keyframeNum, S32 tranNum) const |
F32 | getUniformScale (const Sequence &seq, S32 keyframeNum, S32 scaleNum) const |
const Point3F & | getAlignedScale (const Sequence &seq, S32 keyframeNum, S32 scaleNum) const |
TSScale & | getArbitraryScale (const Sequence &seq, S32 keyframeNum, S32 scaleNum, TSScale *) const |
const ObjectState & | getObjectState (const Sequence &seq, S32 keyframeNum, S32 objectNum) const |
|
S32 | findName (const String &name) const |
const String & | getName (S32 nameIndex) const |
S32 | findNode (S32 nameIndex) const |
S32 | findNode (const String &name) const |
S32 | findObject (S32 nameIndex) const |
S32 | findObject (const String &name) const |
S32 | findIflMaterial (S32 nameIndex) const |
S32 | findIflMaterial (const String &name) const |
S32 | findDetail (S32 nameIndex) const |
S32 | findDetail (const String &name) const |
S32 | findSequence (S32 nameIndex) const |
S32 | findSequence (const String &name) const |
bool | hasTranslucency () const |
|
Methods for saving/loading shapes to/from streams
|
void | write (Stream *) |
bool | read (Stream *) |
void | readOldShape (Stream *s, S32 *&, S16 *&, S8 *&, S32 &, S32 &, S32 &) |
void | writeName (Stream *, S32 nameIndex) |
S32 | readName (Stream *, bool addName) |
void | createEmptyShape () |
| Initializes our TSShape to be ready to receive put mesh data.
|
bool | readMD2 (Stream *) |
void | exportSequences (Stream *) |
bool | importSequences (Stream *) |
void | readIflMaterials (const char *shapePath) |
|
uses TSShape::Alloc structure
|
void | assembleShape () |
void | disassembleShape () |
Public Attributes |
S8 * | mMemoryBlock |
| Memory block for data storage.
|
TSMaterialList * | materialList |
U32 | mExporterVersion |
F32 | mSmallestVisibleSize |
| Computed at load time from details vector.
|
S32 | mSmallestVisibleDL |
S32 | mReadVersion |
| File version that this shape was read from.
|
U32 | mFlags |
| hasTranslucancy, iflInit
|
U32 | data |
| User-defined data storage.
|
bool | mSequencesConstructed |
|
FixedVector< Node > | nodes |
FixedVector< Object > | objects |
FixedVector< IflMaterial > | iflMaterials |
FixedVector< ObjectState > | objectStates |
FixedVector< S32 > | subShapeFirstNode |
FixedVector< S32 > | subShapeFirstObject |
FixedVector< S32 > | detailFirstSkin |
FixedVector< S32 > | subShapeNumNodes |
FixedVector< S32 > | subShapeNumObjects |
FixedVector< Detail > | details |
FixedVector< Quat16 > | defaultRotations |
FixedVector< Point3F > | defaultTranslations |
|
FixedVector< S32 > | subShapeFirstTranslucentObject |
| These are set up at load time, but memory is allocated along with loaded data.
|
FixedVector< TSMesh * > | meshes |
|
these vectors describe how to transition between detail levels using alpha. "alpha-in" next detail as intraDL goes from alphaIn+alphaOut to alphaOut. "alpha-out" current detail level as intraDL goes from alphaOut to 0. - Note:
- intraDL is at 1 when if shape were any closer to us we'd be at dl-1
- intraDL is at 0 when if shape were any farther away we'd be at dl+1
|
FixedVector< F32 > | alphaIn |
FixedVector< F32 > | alphaOut |
|
Vector< Sequence > | sequences |
Vector< Quat16 > | nodeRotations |
Vector< Point3F > | nodeTranslations |
Vector< F32 > | nodeUniformScales |
Vector< Point3F > | nodeAlignedScales |
Vector< Quat16 > | nodeArbitraryScaleRots |
Vector< Point3F > | nodeArbitraryScaleFactors |
Vector< Quat16 > | groundRotations |
Vector< Point3F > | groundTranslations |
Vector< Trigger > | triggers |
Vector< F32 > | iflFrameOffTimes |
Vector< TSLastDetail * > | billboardDetails |
Vector< ConvexHullAccelerator * > | detailCollisionAccelerators |
Vector< String > | names |
|
F32 | radius |
F32 | tubeRadius |
Point3F | center |
Box3F | bounds |
Static Public Attributes |
static S32 | smNumSkipLoadDetails |
| don't load this many of the highest detail levels (although we always load one renderable detail if there is one)
|
static bool | smInitOnRead |
| by default we initialize shape when we read...
|
|
These control default values for alpha transitions between detail levels
|
static F32 | smAlphaOutLastDetail |
static F32 | smAlphaInBillboard |
static F32 | smAlphaOutBillboard |
static F32 | smAlphaInDefault |
static F32 | smAlphaOutDefault |
|
static S32 | smVersion |
| Most recent version...the one we write.
|
static S32 | smReadVersion |
| Version currently being read, only valid during read.
|
static const U32 | smMostRecentExporterVersion |
Classes |
struct | ConvexHullAccelerator |
struct | Detail |
| Details are used for render detail selection. More...
|
struct | IflMaterial |
| IFL Materials are used to animate material lists -- i.e., run through a series of frames of a material. More...
|
struct | Node |
| Nodes hold the transforms in the shape's tree. They are the bones of the skeleton. More...
|
struct | Object |
| Objects hold renderable items (in particular meshes). More...
|
struct | ObjectState |
| Describes state of an individual object. More...
|
struct | Sequence |
| A Sequence holds all the information necessary to perform a particular animation (sequence). More...
|
struct | Trigger |
| When time on a sequence advances past a certain point, a trigger takes effect and changes one of the state variables to on or off. More...
|