Public Member Functions | |
CollisionPolygon (Point3 const begin, Point3 const end) | |
CollisionPolygon (VBase3 const a, VBase3 const b, VBase3 const c) | |
CollisionPolygon (VBase3 const a, VBase3 const b, VBase3 const c, VBase3 const d) | |
int | getNumPoints () |
Returns the number of vertices of the CollisionPolygon. | |
Point3 | getPoint (int n) |
Returns the nth vertex of the CollisionPolygon, expressed in 3-D space. | |
list | getPoints () |
bool | isConcave () |
Returns true if the CollisionPolygon appears to be concave, or false if it is safely convex. | |
bool | isValid () |
Returns true if the CollisionPolygon is valid (that is, it has at least three vertices), or false otherwise. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
static bool | verifyPoints (Point3 const begin, Point3 const end) |
Verifies that the indicated set of points will define a valid CollisionPolygon: that is, at least three non-collinear points, with no points repeated. | |
static bool | verifyPoints (Point3 const a, Point3 const b, Point3 const c) |
Verifies that the indicated set of points will define a valid CollisionPolygon: that is, at least three non-collinear points, with no points repeated. | |
static bool | verifyPoints (Point3 const a, Point3 const b, Point3 const c, Point3 const d) |
Verifies that the indicated set of points will define a valid CollisionPolygon: that is, at least three non-collinear points, with no points repeated. |
CollisionPolygon | ( | Point3 const | begin, |
Point3 const | end | ||
) |
CollisionPolygon | ( | VBase3 const | a, |
VBase3 const | b, | ||
VBase3 const | c | ||
) |
CollisionPolygon | ( | VBase3 const | a, |
VBase3 const | b, | ||
VBase3 const | c, | ||
VBase3 const | d | ||
) |
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from CollisionPlane.
int getNumPoints | ( | ) |
Returns the number of vertices of the CollisionPolygon.
Returns the nth vertex of the CollisionPolygon, expressed in 3-D space.
list getPoints | ( | ) |
bool isConcave | ( | ) |
Returns true if the CollisionPolygon appears to be concave, or false if it is safely convex.
bool isValid | ( | ) |
Returns true if the CollisionPolygon is valid (that is, it has at least three vertices), or false otherwise.
static bool verifyPoints | ( | Point3 const | begin, |
Point3 const | end | ||
) | [static] |
Verifies that the indicated set of points will define a valid CollisionPolygon: that is, at least three non-collinear points, with no points repeated.
This does not check that the polygon defined is convex; that check is made later, once we have projected the points to 2-d space where the decision is easier.
static bool verifyPoints | ( | Point3 const | a, |
Point3 const | b, | ||
Point3 const | c | ||
) | [static] |
Verifies that the indicated set of points will define a valid CollisionPolygon: that is, at least three non-collinear points, with no points repeated.
static bool verifyPoints | ( | Point3 const | a, |
Point3 const | b, | ||
Point3 const | c, | ||
Point3 const | d | ||
) | [static] |
Verifies that the indicated set of points will define a valid CollisionPolygon: that is, at least three non-collinear points, with no points repeated.