|
Collision | |
We optionally store collision information for this chunk's geometry. | |
void | generateCollision () |
Helper function to update our collision structures for this chunk. | |
U32 | mColTreeDepth |
ColNode * | mColTree |
The linearized quadtree for our collision info. | |
Point3F * | mColGeom |
U16 * | mColIndices |
U16 * | mColIndicesOffsets |
U16 * | mColIndicesBuffer |
U32 | mColOffsetCount |
U32 | mColIndexCount |
Static Statistics | |
We track some statistics about the file IO we are doing. | |
static void | dumpIOStatistics () |
static U32 | smIndexBytesWritten |
static U32 | smVertexBytesWritten |
static U32 | smCollisionBytesWritten |
static U32 | smTotalBytesWritten |
static U32 | smChunksWritten |
Public Types | |
typedef AtlasChunk | Parent |
Public Member Functions | |
AtlasGeomChunk () | |
virtual | ~AtlasGeomChunk () |
virtual void | write (Stream *s) |
Serialize this chunk to a stream. | |
virtual void | read (Stream *s) |
Deserialize from a stream. | |
void | generate (AtlasChunk *children[4]) |
Given four children, (re)generate the data for this one. | |
virtual U32 | getHeadSentinel () |
virtual U32 | getTailSentinel () |
virtual void | process () |
Once the chunk has been loaded (in another thread), this is called in the main thread to prepare any complex resources. | |
void | render () |
void | calculatePoints (const Point3F &camPos, Point3F &outNearPos, Point3F &outFarPos, Point2F &outNearTC, Point2F &outFarTC) |
Calculate some useful information about our near/far points, used primarily for clipmaps. | |
AtlasDiscreteMesh * | copyToDiscreteMesh () |
Copy ourselves out to a discrete mesh for processing. | |
void | copyFromDiscreteMesh (AtlasDiscreteMesh *adm) |
Update ourselves from a discrete mesh. | |
AtlasGeomChunk * | generateCopy (S32 reformat=-1) |
Box3F | getBounds () |
bool | buildCollisionInfo (const Box3F &box, Convex *c, AbstractPolyList *poly, AtlasInstance *object) |
void | registerConvex (const U16 offset, Convex *convex, AtlasInstance *object, const Box3F &queryBox) |
Public Attributes | |
Convex | mConvexList |
Raw data | |
Raw data buffers, which are loaded directly from the file. They require no additional processing; once loaded they are OK to use. | |
U32 | mSkirtSkipCount |
Number of indices used for rendering "fake" geometry - ie, skirts, which are present solely to help hide LOD changes. | |
U32 | mIndexCount |
U16 * | mIndex |
U32 | mVertCount |
GFXAtlasVert2 * | mVert |
Box3F | mBounds |
Bounds of this chunk; duplicated in stub so we can get to it w/o paging. | |
RectF | mTCBounds |
Bounding box for this chunk's TC's. | |
Resource Handles | |
GFXVertexBufferHandle< GFXAtlasVert2 > | mVB |
GFXPrimitiveBufferHandle | mPB |
Classes | |
struct | ColNode |
A quadtree of ColNodes lets us do a quick broad filter against collision queries and efficiently reduce the number of triangles we have to individually check. More... |
typedef AtlasChunk AtlasGeomChunk::Parent |
AtlasGeomChunk::AtlasGeomChunk | ( | ) |
virtual AtlasGeomChunk::~AtlasGeomChunk | ( | ) | [virtual] |
void AtlasGeomChunk::generateCollision | ( | ) |
Helper function to update our collision structures for this chunk.
Serialize this chunk to a stream.
Reimplemented from AtlasChunk.
Deserialize from a stream.
Reimplemented from AtlasChunk.
void AtlasGeomChunk::generate | ( | AtlasChunk * | children[4] | ) | [virtual] |
Given four children, (re)generate the data for this one.
Their order starts at topleft, clockwise, 0123.
Reimplemented from AtlasChunk.
virtual U32 AtlasGeomChunk::getHeadSentinel | ( | ) | [virtual] |
Reimplemented from AtlasChunk.
virtual U32 AtlasGeomChunk::getTailSentinel | ( | ) | [virtual] |
Reimplemented from AtlasChunk.
virtual void AtlasGeomChunk::process | ( | ) | [virtual] |
Once the chunk has been loaded (in another thread), this is called in the main thread to prepare any complex resources.
(For instance, a texture or VB, that depend on access to GFX to initialize.)
Reimplemented from AtlasChunk.
void AtlasGeomChunk::render | ( | ) |
void AtlasGeomChunk::calculatePoints | ( | const Point3F & | camPos, | |
Point3F & | outNearPos, | |||
Point3F & | outFarPos, | |||
Point2F & | outNearTC, | |||
Point2F & | outFarTC | |||
) |
Calculate some useful information about our near/far points, used primarily for clipmaps.
AtlasDiscreteMesh* AtlasGeomChunk::copyToDiscreteMesh | ( | ) |
Copy ourselves out to a discrete mesh for processing.
void AtlasGeomChunk::copyFromDiscreteMesh | ( | AtlasDiscreteMesh * | adm | ) |
Update ourselves from a discrete mesh.
AtlasGeomChunk* AtlasGeomChunk::generateCopy | ( | S32 | reformat = -1 |
) |
Box3F AtlasGeomChunk::getBounds | ( | ) |
bool AtlasGeomChunk::buildCollisionInfo | ( | const Box3F & | box, | |
Convex * | c, | |||
AbstractPolyList * | poly, | |||
AtlasInstance * | object | |||
) |
void AtlasGeomChunk::registerConvex | ( | const U16 | offset, | |
Convex * | convex, | |||
AtlasInstance * | object, | |||
const Box3F & | queryBox | |||
) |
static void AtlasGeomChunk::dumpIOStatistics | ( | ) | [static] |
Number of indices used for rendering "fake" geometry - ie, skirts, which are present solely to help hide LOD changes.
They should be discarded when generating new LOD levels and so forth.
"Fake" geometry always lives at the end of the index buffer.
Draw this much less to not draw skirts.
GFXAtlasVert2* AtlasGeomChunk::mVert |
Bounds of this chunk; duplicated in stub so we can get to it w/o paging.
Bounding box for this chunk's TC's.
GFXVertexBufferHandle<GFXAtlasVert2> AtlasGeomChunk::mVB |
The linearized quadtree for our collision info.
If NULL, there isn't any collision info.
U32 AtlasGeomChunk::smIndexBytesWritten [static] |
U32 AtlasGeomChunk::smVertexBytesWritten [static] |
U32 AtlasGeomChunk::smTotalBytesWritten [static] |
U32 AtlasGeomChunk::smChunksWritten [static] |