geometry_utils

Undocumented in source.

Members

Static functions

bitangent
void bitangent(Vector3d v1, Vector2d uv1, Vector3d v2, Vector2d uv2, Vector3d v3, Vector2d uv3, Vector3d dest)

Calculate the surface bitangent for the three supplied vertices and UV coordinates and store the result in <code>dest</code>.

normal
void normal(Vector3d v0, Vector3d v1, Vector3d v2, Vector3d dest)

Calculate the normal of a surface defined by points <code>v1</code>, <code>v2</code> and <code>v3</code> and store it in <code>dest</code>.

normal
void normal(float v0X, float v0Y, float v0Z, float v1X, float v1Y, float v1Z, float v2X, float v2Y, float v2Z, Vector3d dest)

Calculate the normal of a surface defined by points <code>(v1X, v1Y, v1Z)</code>, <code>(v2X, v2Y, v2Z)</code> and <code>(v3X, v3Y, v3Z)</code> and store it in <code>dest</code>.

perpendicular
void perpendicular(float x, float y, float z, Vector3d dest1, Vector3d dest2)

Compute two arbitrary vectors perpendicular to the given normalized vector <code>(x, y, z)</code>, and store them in <code>dest1</code> and <code>dest2</code>, respectively. <p> The computed vectors will themselves be perpendicular to each another and normalized. So the tree vectors <code>(x, y, z)</code>, <code>dest1</code> and <code>dest2</code> form an orthonormal basis.

perpendicular
void perpendicular(Vector3d v, Vector3d dest1, Vector3d dest2)

Compute two arbitrary vectors perpendicular to the given normalized vector <code>v</code>, and store them in <code>dest1</code> and <code>dest2</code>, respectively. <p> The computed vectors will themselves be perpendicular to each another and normalized. So the tree vectors <code>v</code>, <code>dest1</code> and <code>dest2</code> form an orthonormal basis.

tangent
void tangent(Vector3d v1, Vector2d uv1, Vector3d v2, Vector2d uv2, Vector3d v3, Vector2d uv3, Vector3d dest)

Calculate the surface tangent for the three supplied vertices and UV coordinates and store the result in <code>dest</code>.

tangentBitangent
void tangentBitangent(Vector3d v1, Vector2d uv1, Vector3d v2, Vector2d uv2, Vector3d v3, Vector2d uv3, Vector3d destTangent, Vector3d destBitangent)

Calculate the surface tangent and bitangent for the three supplied vertices and UV coordinates and store the result in <code>dest</code>.

Meta