|
Public Types | |
typedef U16 | VertIndex |
typedef Vector< VertIndex > | VertHashBin |
Hash table for vertex lookups. | |
Public Member Functions | |
AtlasOldMesher (AtlasOldActivationHeightfield *hf, S8 level) | |
Create an Atlas chunk mesh helper instance. | |
~AtlasOldMesher () | |
U32 | getTriCount () |
void | emitTri (VertIndex a, VertIndex b, VertIndex c) |
void | emitTri (Point2I a, Point2I b, Point2I c) |
VertIndex | getVertIndex (Point2I pos) |
Return an index for the given vertex on the heightfield. | |
VertIndex | addSpecialVert (Point2I pos, S16 z) |
Emit a special vertex; these are generally used for skirts. | |
void | updateBounds () |
void | optimize () |
void | writeVertex (Stream *s, Vert *vert, const S8 level) |
void | writeCollision (Stream *s) |
void | write (Stream *s, const S8 level, bool writeCollision) |
Public Attributes | |
S16 | mMinZ |
S16 | mMaxZ |
Vector< VertHashBin > | mVertHash |
Vector< VertIndex > | mSpecialVerts |
Protected Types | |
HashBinCount = 19 | |
enum | { HashBinCount = 19 } |
Protected Member Functions | |
Point3F | getVertPos (const Vert &v) |
Static Protected Member Functions | |
static const U32 | generatePointHash (const Point2I &pos) |
Protected Attributes | |
Box3F | mBounds |
Bounds of this mesh. | |
Vector< Vert > | mVerts |
The vertices of this mesh. | |
Vector< VertIndex > | mIndices |
The indices of this mesh. | |
Point3F | mCompressionFactor |
Compression information, so we can write fixed point integers out. | |
AtlasOldActivationHeightfield * | mHeight |
Pointer to the heightfield we're generating mesh data for. | |
S8 | mLevel |
Classes | |
struct | Vert |
Represents a vertex in our mesh. More... |
typedef U16 AtlasOldMesher::VertIndex |
typedef Vector<VertIndex> AtlasOldMesher::VertHashBin |
Hash table for vertex lookups.
AtlasOldMesher::AtlasOldMesher | ( | AtlasOldActivationHeightfield * | hf, | |
S8 | level | |||
) |
Create an Atlas chunk mesh helper instance.
hf | Heightfield we're generating data for, used to get heights of vertices and calculate morph info, etc. | |
level | Level we're generating for. Necessary so we know how much to morph. |
AtlasOldMesher::~AtlasOldMesher | ( | ) |
static const U32 AtlasOldMesher::generatePointHash | ( | const Point2I & | pos | ) | [inline, static, protected] |
U32 AtlasOldMesher::getTriCount | ( | ) | [inline] |
Return an index for the given vertex on the heightfield.
This will emit the vertex if necessary, or recycle it if it already exists.
Emit a special vertex; these are generally used for skirts.
void AtlasOldMesher::updateBounds | ( | ) |
void AtlasOldMesher::optimize | ( | ) |
Box3F AtlasOldMesher::mBounds [protected] |
Bounds of this mesh.
Vector<Vert> AtlasOldMesher::mVerts [protected] |
The vertices of this mesh.
Vector<VertIndex> AtlasOldMesher::mIndices [protected] |
The indices of this mesh.
We store a trilist and cook into a tristrip.
Actually, this isn't true atm. We just store a trilist. Tristrip comes later in the milestone path.
Point3F AtlasOldMesher::mCompressionFactor [protected] |
Compression information, so we can write fixed point integers out.
AtlasOldActivationHeightfield* AtlasOldMesher::mHeight [protected] |
Pointer to the heightfield we're generating mesh data for.
S8 AtlasOldMesher::mLevel [protected] |