triangle3d Class Template Reference

#include <triangle3d.h>

template<class T>
class irr::core::triangle3d< T >

Public Member Functions

Data Fields


Member Function Documentation

core::vector3df closestPointOnTriangle ( const core::vector3df p  )  const [inline]

Returns the closest point on a triangle to a point on the same plane.

Parameters:
p,: Point which must be on the same plane as the triangle.

bool getIntersectionOfPlaneWithLine ( const vector3d< T > &  linePoint,
const vector3d< T > &  lineVect,
vector3d< T > &  outIntersection 
) const [inline]

Calculates the intersection between a 3d line and the plane the triangle is on.

Parameters:
linePoint,: Point of the line to intersect with.
lineVect,: Vector of the line to intersect with.
outIntersection,: Place to store the intersection point, if there is one.
Returns:
Returns true if there was an intersection, false if there was not.

bool getIntersectionWithLimitedLine ( const line3d< T > &  line,
vector3d< T > &  outIntersection 
) const [inline]

Returns an intersection with a 3d line.

Parameters:
line,: Line to intersect with.
outIntersection,: Place to store the intersection point, if there is one.
Returns:
Returns true if there was an intersection, false if there was not.

bool getIntersectionWithLine ( const vector3d< T > &  linePoint,
const vector3d< T > &  lineVect,
vector3d< T > &  outIntersection 
) const [inline]

Returns an intersection with a 3d line. Please note that also points are returned as intersection, which are on the line, but not between the start and end point of the line. If you want the returned point be between start and end, please use getIntersectionWithLimitedLine().

Parameters:
linePoint,: Point of the line to intersect with.
lineVect,: Vector of the line to intersect with.
outIntersection,: Place to store the intersection point, if there is one.
Returns:
Returns true if there was an intersection, false if there was not.

vector3d<T> getNormal (  )  const [inline]

Returns the normal of the triangle. Please note: The normal is not normalized.

plane3d<T> getPlane (  )  const [inline]

bool isFrontFacing ( const vector3d< T > &  lookDirection  )  const [inline]

Returns if the triangle is front of backfacing.

Parameters:
lookDirection,: Look direction.
Returns:
Returns true if the plane is front facing, which mean it would be visible, and false if it is backfacing.

bool isOnSameSide ( const vector3d< T > &  p1,
const vector3d< T > &  p2,
const vector3d< T > &  a,
const vector3d< T > &  b 
) const [inline]

bool isPointInside ( const vector3d< T > &  p  )  const [inline]

Returns if a point is inside the triangle

Parameters:
p,: Point to test. Assumes that this point is already on the plane of the triangle.
Returns:
Returns true if the point is inside the triangle, otherwise false.

bool isPointInsideFast ( const vector3d< T > &  p  )  const [inline]

Returns if 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.

Parameters:
p,: Point to test. Assumes that this point is already on the plane of the triangle.
Returns:
Returns true if the point is inside the triangle, otherwise false.

bool isTotalInsideBox ( const aabbox3d< f32 > &  box  )  const [inline]

Determinates if the triangle is totally inside a bounding box.

Parameters:
box,: Box to check.
Returns:
Returns true if the triangle is withing the box, and false if it is not.

bool operator!= ( const triangle3d< T > &  other  )  const [inline]

bool operator== ( const triangle3d< T > &  other  )  const [inline]

void set ( const core::vector3d< T > &  a,
const core::vector3d< T > &  b,
const core::vector3d< T > &  c 
) [inline]


Field Documentation

vector3d<T> pointA

vector3d<T> pointB

vector3d<T> pointC


Generated on Fri Apr 27 14:47:02 2007 for IrrSpintz by  doxygen 1.5.1-p1