#include <LSMTriangle3.h>
List of all members.
Public Member Functions |
LSE_INLINE LSE_CALLCTOR | CTriangle3 (const CTriangle3 &_tTri) |
LSE_INLINE LSE_CALLCTOR | CTriangle3 (const CVector3 &_vA, const CVector3 &_vB, const CVector3 &_vC) |
LSE_INLINE CVector3 &LSE_FCALL | operator[] (LSUINT32 _ui32I) |
LSE_INLINE const CVector3
&LSE_FCALL | operator[] (LSUINT32 _ui32I) const |
LSE_INLINE bool LSE_FCALL | operator== (const CTriangle3 &_tTri) const |
LSE_INLINE bool LSE_FCALL | operator!= (const CTriangle3 &_tTri) const |
LSE_INLINE LSVOID LSE_FCALL | ReverseOrder () |
LSE_INLINE const CVector3
&LSE_FCALL | A () const |
LSE_INLINE const CVector3
&LSE_FCALL | B () const |
LSE_INLINE const CVector3
&LSE_FCALL | C () const |
LSVOID LSE_FCALL | Barycentric (const CVector3 &_vPoint, LSREAL &_fU, LSREAL &_fV, LSREAL &_fW) const |
CVector3 LSE_FCALL | ClosestPointToPoint (const CVector3 &_vPoint) const |
LSREAL LSE_FCALL | GetSqDistFromPoint (const CVector3 &_vPoint) const |
LSBOOL LSE_FCALL | PointIsInTriangle (const CVector3 &_vPoint) const |
Public Attributes |
CVector3 | a |
CVector3 | b |
CVector3 | c |
Static Protected Member Functions |
static LSE_INLINE LSREAL LSE_FCALL | TriArea2D (LSREAL _fX1, LSREAL _fY1, LSREAL _fX2, LSREAL _fY2, LSREAL _fX3, LSREAL _fY3) |
Detailed Description
Class CTriangle3
Description: A 3D triangle.
Member Function Documentation
LSE_INLINE const CVector3 &LSE_FCALL lsm::CTriangle3::A |
( |
| ) |
const |
Get the first vertex of the triangle.
- Returns:
- Returns the first vertex in the triangle.
LSE_INLINE const CVector3 &LSE_FCALL lsm::CTriangle3::B |
( |
| ) |
const |
Get the second vertex of the triangle.
- Returns:
- Returns the second vertex in the triangle.
LSVOID LSE_FCALL lsm::CTriangle3::Barycentric |
( |
const CVector3 & |
_vPoint, |
|
|
LSREAL & |
_fU, |
|
|
LSREAL & |
_fV, |
|
|
LSREAL & |
_fW |
|
) |
| const |
Get the barycentric coordinates of a given point.
- Parameters:
-
_vPoint | The point on the plan of the triangle at which to get the barycentric coordinate. |
_fU | The returned U weight. |
_fV | The returned V weight. |
_fW | The returned W weight. |
LSE_INLINE const CVector3 &LSE_FCALL lsm::CTriangle3::C |
( |
| ) |
const |
Get the third vertex of the triangle.
- Returns:
- Returns the third vertex in the triangle.
CVector3 LSE_FCALL lsm::CTriangle3::ClosestPointToPoint |
( |
const CVector3 & |
_vPoint | ) |
const |
Get the closest point on this triangle to a given point.
- Parameters:
-
_vPoint | The point from which the closest point on this bounding box is to be calculated. |
- Returns:
- Returns the closest point on this box from the given point.
LSREAL LSE_FCALL lsm::CTriangle3::GetSqDistFromPoint |
( |
const CVector3 & |
_vPoint | ) |
const |
Get the distance from the given point to this triangle.
- Parameters:
-
_vPoint | The point from which the distance to this triangle is to be calculated. |
- Returns:
- Returns the squared distance from the closest point on this triangle to the given point.
LSE_INLINE bool LSE_FCALL lsm::CTriangle3::operator!= |
( |
const CTriangle3 & |
_tTri | ) |
const |
Inequality.
- Parameters:
-
_tTri | Object to test for inequality. |
- Returns:
- Returns true if the objects are not equal.
LSE_INLINE bool LSE_FCALL lsm::CTriangle3::operator== |
( |
const CTriangle3 & |
_tTri | ) |
const |
Equality.
- Parameters:
-
_tTri | Object to test for equality. |
- Returns:
- Returns true if the objects are equal.
LSE_INLINE const CVector3 &LSE_FCALL lsm::CTriangle3::operator[] |
( |
LSUINT32 |
_ui32I | ) |
const |
Give array access.
- Parameters:
-
_ui32I | The index of the vertex to retrieve. |
- Returns:
- Returns the vertex at the given index, which must be valid.
LSE_INLINE CVector3 &LSE_FCALL lsm::CTriangle3::operator[] |
( |
LSUINT32 |
_ui32I | ) |
|
Give array access.
- Parameters:
-
_ui32I | The index of the vertex to retrieve. |
- Returns:
- Returns the vertex at the given index, which must be valid.
LSBOOL LSE_FCALL lsm::CTriangle3::PointIsInTriangle |
( |
const CVector3 & |
_vPoint | ) |
const |
Determine if a point is inside the triangle or not.
- Parameters:
-
_vPoint | Point to test for being contained by this triangle. |
- Returns:
- Returns true if the point is inside this triangle.
LSE_INLINE LSVOID LSE_FCALL lsm::CTriangle3::ReverseOrder |
( |
| ) |
|
Reverse the order of the triangle.
LSE_INLINE LSREAL LSE_FCALL lsm::CTriangle3::TriArea2D |
( |
LSREAL |
_fX1, |
|
|
LSREAL |
_fY1, |
|
|
LSREAL |
_fX2, |
|
|
LSREAL |
_fY2, |
|
|
LSREAL |
_fX3, |
|
|
LSREAL |
_fY3 |
|
) |
| [static, protected] |
Get the area of a given 2D triangle. Used for the Barycentric() equation.
- Parameters:
-
_fX1 | X of the first triangle. |
_fY1 | Y of the first triangle. |
_fX2 | X of the second triangle. |
_fY2 | Y of the second triangle. |
_fX3 | X of the third triangle. |
_fY3 | Y of the third triangle. |
- Returns:
- Returns the area of the given 2D triangle.
The documentation for this class was generated from the following file: