MeshRoad
Engine/source/environment/meshRoad.h
Private Types
_Anonymous_ { MeshRoadMask = Parent::NextFreeMask NodeMask = Parent::NextFreeMask << 1 RegenMask = Parent::NextFreeMask << 2 InitialUpdateMask = Parent::NextFreeMask << 3 SelectedMask = Parent::NextFreeMask << 4 MaterialMask = Parent::NextFreeMask << 5 ProfileMask = Parent::NextFreeMask << 6 NextFreeMask = Parent::NextFreeMask << 7 }
Parent
Protected Types
_Anonymous_ { Top = 0 Bottom = 1 Side = 2 SurfaceCount = 3 }
Public Friends
class
class
class
Public Static Attributes
bool
bool
bool
bool
bool
bool
Protected Attributes
mMaterial [SurfaceCount]
mMatInst [SurfaceCount]
mPB [SurfaceCount]
mTriangleCount [SurfaceCount]
GFXVertexBufferHandle< GFXVertexPNTT >
mVB [SurfaceCount]
mVertCount [SurfaceCount]
Protected Static Attributes
Private Static Attributes
Public Functions
MeshRoad()
buildConvex(const Box3F & box, Convex * convex)
Builds a convex hull for this object.
buildNodesFromList(MeshRoadNodeList * list)
bool
buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)
Builds a list of polygons which intersect a bounding volume.
bool
buildSegmentPolyList(AbstractPolyList * polyList, U32 startSegIdx, U32 endSegIdx, bool capFront, bool capEnd)
bool
calcSliceTransform(U32 idx, MatrixF & mat)
bool
bool
deleteNode(U32 idx)
getNodeDepth(U32 idx)
getNodeNormal(U32 idx)
getNodePosition(U32 idx)
getNodeTransform(U32 idx)
getNodeWidth(U32 idx)
getSegment(U32 idx)
Called after any property of the object is changed in the world editor.
bool
onAdd()
Called when the object is added to the sim.
Called when the editor is deactivated.
Called when the editor is activated.
onStaticModified(const char * slotName, const char * newValue)
Specifically, these are called by setDataField when a static or dynamic field is modified, see the console details.
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Instructs this object to pack its state for transfer over the network.
prepRenderImage(SceneRenderState * state)
Called when the SceneManager is ready for the registration of render instances.
setBatchSize(U32 level)
setNodeDepth(U32 idx, F32 depth)
setNodeNormal(U32 idx, const VectorF & normal)
setNodePosition(U32 idx, const Point3F & pos)
setNodeWidth(U32 idx, F32 width)
setTextureRepeat(F32 meters)
setTransform(const MatrixF & mat)
Sets the Object -> World transform.
unpackUpdate(NetConnection * conn, BitStream * stream)
Instructs this object to read state data previously packed with packUpdate.
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
bool
addNodeFromField(void * object, const char * index, const char * data)
Protected 'Component' Field setter that will add a component to the list.
bool
addProfileNodeFromField(void * obj, const char * index, const char * data)
SimSet *
Protected Functions
_debugRender(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * )
DECLARE_NET_MATERIALASSET(MeshRoad , BottomMaterial , MeshRoadMask )
DECLARE_NET_MATERIALASSET(MeshRoad , SideMaterial , MeshRoadMask )
DECLARE_NET_MATERIALASSET(MeshRoad , TopMaterial , MeshRoadMask )
Detailed Description
Private Types
@77
Enumerator
- MeshRoadMask = Parent::NextFreeMask
- NodeMask = Parent::NextFreeMask << 1
- RegenMask = Parent::NextFreeMask << 2
- InitialUpdateMask = Parent::NextFreeMask << 3
- SelectedMask = Parent::NextFreeMask << 4
- MaterialMask = Parent::NextFreeMask << 5
- ProfileMask = Parent::NextFreeMask << 6
- NextFreeMask = Parent::NextFreeMask << 7
typedef SceneObject Parent
Protected Types
@78
Enumerator
- Top = 0
- Bottom = 1
- Side = 2
- SurfaceCount = 3
Public Friends
Public Static Attributes
bool smEditorOpen
SimObjectPtr< SimSet > smServerMeshRoadSet
bool smShowBatches
bool smShowRoad
bool smShowRoadProfile
bool smShowSpline
bool smWireframe
Protected Attributes
MeshRoadBatchVector mBatches
F32 mBreakAngle
Convex * mConvexList
Vector< MeshRoadConvex * > mDebugConvex
SimObjectPtr< Material > mMaterial [SurfaceCount]
BaseMatInstance * mMatInst [SurfaceCount]
MeshRoadNodeVector mNodes
GFXPrimitiveBufferHandle mPB [SurfaceCount]
PhysicsBody * mPhysicsRep
MeshRoadSegmentVector mSegments
MeshRoadProfile mSideProfile
MeshRoadSliceVector mSlices
F32 mTextureLength
U32 mTriangleCount [SurfaceCount]
GFXVertexBufferHandle< GFXVertexPNTT > mVB [SurfaceCount]
U32 mVertCount [SurfaceCount]
S32 mWidthSubdivisions
Protected Static Attributes
GFXStateBlockRef smWireframeSB
Private Static Attributes
bool buildPolyList_TopSurfaceOnly
Public Functions
MeshRoad()
~MeshRoad()
addNode(const Point3F & pos, const F32 & width, const F32 & depth, const Point3F & normal)
buildConvex(const Box3F & box, Convex * convex)
Reimplemented from: SceneObject
buildNodesFromList(MeshRoadNodeList * list)
buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)
Reimplemented from: SceneObject
buildSegmentPolyList(AbstractPolyList * polyList, U32 startSegIdx, U32 endSegIdx, bool capFront, bool capEnd)
buildTopPolyList(PolyListContext , AbstractPolyList * )
calcSliceTransform(U32 idx, MatrixF & mat)
castRay(const Point3F & start, const Point3F & end, RayInfo * info)
Reimplemented from: SceneObject
collideBox(const Point3F & start, const Point3F & end, RayInfo * info)
Reimplemented from: SceneObject
collideRay(const Point3F & origin, const Point3F & direction, U32 * nodeIdx, Point3F * collisionPnt)
DECLARE_CONOBJECT(MeshRoad )
deleteNode(U32 idx)
getNode(U32 idx)
getNodeDepth(U32 idx)
getNodeNormal(U32 idx)
getNodePosition(U32 idx)
getNodeTransform(U32 idx)
getNodeWidth(U32 idx)
getRoadLength()
getSegment(U32 idx)
getSegmentCount()
insertNode(const Point3F & pos, const F32 & width, const F32 & depth, const Point3F & normal, const U32 & idx)
inspectPostApply()
Reimplemented from: SceneObject
isEndNode(U32 idx)
onAdd()
Reimplemented from: SceneObject
onEditorDisable()
Reimplemented from: SimObject
onEditorEnable()
Reimplemented from: SimObject
onRemove()
Reimplemented from: SceneObject
onStaticModified(const char * slotName, const char * newValue)
Reimplemented from: SimObject
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Reimplemented from: SceneObject
prepRenderImage(SceneRenderState * state)
Reimplemented from: SceneObject
regenerate()
setBatchSize(U32 level)
setNode(const Point3F & pos, const F32 & width, const F32 & depth, const Point3F & normal, const U32 & idx)
setNodeDepth(U32 idx, F32 depth)
setNodeNormal(U32 idx, const VectorF & normal)
setNodePosition(U32 idx, const Point3F & pos)
setNodeWidth(U32 idx, F32 width)
setScale(const VectorF & scale)
Reimplemented from: SceneObject
setTextureFile(StringTableEntry file)
setTextureRepeat(F32 meters)
setTransform(const MatrixF & mat)
Reimplemented from: SceneObject
unpackUpdate(NetConnection * conn, BitStream * stream)
Reimplemented from: SceneObject
writeField(StringTableEntry fieldname, const char * value)
Reimplemented from: SceneObject
writeFields(Stream & stream, U32 tabStop)
Reimplemented from: SimObject
Public Static Functions
addNodeFromField(void * object, const char * index, const char * data)
Protected 'Component' Field setter that will add a component to the list.
addProfileNodeFromField(void * obj, const char * index, const char * data)
consoleInit()
getServerSet()
initPersistFields()
Protected Functions
_addNode(const Point3F & pos, const F32 & width, const F32 & depth, const Point3F & normal)
_debugRender(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * )
_generateSegments()
_generateSlices()
_generateVerts()
_initMaterial()
_insertNode(const Point3F & pos, const F32 & width, const F32 & depth, const Point3F & normal, const U32 & idx)
_regenerate()
DECLARE_NET_MATERIALASSET(MeshRoad , BottomMaterial , MeshRoadMask )
DECLARE_NET_MATERIALASSET(MeshRoad , SideMaterial , MeshRoadMask )
DECLARE_NET_MATERIALASSET(MeshRoad , TopMaterial , MeshRoadMask )