Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::Triangle Class Reference

A generic triangle representation. More...

#include <Triangle.h>

List of all members.

Public Member Functions

double area () const
Vector3 center () const
void deserialize (class BinaryInput &b)
void getBounds (class AABox &) const
size_t hashCode () const
const Vector3normal () const
bool operator== (const Triangle &other) const
const Planeplane () const
Vector3::Axis primaryAxis () const
Vector3 randomPoint () const
void serialize (class BinaryOutput &b)
 Triangle (const Vector3 &v0, const Vector3 &v1, const Vector3 &v2)
 Triangle ()
 Triangle (class BinaryInput &b)
const Vector3vertex (int n) const
 ~Triangle ()

Friends

class CollisionDetection
class Ray


Detailed Description

A generic triangle representation.

This should not be used as the underlying triangle for creating models; it is intended for providing fast property queries but requires a lot of storage and is mostly immutable.


Constructor & Destructor Documentation

G3D::Triangle::Triangle ( class BinaryInput b  ) 

G3D::Triangle::Triangle (  ) 

G3D::Triangle::Triangle ( const Vector3 v0,
const Vector3 v1,
const Vector3 v2 
)

G3D::Triangle::~Triangle (  ) 


Member Function Documentation

double G3D::Triangle::area (  )  const

Vector3 G3D::Triangle::center (  )  const

Barycenter.

void G3D::Triangle::deserialize ( class BinaryInput b  ) 

void G3D::Triangle::getBounds ( class AABox  )  const

size_t G3D::Triangle::hashCode (  )  const [inline]

const Vector3& G3D::Triangle::normal (  )  const

bool G3D::Triangle::operator== ( const Triangle other  )  const [inline]

For two triangles to be equal they must have the same vertices in the same order.

That is, vertex[0] == vertex[0], etc.

const Plane& G3D::Triangle::plane (  )  const

Vector3::Axis G3D::Triangle::primaryAxis (  )  const [inline]

Vector3 G3D::Triangle::randomPoint (  )  const

Returns a random point in the triangle.

void G3D::Triangle::serialize ( class BinaryOutput b  ) 

const Vector3& G3D::Triangle::vertex ( int  n  )  const [inline]

0, 1, or 2


Friends And Related Function Documentation

friend class CollisionDetection [friend]

friend class Ray [friend]


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:48 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo