|
Public Member Functions | |
AtlasDiscreteMesh () | |
~AtlasDiscreteMesh () | |
AtlasDiscreteMesh * | decimate (U32 target) |
Make a new mesh that contains a simplified version of this one, decimated to target faces. | |
void | combine (Vector< AtlasDiscreteMesh * > &meshes) |
Combine a set of meshes into a new one. | |
void | weld (F32 posThreshold, F32 texThreshold=0.001f) |
Merge verts within threshold units of one another. | |
void | remap (const Vector< U16 > &remapTable) |
Apply the given remap table to our indices. | |
void | conditionMesh () |
Condition a mesh for better rendering. | |
void | transformTexCoords (Point2F s, Point2F t) |
Transform the texture coordinates by multiply and add on each axis. | |
void | transformPositions (Point2F s, Point2F t) |
Transform the positions by multiply and add on x and y axes. | |
void | clipAgainstPlane (PlaneF p, AtlasDiscreteMesh *front, AtlasDiscreteMesh *back) |
Clip against a half-plane. | |
Box3F | calcBounds () |
Public Attributes | |
U32 | mVertexCount |
Point3F * | mPos |
Point3F * | mNormal |
Point2F * | mTex |
bool | mHasMorphData |
Point3F * | mPosMorphOffset |
Point2F * | mTexMorphOffset |
U32 | mIndexCount |
U16 * | mIndex |
bool | mOwnsData |
If we own data, then we'll delete it when we get destructed. |
AtlasDiscreteMesh::AtlasDiscreteMesh | ( | ) |
AtlasDiscreteMesh::~AtlasDiscreteMesh | ( | ) |
AtlasDiscreteMesh* AtlasDiscreteMesh::decimate | ( | U32 | target | ) |
Make a new mesh that contains a simplified version of this one, decimated to target faces.
Contains proper morph data.
void AtlasDiscreteMesh::combine | ( | Vector< AtlasDiscreteMesh * > & | meshes | ) |
Combine a set of meshes into a new one.
This just appends all their data together. A good followup step is to do a weld.
Merge verts within threshold units of one another.
Apply the given remap table to our indices.
void AtlasDiscreteMesh::conditionMesh | ( | ) |
Condition a mesh for better rendering.
Stuff like:
Transform the texture coordinates by multiply and add on each axis.
Transform the positions by multiply and add on x and y axes.
void AtlasDiscreteMesh::clipAgainstPlane | ( | PlaneF | p, | |
AtlasDiscreteMesh * | front, | |||
AtlasDiscreteMesh * | back | |||
) |
Clip against a half-plane.
Pass it pointers to to ADMs and it will fill them. If one is empty then it that side's data will be discarded.
Properly generates interpolated texcoords. Ignores morph data.
Box3F AtlasDiscreteMesh::calcBounds | ( | ) |
If we own data, then we'll delete it when we get destructed.