AtlasDiscreteMesh Class Reference [Atlas Editing]

#include <atlasDiscreteMesh.h>

List of all members.


Detailed Description

A discrete mesh, for use when modifying Atlas mesh data.

It deals with triangle lists.


Public Member Functions

 AtlasDiscreteMesh ()
 ~AtlasDiscreteMesh ()
AtlasDiscreteMeshdecimate (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
Point3FmPos
Point3FmNormal
Point2FmTex
bool mHasMorphData
Point3FmPosMorphOffset
Point2FmTexMorphOffset
U32 mIndexCount
U16mIndex
bool mOwnsData
 If we own data, then we'll delete it when we get destructed.


Constructor & Destructor Documentation

AtlasDiscreteMesh::AtlasDiscreteMesh (  ) 

AtlasDiscreteMesh::~AtlasDiscreteMesh (  ) 


Member Function Documentation

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.

void AtlasDiscreteMesh::weld ( F32  posThreshold,
F32  texThreshold = 0.001f 
)

Merge verts within threshold units of one another.

void AtlasDiscreteMesh::remap ( const Vector< U16 > &  remapTable  ) 

Apply the given remap table to our indices.

void AtlasDiscreteMesh::conditionMesh (  ) 

Condition a mesh for better rendering.

Stuff like:

  • Optimize for vertex caching.
  • Optimize so verts are present in order they were first drawn.
  • and whatever else we can think of.

void AtlasDiscreteMesh::transformTexCoords ( Point2F  s,
Point2F  t 
)

Transform the texture coordinates by multiply and add on each axis.

void AtlasDiscreteMesh::transformPositions ( Point2F  s,
Point2F  t 
)

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


Member Data Documentation

If we own data, then we'll delete it when we get destructed.