Torque3D Documentation / _generateds / ScenePolyhedralObject

ScenePolyhedralObject

Engine/source/scene/mixin/scenePolyhedralObject.h

Helper template for mixing a polyhedral volume definition into the superclass hierarchy of a SceneSpace-derived class.

More...

Public Types

enum
_Anonymous_ {
  MAX_PLANES = 256
  MAX_POINTS = 256
  MAX_EDGES = 256
}
Base
Parent 
P
PolyhedronType 

Protected Types

enum
_Anonymous_ {
  PolyMask = Parent::NextFreeMask << 0
  NextFreeMask = Parent::NextFreeMask << 1
}

Protected Attributes

bool

Whether the polyhedron corresponds to the object box.

The polyhedron that defines the volume of the object.

Protected Functions

Public Functions

bool

Return the polyhedron that describes the space.

bool
packUpdate(NetConnection * connection, U32 mask, BitStream * stream)

Convert the polyhedral object to a raw polyhedron.

unpackUpdate(NetConnection * connection, BitStream * stream)
bool
writeField(StringTableEntry name, const char * value)
writeFields(Stream & stream, U32 tabStop)

Public Static Functions

Private Static Functions

bool
_setEdge(void * object, const char * index, const char * data)
bool
_setPlane(void * object, const char * index, const char * data)
bool
_setPoint(void * object, const char * index, const char * data)

Detailed Description

Helper template for mixing a polyhedral volume definition into the superclass hierarchy of a SceneSpace-derived class.

Public Types

@154

Enumerator

MAX_PLANES = 256
MAX_POINTS = 256
MAX_EDGES = 256
typedef Base Parent 
typedef P PolyhedronType 

Protected Types

@155

Enumerator

PolyMask = Parent::NextFreeMask << 0
NextFreeMask = Parent::NextFreeMask << 1

Protected Attributes

bool mIsBox 

Whether the polyhedron corresponds to the object box.

If so, several things can be fast-tracked. For example, serializing the polyhedron is pointless as it can be easily reconstructed from the object box on load time. Also, certain operations like containment tests have significantly faster formulations for AABBs (given that the input data is transformed into object space) than for general polyhedrons.

PolyhedronType mPolyhedron 

The polyhedron that defines the volume of the object.

note:

Defined in object space by default.

Protected Functions

_renderObject(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * overrideMat)

Reimplemented by: AccumulationVolume, OcclusionVolume, Portal

Public Functions

ScenePolyhedralObject()

ScenePolyhedralObject(const PolyhedronType & polyhedron)

containsPoint(const Point3F & point)

getPolyhedron()

Return the polyhedron that describes the space.

onAdd()

Reimplemented by: ScenePolyhedralZone, AccumulationVolume, OcclusionVolume

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

Reimplemented by: AccumulationVolume, Portal, SceneAmbientSoundObject, SceneAmbientSoundObject

ToAnyPolyhedron()

Reimplemented from: IScenePolyhedralObject

unpackUpdate(NetConnection * connection, BitStream * stream)

Reimplemented by: AccumulationVolume, Portal, SceneAmbientSoundObject, SceneAmbientSoundObject

writeField(StringTableEntry name, const char * value)

Reimplemented by: Portal

writeFields(Stream & stream, U32 tabStop)

Public Static Functions

initPersistFields()

Private Static Functions

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

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

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