AtlasInstance Class Reference [Atlas Runtime]

#include <atlasInstance2.h>

Inheritance diagram for AtlasInstance:

Inheritance graph
[legend]
List of all members.

Detailed Description

An instance of an Atlas terrain.

Provides glue code to bring an Atlas terrain into the game world!


Public Types

 RayCollisionDebugToTriangles = 0
 RayCollisionDebugToColTree = 1
 RayCollisionDebugToChunkBox = 2
 RayCollisionDebugToObjectBox = 3
 RayCollisionDebugToMesh = 4
 Let raycasting test against raw geometry data rather than the collision mesh.
 ChunkBoundsDebugNone = 0
 ChunkBoundsDebugLODThreshold = 1
 ChunkBoundsDebugLODHolistic = 2
 ChunkBoundsDebugHeat = 3
enum  RayCollisionDebugLevel {
  RayCollisionDebugToTriangles = 0,
  RayCollisionDebugToColTree = 1,
  RayCollisionDebugToChunkBox = 2,
  RayCollisionDebugToObjectBox = 3,
  RayCollisionDebugToMesh = 4
}
enum  ChunkBoundsDebugMode {
  ChunkBoundsDebugNone = 0,
  ChunkBoundsDebugLODThreshold = 1,
  ChunkBoundsDebugLODHolistic = 2,
  ChunkBoundsDebugHeat = 3
}

Public Member Functions

 AtlasInstance ()
 ~AtlasInstance ()
 DECLARE_CONOBJECT (AtlasInstance)
AtlasInstanceGeomTOCgetGeomTOC ()
AtlasFilegetAtlasFile ()
AtlasFilegetLightMapFile ()
void findDeepestStubs (Vector< AtlasResourceGeomTOC::StubType * > &stubs)
bool onAdd ()
 Called when the object is added to the sim.
void onRemove ()
 Called when the object is removed from the sim.
virtual void inspectPostApply ()
 Called after any property of the object is changed in the world editor.
bool prepRenderImage (SceneState *state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState)
 Called when the SceneGraph is ready for the registration of RenderImages.
void renderObject (ObjectRenderInst *ri, BaseMatInstance *overrideMat)
bool castRay (const Point3F &start, const Point3F &end, RayInfo *info)
 Casts a ray and obtain collision information, returns true if RayInfo is modified.
void buildConvex (const Box3F &box, Convex *convex)
 Builds a convex hull for this object.
bool buildPolyList (AbstractPolyList *polyList, const Box3F &box, const SphereF &sphere)
 Builds a list of polygons which intersect a bounding volume.
U32 packUpdate (NetConnection *conn, U32 mask, BitStream *stream)
 Instructs this object to pack its state for transfer over the network.
void unpackUpdate (NetConnection *conn, BitStream *stream)
 Instructs this object to read state data previously packed with packUpdate.
void refillClipMap ()
void loadAlternateLightMap (const StringTableEntry sLightmapFile)
void releaseLightmap ()
U32 getCRC ()
S32 getLightMapChunkSize ()
const StringTableEntry getAtlasFilename ()
bool isBlended ()
U32 getLightMapDimension ()

Static Public Member Functions

static void consoleInit ()
 Register global constant variables and do other one-time initialization tasks in a subclass of ConsoleObject.
static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Static Public Attributes

static S32 smRayCollisionDebugLevel
static S32 smRenderChunkBoundsDebugLevel
static bool smLockFrustrum
static bool smRenderWireframe
static bool smNoUpdate

Private Types

typedef SceneObject Parent

Private Member Functions

void syncThreads ()

Private Attributes

ResourceOld< AtlasFilemAtlasFile
AtlasInstanceGeomTOCmGeomTOC
ResourceOld< AtlasFilemLightMapFile
GFXTexHandle mDetailTex
StringTableEntry mDetailTexFileName
StringTableEntry mAtlasFileName
ClipMapmClipMap
AtlasClipMapBatcher mBatcher
bool mIsBlended
U32 mNumBlendLayers
ClipMapBlenderCachemAcmic_b
AtlasResourceTexTOCmOpacityToc
MaterialList mMaterialList
U32 mLightmapDimension
S32 mLMChunkSize

Friends

class AtlasClipMapBatcher


Member Typedef Documentation

Reimplemented from SceneObject.


Member Enumeration Documentation

Enumerator:
RayCollisionDebugToTriangles 
RayCollisionDebugToColTree 
RayCollisionDebugToChunkBox 
RayCollisionDebugToObjectBox 
RayCollisionDebugToMesh  Let raycasting test against raw geometry data rather than the collision mesh.

