Vuo
1.1.1
|
VuoMeshUtility implementation.
Macros | |
#define | PI 3.14159265359 |
Constant providing the ratio of a circle's circumference to its diameter. | |
Functions | |
static VuoPoint4d | VuoPoint4d_min (const VuoPoint4d lhs, const VuoPoint4d rhs) |
Returns component-wise min, ignoring W. | |
static VuoPoint4d | VuoPoint4d_max (const VuoPoint4d lhs, const VuoPoint4d rhs) |
Returns component-wise max, ignoring W. | |
void | VuoMeshUtility_calculateNormals (VuoSubmesh *submesh) |
Calculates the normal for each vertex in this submesh. | |
void | VuoMeshUtility_calculateTangents (VuoSubmesh *submesh) |
Calculates tangents and bitangents for a mesh given vertices, textures, normals, and triangles. | |
bool | VuoMeshUtility_bounds (const VuoSubmesh mesh, VuoPoint4d *min, VuoPoint4d *max) |
Get the bounds of a submesh. | |
void | VuoMeshUtility_calculateSphericalUVs (VuoSubmesh *submesh) |
Generate UVs by calculating each vertex position as projected onto a bounding sphere. | |
static float | dot (const VuoPoint4d lhs, const VuoPoint4d rhs) |
Dot product of XYZ values in 4d points. | |
void | VuoMeshUtility_insertSeam (VuoSubmesh *submesh) |
Inserts a seam on a submesh. | |
static int | compare (const void *lhs, const void *rhs) |
Compare function for triangle ordering qsort in removeUnusedVertices. | |
void | VuoMeshUtility_removeUnusedVertices (VuoSubmesh *mesh) |
Removes unused vertices from a mesh. | |
#define PI 3.14159265359 |
Constant providing the ratio of a circle's circumference to its diameter.
|
static |
Compare function for triangle ordering qsort in removeUnusedVertices.
|
static |
Dot product of XYZ values in 4d points.
bool VuoMeshUtility_bounds | ( | const VuoSubmesh | mesh, |
VuoPoint4d * | min, | ||
VuoPoint4d * | max | ||
) |
Get the bounds of a submesh.
void VuoMeshUtility_calculateNormals | ( | VuoSubmesh * | submesh | ) |
Calculates the normal for each vertex in this submesh.
Generate normals for this submesh.
Vertices pointed at by multiple element indices will be averaged.
void VuoMeshUtility_calculateSphericalUVs | ( | VuoSubmesh * | submesh | ) |
Generate UVs by calculating each vertex position as projected onto a bounding sphere.
Generate spherical UVs for this submesh.
void VuoMeshUtility_calculateTangents | ( | VuoSubmesh * | submesh | ) |
Calculates tangents and bitangents for a mesh given vertices, textures, normals, and triangles.
Generate tangents and bitangents for this submesh.
Assumes triangles are wound using VuoMesh_IndividualTriangles, and that the positions, textures, normals, and triangles arrays are valid. Lengyel, Eric. “Computing Tangent Space Basis Vectors for an Arbitrary Mesh”. Terathon Software 3D Graphics Library, 2001. http://www.terathon.com/code/tangent.html
void VuoMeshUtility_insertSeam | ( | VuoSubmesh * | submesh | ) |
Inserts a seam on a submesh.
Inserts a seam along a vertical line on the left side of a mesh.
May (probably will) leave unused vertices.
void VuoMeshUtility_removeUnusedVertices | ( | VuoSubmesh * | mesh | ) |
Removes unused vertices from a mesh.
Remove unused vertices in a mesh.
|
inlinestatic |
Returns component-wise max, ignoring W.
|
inlinestatic |
Returns component-wise min, ignoring W.