#include <rdTriangle.h>
Inheritance diagram for rdTriangle:

Public Types | |
| enum | INTERSECTION { NONE = 0, POINT_INTERIOR, POINT_VERTEX0, POINT_VERTEX1, POINT_VERTEX2, POINT_EDGE01, POINT_EDGE12, POINT_EDGE20, LINE_INTERIOR, LINE_VERTEX0, LINE_VERTEX1, LINE_VERTEX2, LINE_EDGE01, LINE_EDGE12, LINE_EDGE20 } |
Public Member Functions | |
| rdTriangle () | |
| Construct an empty graphics model. | |
| rdTriangle (IDOM_Element *aElement) | |
| Construct a graphics model from an XML Element. | |
| virtual | ~rdTriangle () |
| Destructor. | |
| void | setVertices (rdVertices *aVertices) |
| Set the vertices for this triangle. | |
| rdVertices * | getVertices () |
| Get the vertices for this triangle. | |
| int | getVertex (int aWhich, double rV[3]) const |
| Get a specified vertex of the triangle. | |
| int | getVertexIndex (int aWhich) const |
| Get the index of a vertex. | |
| void | computeLowerBounds (double rLower[3]) const |
| Compute the lower bounds of this triangle. | |
| void | computeUpperBounds (double rUpper[3]) const |
| Compute the upper bounds of this triangle. | |
| INTERSECTION | computeIntersection (const rdLine *aLine, double rP1[3], double rP2[3]) const |
| Compute the intersection of a specified line and this triangle. | |
| INTERSECTION | computeIntersection (const double aP[3]) const |
| Compute how a point intersects this triangle. | |
| void | updateIndicies () |
| Update the triangle indices based on the names of the vertices. | |
| virtual void | updateObject (bool aDeep=true) |
| Update this object based on its XML node. | |
| virtual void | updateNode (bool aDeep=true) |
| Update the XML node representing this object. | |
| void | updateData () |
| Update the member data of this object based on its XML node. | |
Private Member Functions | |
| void | setNull () |
| Set NULL values for all member variables. | |
Private Attributes | |
| rdVertices * | _verts |
| char * | _v3dNames [3] |
| int | _v3dIndex [3] |
|
|
Construct a graphics model from an XML Element.
|
|
|
Compute how a point intersects this triangle. It is assumed that the point lies in the plane of the triangle. The following types of intersections are possible: 1) NONE 2) POINT_INTERIOR 3) POINT_VERTEX0 4) POINT_VERTEX1 5) POINT_VERTEX2 6) POINT_EDGE01 7) POINT_EDGE12 8) POINT_EDGE20
|
|
||||||||||||||||
|
Compute the intersection of a specified line and this triangle. The following types of intersections are possible: 1) NONE 2) POINT_INTERIOR 3) POINT_VERTEX0 4) POINT_VERTEX1 5) POINT_VERTEX2 6) POINT_EDGE01 7) POINT_EDGE12 8) POINT_EDGE20 9) LINE_INTERIOR 10) LINE_VERTEX0 11) LINE_VERTEX1 12) LINE_VERTEX2 13) LINE_EDGE01 14) LINE_EDGE12 15) LINE_EDGE20 If there is a point intersection, the value of this intersection point is returned in rP1. If there is a line intersection, the first point of the line segment is returned in rP1 and the second point of the line segment is returned in rP2.
|
|
|
Compute the lower bounds of this triangle.
|
|
|
Compute the upper bounds of this triangle.
|
|
||||||||||||
|
Get a specified vertex of the triangle.
|
|
|
Get the index of a vertex.
|
|
|
Get the vertices for this triangle.
|
|
|
Set the vertices for this triangle.
|
|
|
Update the member data of this object based on its XML node. Member objects (children) are not updated. |
|
|
Update the XML node representing this object.
Reimplemented from rdObject. |
|
|
Update this object based on its XML node.
Reimplemented from rdObject. |
1.3