Enumerator:
ChunkBoundsDebugNone 
ChunkBoundsDebugLODThreshold 
ChunkBoundsDebugLODHolistic 
ChunkBoundsDebugHeat 


Constructor & Destructor Documentation

AtlasInstance::AtlasInstance (  ) 

AtlasInstance::~AtlasInstance (  ) 


Member Function Documentation

void AtlasInstance::syncThreads (  )  [private]

AtlasInstance::DECLARE_CONOBJECT ( AtlasInstance   ) 

AtlasInstanceGeomTOC* AtlasInstance::getGeomTOC (  )  [inline]

AtlasFile* AtlasInstance::getAtlasFile (  )  [inline]

AtlasFile* AtlasInstance::getLightMapFile (  )  [inline]

void AtlasInstance::findDeepestStubs ( Vector< AtlasResourceGeomTOC::StubType * > &  stubs  ) 

bool AtlasInstance::onAdd (  )  [virtual]

Called when the object is added to the sim.

Reimplemented from SceneObject.

void AtlasInstance::onRemove (  )  [virtual]

Called when the object is removed from the sim.

Reimplemented from SceneObject.

virtual void AtlasInstance::inspectPostApply (  )  [virtual]

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

See also:
inspectPreApply

Reimplemented from SceneObject.

static void AtlasInstance::consoleInit (  )  [static]

Register global constant variables and do other one-time initialization tasks in a subclass of ConsoleObject.

See also:
console

Reimplemented from ConsoleObject.

static void AtlasInstance::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDeprecatedField(), addGroup(), endGroup()

Reimplemented from SceneObject.

bool AtlasInstance::prepRenderImage ( SceneState state,
const U32  stateKey,
const U32  startZone,
const bool  modifyBaseZoneState 
) [virtual]

Called when the SceneGraph is ready for the registration of RenderImages.

See also:
SceneState
Parameters:
state SceneState
stateKey State key of the current SceneState
startZone Base zone index
modifyBaseZoneState If true, the object needs to modify the zone state.

Reimplemented from SceneObject.

void AtlasInstance::renderObject ( ObjectRenderInst ri,
BaseMatInstance overrideMat 
)

bool AtlasInstance::castRay ( const Point3F start,
const Point3F end,
RayInfo info 
) [virtual]

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

Parameters:
start Start point of ray
end End point of ray
info Collision information obtained (out)

Reimplemented from SceneObject.

void AtlasInstance::buildConvex ( const Box3F box,
Convex convex 
) [virtual]

Builds a convex hull for this object.

Think of a convex hull as a low-res mesh which covers, as tightly as possible, the object mesh, and is used as a collision mesh.

Parameters:
box 
convex Convex mesh generated (out)

Reimplemented from SceneObject.

bool AtlasInstance::buildPolyList ( AbstractPolyList polyList,
const Box3F box,
const SphereF sphere 
) [virtual]

Builds a list of polygons which intersect a bounding volume.

This will use either the sphere or the box, not both, the SceneObject implimentation ignores sphere.

See also:
AbstractPolyList
Parameters:
polyList Poly list build (out)
box Box bounding volume
sphere Sphere bounding volume

Reimplemented from SceneObject.

U32 AtlasInstance::packUpdate ( NetConnection conn,
U32  mask,
BitStream stream 
) [virtual]

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

Parameters:
conn Net connection being used
mask Mask indicating fields to transmit.
stream Bitstream to pack data to
Returns:
Any bits which were not dealt with. The value is stored by the networking system. Don't set bits you weren't passed.

Reimplemented from NetObject.

void AtlasInstance::unpackUpdate ( NetConnection conn,
BitStream stream 
) [virtual]

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

Parameters:
conn Net connection being used
stream stream to read from

Reimplemented from NetObject.

void AtlasInstance::refillClipMap (  ) 

void AtlasInstance::loadAlternateLightMap ( const StringTableEntry  sLightmapFile  ) 

void AtlasInstance::releaseLightmap (  ) 

U32 AtlasInstance::getCRC (  ) 

S32 AtlasInstance::getLightMapChunkSize (  ) 

const StringTableEntry AtlasInstance::getAtlasFilename (  )  [inline]

bool AtlasInstance::isBlended (  )  [inline]

U32 AtlasInstance::getLightMapDimension (  )  [inline]


Friends And Related Function Documentation

friend class AtlasClipMapBatcher [friend]


Member Data Documentation