ConvexShape

Engine/source/T3D/convexShape.h

More...

Classes:

Public User Defined

Geometry visualization

Public User Defined

getSurfaceWorldMat(S32 faceid, bool scaled)

Geometry access.

cullEmptyPlanes(Vector< U32 > * removedPlanes)
getSurfaceLineList(S32 surfId, Vector< Point3F > & lineList)
getSurfaceTriangles(S32 surfId, Vector< Point3F > * outPoints, Vector< Point2F > * outCoords, bool worldSpace)

Public User Defined

renderFaceEdges(S32 faceid, const ColorI & color, F32 lineWidth)

Geometry Visualization.

Public Types

enum
NetBits {
  TransformMask = Parent::NextFreeMask
  UpdateMask = Parent::NextFreeMask << 1
  NextFreeMask = Parent::NextFreeMask << 2
}

Private Types

Parent 

Public Static Attributes

Public Functions

buildConvex(const Box3F & box, Convex * convex)

Builds a convex hull for this object.

bool

Builds a list of polygons which intersect a bounding volume for exporting.

bool
buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)

Builds a list of polygons which intersect a bounding volume.

bool
castRay(const Point3F & start, const Point3F & end, RayInfo * info)

Casts a ray and obtain collision information, returns true if RayInfo is modified.

bool
collideBox(const Point3F & start, const Point3F & end, RayInfo * info)

Called after any property of the object is changed in the world editor.

bool

Called when the object is added to the sim.

Called when the object is removed from the sim.

Called when the size of the object changes.

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Instructs this object to pack its state for transfer over the network.

Called when the SceneManager is ready for the registration of render instances.

Sets the Object -> World transform.

Instructs this object to read state data previously packed with packUpdate.

updateBounds(bool recenter)
bool
writeField(StringTableEntry fieldname, const char * value)

Determine whether or not a field should be written.

writeFields(Stream & stream, U32 tabStop)

Write the fields of this object in TorqueScript.

Public Static Functions

Protected Static Functions

bool
protectedSetSurface(void * object, const char * index, const char * data)
bool
protectedSetSurfaceTexture(void * object, const char * index, const char * data)
bool
protectedSetSurfaceUV(void * object, const char * index, const char * data)

Detailed Description

Public User Defined

F32 mNormalLength 

Geometry visualization

Public User Defined

getSurfaceWorldMat(S32 faceid, bool scaled)

Geometry access.

cullEmptyPlanes(Vector< U32 > * removedPlanes)

exportToCollada()

resizePlanes(const Point3F & size)

getSurfaceLineList(S32 surfId, Vector< Point3F > & lineList)

getGeometry()

getSurfaces()

getSurfaceTriangles(S32 surfId, Vector< Point3F > * outPoints, Vector< Point2F > * outCoords, bool worldSpace)

Public User Defined

renderFaceEdges(S32 faceid, const ColorI & color, F32 lineWidth)

Geometry Visualization.

Public Types

NetBits

Enumerator

TransformMask = Parent::NextFreeMask
UpdateMask = Parent::NextFreeMask << 1
NextFreeMask = Parent::NextFreeMask << 2

Private Types

typedef SceneObject Parent 

Public Friends

Public Static Attributes

const S32 smMaxSurfaces 
bool smRenderEdges 

Protected Attributes

Convex * mConvexList 
Vector< Point3F > mFaceCenters 
Geometry mGeometry 
BaseMatInstance * mMaterialInst 
String mMaterialName 
PhysicsBody * mPhysicsRep 
Vector< PlaneF > mPlanes 
Vector< surfaceBuffers > mSurfaceBuffers 
Vector< MatrixF > mSurfaces 
Vector< surfaceMaterial > mSurfaceTextures 
Vector< surfaceUV > mSurfaceUVs 

Public Functions

ConvexShape()

~ConvexShape()

buildConvex(const Box3F & box, Convex * convex)

Reimplemented from: SceneObject

buildExportPolyList(ColladaUtils::ExportData * exportData, const Box3F & box, const SphereF & sphere)

Reimplemented from: SceneObject

buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)

Reimplemented from: SceneObject

castRay(const Point3F & start, const Point3F & end, RayInfo * info)

Reimplemented from: SceneObject

collideBox(const Point3F & start, const Point3F & end, RayInfo * info)

Reimplemented from: SceneObject

DECLARE_CONOBJECT(ConvexShape )

getMaterialName()

inspectPostApply()

Reimplemented from: SceneObject

onAdd()

Reimplemented from: SceneObject

onRemove()

Reimplemented from: SceneObject

onScaleChanged()

Reimplemented from: SceneObject

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Reimplemented from: SceneObject

prepRenderImage(SceneRenderState * state)

Reimplemented from: SceneObject

recenter()

setTransform(const MatrixF & mat)

Reimplemented from: SceneObject

unpackUpdate(NetConnection * conn, BitStream * stream)

Reimplemented from: SceneObject

updateBounds(bool recenter)

writeField(StringTableEntry fieldname, const char * value)

Reimplemented from: SceneObject

writeFields(Stream & stream, U32 tabStop)

Reimplemented from: SimObject

Public Static Functions

initPersistFields()

Protected Functions

_export(OptimizedPolyList * plist, const Box3F & box, const SphereF & sphere)

_renderDebug(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * mat)

_updateCollision()

_updateGeometry(bool updateCollision)

_updateMaterial()

Protected Static Functions

_comparePlaneDist(const void * a, const void * b)

protectedSetSurface(void * object, const char * index, const char * data)

protectedSetSurfaceTexture(void * object, const char * index, const char * data)

protectedSetSurfaceUV(void * object, const char * index, const char * data)