A geometric primitive representing a triangle by its vertices as points in some unspecified frame, and a collection of triangle-related utility methods.  
 More...
 | 
|   | Triangle_ () | 
|   | Construct an uninitialized Triangle object; the vertices will be garbage.  More...
  | 
|   | 
|   | Triangle_ (const Vec3P &v0, const Vec3P &v1, const Vec3P &v2) | 
|   | Construct a triangle from its vertices.  More...
  | 
|   | 
|   | Triangle_ (const Vec3P *vertices) | 
|   | Construct a triangle from vertices stored in array which is presumed to contain at least three points.  More...
  | 
|   | 
|   | Triangle_ (const Vec3P **vertexPointers) | 
|   | Construct a triangle from an indirect list of vertices stored in array which is presumed to contain at least three pointers to points.  More...
  | 
|   | 
| Triangle_ &  | setVertex (int i, const Vec3P &p) | 
|   | Change one vertex of this triangle.  More...
  | 
|   | 
| Triangle_ &  | setVertices (const Vec3P &v0, const Vec3P &v1, const Vec3P &v2) | 
|   | Change the vertices of this triangle.  More...
  | 
|   | 
| Triangle_ &  | setVertices (const Vec3P *vertices) | 
|   | Change the vertices of this triangle, taking the new ones from an array which is presumed to contain at least three points.  More...
  | 
|   | 
| const Vec3P &  | getVertex (int i) const  | 
|   | Access a vertex by index. Order is the same as construction.  More...
  | 
|   | 
| Vec3P &  | updVertex (int i) | 
|   | Get writable access to a vertex by index. Order is the same as construction.  More...
  | 
|   | 
| const Vec3P &  | operator[] (int i) const  | 
|   | Access a vertex by indexing the triangle.  More...
  | 
|   | 
| Vec3P &  | operator[] (int i) | 
|   | Get writable access to a vertex by indexing the triangle.  More...
  | 
|   | 
| LineSeg_< P >  | getEdge (int i) const  | 
|   | Return a LineSeg_ containing an edge of this triangle, with edges numbered in a counterclockwise direction so that edge0 is v0v1, edge1 is v1v2, and edge2 is v2v0.  More...
  | 
|   | 
| Vec3P  | findPoint (const Vec2P &uv) const  | 
|   | Return a point on the triangle's face given by its (u,v) coordinates.  More...
  | 
|   | 
| Vec3P  | findCentroid () const  | 
|   | Return the centroid point on the triangle's face; this is the same as findPoint(1/3,1/3) but faster.  More...
  | 
|   | 
| UnitVec3P  | calcUnitNormal () const  | 
|   | Calculate the unit normal to the triangle face taking the vertices in counterclockwise order.  More...
  | 
|   | 
| Sphere_< P >  | calcBoundingSphere () const  | 
|   | Calculate the smallest bounding sphere enclosing the three vertices of this triangle.  More...
  | 
|   | 
| RealP  | calcArea () const  | 
|   | Return the area of this triangle.  More...
  | 
|   | 
| RealP  | calcAreaSqr () const  | 
|   | Return the square of the area of this triangle.  More...
  | 
|   | 
| Vec3P  | findNearestPoint (const Vec3P &position, Vec2P &uv) const  | 
|   | Given a location in space, find the point of this triangular face that is closest to that location.  More...
  | 
|   | 
| bool  | intersectsRay (const Vec3P &origin, const UnitVec3P &direction, RealP &distance, Vec2P &uv) const  | 
|   | Determine whether a given ray intersects this triangle.  More...
  | 
|   | 
| bool  | overlapsTriangle (const Triangle_< P > &other) const  | 
|   | Determine yes/no whether this triangle overlaps another one.  More...
  | 
|   | 
| bool  | intersectsTriangle (const Triangle_< P > &other, LineSeg_< P > &seg, bool &isCoplanar) const  | 
|   | Determine whether this triangle intersects another one, and if so then if they are not coplanar return the line segment representing their intersection.  More...
  | 
|   | 
template<class P>
class SimTK::Geo::Triangle_< P >
A geometric primitive representing a triangle by its vertices as points in some unspecified frame, and a collection of triangle-related utility methods. 
We support a u-v barycentric parameterization for the triangle.