![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cTriangle3.h>
Public Types | |
typedef float | DVALUE_t |
Dimension value type. More... | |
Public Member Functions | |
cTriangle3f () noexcept | |
cTriangle3f (const cVector3f *p) | |
cTriangle3f (const cVector3f &a, const cVector3f &b, const cVector3f &c) noexcept | |
bool | operator== (const cTriangle3f &other) const noexcept |
bool | operator!= (const cTriangle3f &other) const noexcept |
bool | isDegenerate () const noexcept |
cPlanef | get_Plane () const |
cVector3f | get_Normal () const |
cVector3f | get_Center () const |
bool | isFrontFacing (const cVector3f &vLookDir) const |
bool | isPointInside (const cVector3f &p) const |
bool | isPointInsideFast (const cVector3f &p) const |
bool | isOnSameSide (const cVector3f &p1, const cVector3f &p2, const cVector3f &a, const cVector3f &b) const |
bool | getIntersectionOfPlaneWithLine (const cVector3f &linePoint, const cVector3f &lineVect, cVector3f &outIntersection) const |
bool | getIntersectionWithLine (const cVector3f &linePoint, const cVector3f &lineVect, cVector3f &outIntersection) const |
cVector3f | GetBaryCentric (DVALUE_t f, DVALUE_t g) const |
void | setTri (const cVector3f *p) |
void | setTri (const cVector3f &a, const cVector3f &b, const cVector3f &c) |
void | TransformCoords (const cMatrix4x4f &mMatrix) |
void | MultV (const cVector3f vMult) |
void | DivV (const cVector3f vMult) |
UNITTEST_FRIEND (cTriangle3) | |
Public Attributes | |
cVector3f | m_aPt [3] |
three verts/points of the triangle. DVALUE_t. More... | |
a triangle in 3d space. 3 float 3d points. assume this is a clockwise=front triangle for purposes of front/back/normal. DX is backward of this ?? Normal 3d meshes use vertex arrays and indexes for more efficiency.
typedef float GrayLib::cTriangle3f::DVALUE_t |
Dimension value type.
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
get center average point for the triangle.
|
inline |
assume this is a clockwise=front triangle for purposes of front/back/normal
|
inline |
|
inline |
Calculates the intersection between a 3d line and the plane the triangle is on.
|
inline |
an intersection with a 3d line segment.
|
inlinenoexcept |
Empty triangles are bad. Degenerate triangles.
|
inline |
Returns if the triangle is front of backfacing.
|
inline |
|
inline |
a point is inside the triangle?
|
inline |
a point is inside the triangle. This method is an implementation of the example used in a paper by Kasper Fauerby original written by Keidy from Mr-Gamemaker.
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
GrayLib::cTriangle3f::UNITTEST_FRIEND | ( | cTriangle3 | ) |
cVector3f GrayLib::cTriangle3f::m_aPt[3] |
three verts/points of the triangle. DVALUE_t.