DecalRoad

Engine/source/environment/decalRoad.h

More...

Classes:

Protected Types

enum
_Anonymous_ {
  DecalRoadMask = Parent::NextFreeMask
  NodeMask = Parent::NextFreeMask << 1
  GenEdgesMask = Parent::NextFreeMask << 2
  ReClipMask = Parent::NextFreeMask << 3
  TerrainChangedMask = Parent::NextFreeMask << 4
  NextFreeMask = Parent::NextFreeMask << 5
}

Private Types

Parent 

Public Functions

addNode(const Point3F & pos, F32 width)
bool
castray(const Point3F & start, const Point3F & end)
bool
bool
containsPoint(const Point3F & worldPos, U32 * nodeIdx)
bool
insertNode(const Point3F & pos, const F32 & width, const U32 & idx)

Insert a node anywhere in the road.

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 editor is deactivated.

Called when the editor is activated.

Called when the object is removed from the sim.

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.

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

scheduleUpdate(U32 updateMask)
scheduleUpdate(U32 updateMask, U32 delayMs, bool restartTimer)
setNodeWidth(U32 idx, F32 width)

Sets the scale for the object.

Sets the Object -> World transform.

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 'Node' Field setter that will add a node to the list.

Protected Static Functions

bool
ptSetBreakAngle(void * object, const char * index, const char * data)
bool
ptSetTextureLength(void * object, const char * index, const char * data)

Detailed Description

Protected Types

@75

Enumerator

DecalRoadMask = Parent::NextFreeMask
NodeMask = Parent::NextFreeMask << 1
GenEdgesMask = Parent::NextFreeMask << 2
ReClipMask = Parent::NextFreeMask << 3
TerrainChangedMask = Parent::NextFreeMask << 4
NextFreeMask = Parent::NextFreeMask << 5

Private Types

typedef SceneObject Parent 

Public Friends

Protected Attributes

RoadBatchVector mBatches 
F32 mBreakAngle 
RoadEdgeVector mEdges 
DecalRoadUpdateEvent * mLastEvent 
bool mLoadRenderData 
SimObjectPtr< Material > mMaterial 
BaseMatInstance * mMatInst 
RoadNodeVector mNodes 
GFXPrimitiveBufferHandle mPB 
U32 mRenderPriority 
U32 mSegmentsPerBatch 
Box3F mTerrainUpdateRect 
F32 mTextureLength 
U32 mTriangleCount 
S32 mUpdateEventId 
GFXVertexBufferHandle< GFXVertexPNTBT > mVB 
U32 mVertCount 

Protected Static Attributes

bool smDiscardAll 
bool smEditorOpen 
SimObjectPtr< SimSet > smServerDecalRoadSet 
bool smShowBatches 
bool smShowRoad 
bool smShowSpline 
S32 smUpdateDelay 
bool smWireframe 

Public Functions

DecalRoad()

~DecalRoad()

addNode(const Point3F & pos, F32 width)

buildNodesFromList(DecalRoadNodeList * list)

castray(const Point3F & start, const Point3F & end)

containsPoint(const Point3F & point)

containsPoint(const Point3F & worldPos, U32 * nodeIdx)

DECLARE_CONOBJECT(DecalRoad )

deleteNode(U32 idx)

getClosestNode(const Point3F & pos, U32 & idx)

getNodePosition(U32 idx)

getNodeWidth(U32 idx)

insertNode(const Point3F & pos, const F32 & width, const U32 & idx)

Insert a node anywhere in the road.

Pass idx zero to add to the front and idx U32_MAX to add to the end

inspectPostApply()

Reimplemented from: SceneObject

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()

scheduleUpdate(U32 updateMask)

scheduleUpdate(U32 updateMask, U32 delayMs, bool restartTimer)

setBreakAngle(F32 degrees)

setNodePosition(U32 idx, const Point3F & pos)

setNodeWidth(U32 idx, F32 width)

setScale(const VectorF & scale)

Reimplemented from: SceneObject

setTextureLength(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 'Node' Field setter that will add a node to the list.

consoleInit()

getServerSet()

initPersistFields()

Protected Functions

_addNode(const Point3F & pos, F32 width)

_captureVerts()

_debugRender(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * matInst)

_generateEdges()

_getTerrainHeight(const F32 & x, const F32 & y, F32 & height)

_getTerrainHeight(const Point2F & pos, F32 & height)

_getTerrainHeight(Point3F & pos)

_initMaterial()

_insertNode(const Point3F & pos, const F32 & width, const U32 & idx)

_onTerrainChanged(U32 type, TerrainBlock * tblock, const Point2I & min, const Point2I & max)

DECLARE_NET_MATERIALASSET(DecalRoad , Material , DecalRoadMask )

Protected Static Functions

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

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