doml.geometry_utils

Useful geometry methods.

@author Kai Burjack @author Richard Greenlees

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(double v0X, double v0Y, double v0Z, double v1X, double v1Y, double v1Z, double v2X, double v2Y, double 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(double x, double y, double 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