![]() |
RigsofRods
Soft-body Physics Simulation
|
Represents a triangle in three-dimensional space. More...
#include <Triangle.h>
Public Member Functions | |
Triangle (const Ogre::Vector3 &a, const Ogre::Vector3 &b, const Ogre::Vector3 &c) | |
Construct triangle from three given vertices. More... | |
Ogre::Vector3 | normal () const |
Return normal vector of the triangle. More... | |
Data Fields | |
const Ogre::Vector3 | a |
Vertex a. More... | |
const Ogre::Vector3 | b |
Vertex b. More... | |
const Ogre::Vector3 | c |
Vertex c. More... | |
const Ogre::Vector3 | u |
Span vector u. More... | |
const Ogre::Vector3 | v |
Span vector v. More... | |
Private Attributes | |
bool | m_initialized |
Ogre::Vector3 | m_normal |
Cached normal vector. More... | |
Represents a triangle in three-dimensional space.
Stores the three vertices a, b ,c of the triangle and two (non-unit-length) vectors u and v which span the plane within which the triangle lies.
Definition at line 35 of file Triangle.h.
|
inlineexplicit |
Construct triangle from three given vertices.
Definition at line 39 of file Triangle.h.
|
inline |
Return normal vector of the triangle.
The normal vector has unit length.
Definition at line 48 of file Triangle.h.
const Ogre::Vector3 Triangle::a |
Vertex a.
Definition at line 59 of file Triangle.h.
const Ogre::Vector3 Triangle::b |
Vertex b.
Definition at line 60 of file Triangle.h.
const Ogre::Vector3 Triangle::c |
Vertex c.
Definition at line 61 of file Triangle.h.
|
mutableprivate |
Definition at line 67 of file Triangle.h.
|
mutableprivate |
Cached normal vector.
Definition at line 68 of file Triangle.h.
const Ogre::Vector3 Triangle::u |
Span vector u.
Definition at line 63 of file Triangle.h.
const Ogre::Vector3 Triangle::v |
Span vector v.
Definition at line 64 of file Triangle.h.