TSMesh Class Reference#include <tsMesh.h>
Inheritance diagram for TSMesh:
[legend]List of all members.
|
Material Methods |
| void | setFade (F32 fade) |
| void | clearFade () |
| static void | setMaterial (S32 matIndex, TSMaterialList *) |
| static void | setOverrideFade (F32 fadeValue) |
| static F32 | getOverrideFade () |
Lighting plug-in methods |
| static void | registerLightPlugin (TSMeshLightPlugin *mlp) |
| static void | unregisterLightPlugin (TSMeshLightPlugin *mlp) |
| static TSMeshLightPlugin * | smLightPlugin |
Public Types |
| | StandardMeshType = 0 |
| | types...
|
| | SkinMeshType = 1 |
| | DecalMeshType = 2 |
| | SortedMeshType = 3 |
| | NullMeshType = 4 |
| | TypeMask = StandardMeshType|SkinMeshType|DecalMeshType|SortedMeshType|NullMeshType |
| | Billboard = BIT(31) |
| | flags (stored with meshType)...
|
| | HasDetailTexture = BIT(30) |
| | BillboardZAxis = BIT(29) |
| | UseEncodedNormals = BIT(28) |
| | FlagMask = Billboard|BillboardZAxis|HasDetailTexture|UseEncodedNormals |
| enum | {
StandardMeshType = 0,
SkinMeshType = 1,
DecalMeshType = 2,
SortedMeshType = 3,
NullMeshType = 4,
TypeMask = StandardMeshType|SkinMeshType|DecalMeshType|SortedMeshType|NullMeshType,
Billboard = BIT(31),
HasDetailTexture = BIT(30),
BillboardZAxis = BIT(29),
UseEncodedNormals = BIT(28),
FlagMask = Billboard|BillboardZAxis|HasDetailTexture|UseEncodedNormals
} |
Public Member Functions |
| U32 | getMeshType () |
| void | setFlags (U32 flag) |
| void | clearFlags (U32 flag) |
| U32 | getFlags (U32 flag=0xFFFFFFFF) |
| const Point3F * | getNormals (S32 firstVert) |
| virtual void | assemble (bool skip) |
| | persist methods...
|
| virtual void | disassemble () |
virtual GFXVertexBufferHandle<
GFXVertexPNTTB > & | getVertexBuffer () |
| void | createVBIB () |
| void | createTangents () |
| void | findTangent (U32 index1, U32 index2, U32 index3, Point3F *tan0, Point3F *tan1) |
| void | convertToTris (S16 *primitiveDataIn, S32 *primitiveMatIn, S16 *indicesIn, S32 numPrimIn, S32 &numPrimOut, S32 &numIndicesOut, S32 *primitivesOut, S16 *indicesOut) |
| | convert primitives on load...
|
| void | convertToSingleStrip (S16 *primitiveDataIn, S32 *primitiveMatIn, S16 *indicesIn, S32 numPrimIn, S32 &numPrimOut, S32 &numIndicesOut, S32 *primitivesOut, S16 *indicesOut) |
| void | leaveAsMultipleStrips (S16 *primitiveDataIn, S32 *primitiveMatIn, S16 *indicesIn, S32 numPrimIn, S32 &numPrimOut, S32 &numIndicesOut, S32 *primitivesOut, S16 *indicesOut) |
| S32 * | getSharedData32 (S32 parentMesh, S32 size, S32 **source, bool skip) |
| | methods used during assembly to share vertex and other info between meshes (and for skipping detail levels on load)
|
| S8 * | getSharedData8 (S32 parentMesh, S32 size, S8 **source, bool skip) |
| | TSMesh () |
| virtual | ~TSMesh () |
|
| virtual void | render () |
| virtual void | render (S32 frame, S32 matFrame, TSMaterialList *) |
|
| virtual bool | buildPolyList (S32 frame, AbstractPolyList *polyList, U32 &surfaceKey, TSMaterialList *materials) |
| virtual bool | getFeatures (S32 frame, const MatrixF &, const VectorF &, ConvexFeature *, U32 &surfaceKey) |
| virtual void | support (S32 frame, const Point3F &v, F32 *currMaxDP, Point3F *currSupport) |
| virtual bool | castRay (S32 frame, const Point3F &start, const Point3F &end, RayInfo *rayInfo, TSMaterialList *materials) |
| virtual bool | buildConvexHull () |
| | returns false if not convex (still builds planes)
|
| bool | addToHull (U32 idx0, U32 idx1, U32 idx2) |
|
calculate and get bounding information
|
| void | computeBounds () |
| virtual void | computeBounds (MatrixF &transform, Box3F &bounds, S32 frame=0, Point3F *center=NULL, F32 *radius=NULL) |
| void | computeBounds (Point3F *, S32 numVerts, MatrixF &transform, Box3F &bounds, Point3F *center, F32 *radius) |
| Box3F & | getBounds () |
| Point3F & | getCenter () |
| F32 | getRadius () |
| virtual S32 | getNumPolys () |
| U8 | encodeNormal (const Point3F &normal) |
| const Point3F & | decodeNormal (U8 ncode) |
Static Public Member Functions |
| static TSMesh * | assembleMesh (U32 meshType, bool skip) |
|
| static void | setCamTrans (const MatrixF &trans) |
| static void | setSceneState (SceneState *state) |
| static void | setCubemap (GFXCubemap *cm) |
| static void | setObject (SceneObject *obj) |
| static void | setGlow (bool glow) |
| static void | setRefract (bool refract) |
| static const MatrixF & | getCamTrans () |
Public Attributes |
| S32 | parentMesh |
| | index into shapes mesh list
|
| S32 | numFrames |
| S32 | numMatFrames |
| S32 | vertsPerFrame |
| FixedVector< Point3F > | verts |
| FixedVector< Point3F > | norms |
| FixedVector< Point2F > | tverts |
| FixedVector< TSDrawPrimitive > | primitives |
| FixedVector< U8 > | encodedNorms |
| FixedVector< U16 > | indices |
| Vector< Point3F > | initialTangents |
| Vector< Point4F > | tangents |
| Point3F | billboardAxis |
| | billboard data
|
|
Convex hulls are convex (no angles >= 180º) meshes used for collision |
| Vector< Point3F > | planeNormals |
| Vector< F32 > | planeConstants |
| Vector< U32 > | planeMaterials |
| S32 | planesPerFrame |
| U32 | mergeBufferStart |
Static Public Attributes |
| static bool | smUseTriangles |
| | on load...optionally convert primitives to other form
|
| static bool | smUseOneStrip |
| static S32 | smMinStripSize |
| static bool | smUseEncodedNormals |
| static const F32 | VISIBILITY_EPSILON |
|
variables used during assembly (for skipping mesh detail levels on load and for sharing verts between meshes)
|
| static Vector< Point3F * > | smVertsList |
| static Vector< Point3F * > | smNormsList |
| static Vector< U8 * > | smEncodedNormsList |
| static Vector< Point2F * > | smTVertsList |
| static Vector< bool > | smDataCopied |
| static const Point3F | smU8ToNormalTable [] |
Protected Attributes |
| U32 | meshType |
| Box3F | mBounds |
| Point3F | mCenter |
| F32 | mRadius |
| F32 | mVisibility |
| bool | mDynamic |
| GFXVertexBufferHandle< GFXVertexPNTTB > | mVB |
| GFXPrimitiveBufferHandle | mPB |
Static Protected Attributes |
| static F32 | overrideFadeVal |
| static MatrixF | smCamTrans |
| static SceneState * | smSceneState |
| static SceneObject * | smObject |
| static GFXCubemap * | smCubemap |
| static bool | smGlowPass |
| static bool | smRefractPass |
Friends |
| class | TSShape |
Member Enumeration Documentation
- Enumerator:
-
| StandardMeshType |
types... |
| SkinMeshType |
|
| DecalMeshType |
|
| SortedMeshType |
|
| NullMeshType |
|
| TypeMask |
|
| Billboard |
flags (stored with meshType)... |
| HasDetailTexture |
|
| BillboardZAxis |
|
| UseEncodedNormals |
|
| FlagMask |
|
Constructor & Destructor Documentation
| TSMesh::TSMesh |
( |
|
) |
[inline] |
| virtual TSMesh::~TSMesh |
( |
|
) |
[virtual] |
Member Function Documentation
| U32 TSMesh::getMeshType |
( |
|
) |
[inline] |
| void TSMesh::setFlags |
( |
U32 |
flag |
) |
[inline] |
| void TSMesh::clearFlags |
( |
U32 |
flag |
) |
[inline] |
| U32 TSMesh::getFlags |
( |
U32 |
flag = 0xFFFFFFFF |
) |
[inline] |
| const Point3F* TSMesh::getNormals |
( |
S32 |
firstVert |
) |
|
| virtual void TSMesh::render |
( |
|
) |
[virtual] |
| static void TSMesh::setCamTrans |
( |
const MatrixF & |
trans |
) |
[inline, static] |
| static void TSMesh::setSceneState |
( |
SceneState * |
state |
) |
[inline, static] |
| static void TSMesh::setGlow |
( |
bool |
glow |
) |
[inline, static] |
| static void TSMesh::setRefract |
( |
bool |
refract |
) |
[inline, static] |
| static const MatrixF& TSMesh::getCamTrans |
( |
|
) |
[inline, static] |
| void TSMesh::setFade |
( |
F32 |
fade |
) |
[inline] |
| void TSMesh::clearFade |
( |
|
) |
[inline] |
| static void TSMesh::setOverrideFade |
( |
F32 |
fadeValue |
) |
[inline, static] |
| static F32 TSMesh::getOverrideFade |
( |
|
) |
[inline, static] |
| virtual bool TSMesh::buildConvexHull |
( |
|
) |
[virtual] |
| void TSMesh::computeBounds |
( |
|
) |
|
| virtual void TSMesh::computeBounds |
( |
MatrixF & |
transform, |
|
|
Box3F & |
bounds, |
|
|
S32 |
frame = 0, |
|
|
Point3F * |
center = NULL, |
|
|
F32 * |
radius = NULL | |
|
) |
| | [virtual] |
| Box3F& TSMesh::getBounds |
( |
|
) |
[inline] |
| Point3F& TSMesh::getCenter |
( |
|
) |
[inline] |
| F32 TSMesh::getRadius |
( |
|
) |
[inline] |
| virtual S32 TSMesh::getNumPolys |
( |
|
) |
[virtual] |
| U8 TSMesh::encodeNormal |
( |
const Point3F & |
normal |
) |
|
| const Point3F & TSMesh::decodeNormal |
( |
U8 |
ncode |
) |
[inline] |
| virtual void TSMesh::assemble |
( |
bool |
skip |
) |
[virtual] |
| static TSMesh* TSMesh::assembleMesh |
( |
U32 |
meshType, |
|
|
bool |
skip | |
|
) |
| | [static] |
| virtual void TSMesh::disassemble |
( |
|
) |
[virtual] |
| void TSMesh::createVBIB |
( |
|
) |
|
| void TSMesh::createTangents |
( |
|
) |
|
| void TSMesh::convertToTris |
( |
S16 * |
primitiveDataIn, |
|
|
S32 * |
primitiveMatIn, |
|
|
S16 * |
indicesIn, |
|
|
S32 |
numPrimIn, |
|
|
S32 & |
numPrimOut, |
|
|
S32 & |
numIndicesOut, |
|
|
S32 * |
primitivesOut, |
|
|
S16 * |
indicesOut | |
|
) |
| | |
convert primitives on load...
| void TSMesh::convertToSingleStrip |
( |
S16 * |
primitiveDataIn, |
|
|
S32 * |
primitiveMatIn, |
|
|
S16 * |
indicesIn, |
|
|
S32 |
numPrimIn, |
|
|
S32 & |
numPrimOut, |
|
|
S32 & |
numIndicesOut, |
|
|
S32 * |
primitivesOut, |
|
|
S16 * |
indicesOut | |
|
) |
| | |
| void TSMesh::leaveAsMultipleStrips |
( |
S16 * |
primitiveDataIn, |
|
|
S32 * |
primitiveMatIn, |
|
|
S16 * |
indicesIn, |
|
|
S32 |
numPrimIn, |
|
|
S32 & |
numPrimOut, |
|
|
S32 & |
numIndicesOut, |
|
|
S32 * |
primitivesOut, |
|
|
S16 * |
indicesOut | |
|
) |
| | |
| S32* TSMesh::getSharedData32 |
( |
S32 |
parentMesh, |
|
|
S32 |
size, |
|
|
S32 ** |
source, |
|
|
bool |
skip | |
|
) |
| | |
methods used during assembly to share vertex and other info between meshes (and for skipping detail levels on load)
| S8* TSMesh::getSharedData8 |
( |
S32 |
parentMesh, |
|
|
S32 |
size, |
|
|
S8 ** |
source, |
|
|
bool |
skip | |
|
) |
| | |
Friends And Related Function Documentation
Member Data Documentation
index into shapes mesh list
on load...optionally convert primitives to other form
|