PixelLightAPI  .
Static Public Member Functions
PLMath::Intersect Class Reference

Static class with some useful intersection tools. More...

#include <Intersect.h>

List of all members.

Static Public Member Functions

static PLMATH_API bool SpherePoint (const Sphere &cSphere, const Vector3 &cPoint)
 Check whether there's a sphere/point intersection.
static PLMATH_API bool SpherePoint (const Sphere &cSphere, const Vector4 &cPoint)
static PLMATH_API float SphereRay (const Sphere &cSphere, const Vector3 &vRayOrigin, const Vector3 &vRayDir)
 Check whether there's a sphere/ray intersection.
static PLMATH_API bool SphereRay (const Sphere &cSphere, const Vector3 &vRayOrigin, const Vector3 &vRayDirection, Vector3 *pvIntersect=nullptr)
 Check whether there's a sphere/ray intersection.
static PLMATH_API bool SphereRay (const Sphere &cSphere, const Vector3 &vRayOrigin, const Vector3 &vRayDirection, float fDistance, Vector3 *pvIntersect=nullptr)
 Check whether there's a sphere/ray intersection.
static PLMATH_API bool SphereRayInFront (const Sphere &cSphere, const Vector3 &vRayOrigin, const Vector3 &vRayDirection, Vector3 *pvIntersect=nullptr)
 Check whether there's a sphere/ray intersection.
static PLMATH_API bool SphereLine (const Sphere &cSphere, const Vector3 &vStart, const Vector3 &vEnd)
 Check whether there's a sphere/line intersection.
static PLMATH_API bool SphereSphere (const Sphere &cSphere, const Vector3 &vPos, float fRadius)
 Check whether there's a sphere/sphere intersection.
static PLMATH_API bool SphereSphere (const Sphere &cSphere, const Sphere &cSphere2)
 Check whether there's a sphere/sphere intersection.
static PLMATH_API bool SphereSphere (const Sphere &cSphere, const Sphere &cSphere2, const Vector3 &vMove1, const Vector3 &vMove2)
 Check whether a sphere intersects with this sphere while moving.
static PLMATH_API bool SphereAABox (const Vector3 &vSpherePos, float fSphereRadius, const AABoundingBox &cAABox)
 Check whether there's a sphere/axis aligned box intersection.
static PLMATH_API bool SphereAABox (const Sphere &cSphere, const AABoundingBox &cAABox)
 Check whether there's a sphere/axis aligned box intersection.
static PLMATH_API bool SphereBox (const Vector3 &vSpherePos, float fSphereRadius, const BoundingBox &cBox)
 Check whether there's a sphere/box intersection.
static PLMATH_API bool SphereBox (const Sphere &cSphere, const BoundingBox &cBox)
 Check whether there's a sphere/box intersection.
static PLMATH_API bool AABoxPoint (const Vector3 &vAABoxMin, const Vector3 &vAABoxMax, const Vector3 &vPos)
 Check whether a point is inside the axis aligned box.
static PLMATH_API bool AABoxLine (const Vector3 &vAABoxMin, const Vector3 &vAABoxMax, const Vector3 &vStart, const Vector3 &vEnd, float *pfIntersection=nullptr)
 Check whether there's a axis aligned box/line intersection.
static PLMATH_API bool AABoxLine (const Vector3 &vAABoxMin, const Vector3 &vAABoxMax, const Line &cLine, float *pfIntersection=nullptr)
 Check whether there's a axis aligned box/line intersection.
static PLMATH_API bool AABoxSphere (const Vector3 &vAABoxMin, const Vector3 &vAABoxMax, const Vector3 &vSpherePos, float fSphereRadius)
 Check whether there's a axis aligned box/sphere intersection.
static PLMATH_API bool AABoxAABox (const Vector3 &vAABoxMin1, const Vector3 &vAABoxMax1, const Vector3 &vAABoxMin2, const Vector3 &vAABoxMax2)
 Check whether there's a axis aligned box/axis aligned box intersection.
static PLMATH_API bool AABoxAABox (const AABoundingBox &cBox1, const AABoundingBox &cBox2)
 Check whether there's a axis aligned box/axis aligned box intersection.
static PLMATH_API bool BoxPoint (const BoundingBox &cBox, const Vector3 &vPos)
 Check whether a point is inside the box.
static PLMATH_API bool BoxLine (const BoundingBox &cBox, const Vector3 &vA, const Vector3 &vB)
 Check whether a line intersects with the box.
static PLMATH_API bool BoxBox (const BoundingBox &cBox1, const BoundingBox &cBox2)
 Check whether another box intersects with this box.
static PLMATH_API bool BoxBox (const BoundingBox &cBox1, const BoundingBox &cBox2, const Vector3 &vMove1, const Vector3 &vMove2)
 Check whether another box intersects with this box while moving.
static PLMATH_API bool BoxPlaneSet (const BoundingBox &cBox, const PlaneSet &cPlaneSet)
 Check whether the box is in the plane set or not.
static PLMATH_API bool IsPlaneRay (const Plane &cPlane, const Vector3 &vRayDir)
 Checks if there's a plane/ray intersection.
static PLMATH_API Vector3 PlaneRay (const Plane &cPlane, const Vector3 &vRayPos, const Vector3 &vRayDir)
 Returns the plane/ray intersection point.
static PLMATH_API float PlaneLine (const Plane &cPlane, const Vector3 &vStartPos, const Vector3 &vEndPos, Vector3 *pvPos=nullptr)
 Checks if there's a plane/line intersection.
static PLMATH_API bool PlanePlane (const Plane &cPlane, const Plane &cPlane2)
 Checks if there's a plane/plane intersection.
static PLMATH_API bool PlanePlane (const Plane &cPlane, const Plane &cPlane2, Ray &cRay)
 Checks if there's a plane/plane intersection and calculates the intersection ray.
static PLMATH_API bool PlanePlanePlane (const Plane &cP1, const Plane &cP2, const Plane &cP3, Vector3 &vRes)
 Checks if there's an intersection between the three planes and returns the intersection point.
static PLMATH_API bool PlaneSetPoint (const PlaneSet &cPlaneSet, const Vector3 &vPoint)
 Test whether a point is in the plane set.
static PLMATH_API bool PlaneSetPoint (const PlaneSet &cPlaneSet, const Vector4 &vPoint)
 Test whether a point is in the plane set.
static PLMATH_API bool PlaneSetPoints (const PlaneSet &cPlaneSet, const PLCore::Array< Vector3 > &lstPoints)
 Test whether the given points are in the plane set.
static PLMATH_API bool PlaneSetPoints (const PlaneSet &cPlaneSet, const PLCore::Array< Vector4 > &lstPoints)
 Test whether the given points are in the plane set.
static PLMATH_API bool PlaneSetSphere (const PlaneSet &cPlaneSet, const Vector3 &vSphereOrigin, float fSphereRadius)
 Test whether a sphere is in the plane set.
static PLMATH_API bool PlaneSetTriangle (const PlaneSet &cPlaneSet, const Vector3 &vV1, const Vector3 &vV2, const Vector3 &vV3)
 Test whether a triangle is in the plane set.
static PLMATH_API bool PlaneSetAABox (const PlaneSet &cPlaneSet, const Vector3 &vMin, const Vector3 &vMax, PLCore::uint32 *pnOutClipMask=nullptr)
 Tests whether an axis aligned box is within the plane set or not.
static PLMATH_API bool TriangleRay (const Vector3 &vV1, const Vector3 &vV2, const Vector3 &vV3, const Vector3 &vN, const Vector3 &vRayOrigin, const Vector3 &vRayDirection, Vector3 *pvIntersectionPointPos=nullptr)
 Checks if there's a triangle/ray intersection.
static PLMATH_API bool TriangleRay (const Vector3 &vV1, const Vector3 &vV2, const Vector3 &vV3, const Vector3 &vN, const Ray &cRay, Vector3 *pvIntersectionPointPos=nullptr)
 Checks if there's a triangle/ray intersection.

Detailed Description

Static class with some useful intersection tools.


Member Function Documentation

static PLMATH_API bool PLMath::Intersect::SpherePoint ( const Sphere cSphere,
const Vector3 cPoint 
) [static]

Check whether there's a sphere/point intersection.

Parameters:
[in]cSphereSphere to check
[in]cPointPoint to check
Returns:
'true' if there's a sphere/axis aligned box intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SpherePoint ( const Sphere cSphere,
const Vector4 cPoint 
) [static]
static PLMATH_API float PLMath::Intersect::SphereRay ( const Sphere cSphere,
const Vector3 vRayOrigin,
const Vector3 vRayDir 
) [static]

Check whether there's a sphere/ray intersection.

Parameters:
[in]cSphereSphere to check
[in]vRayOriginRay origin
[in]vRayDirRay direction vector
Returns:
Distance to intersection point, -1.0 it there was no intersection
static PLMATH_API bool PLMath::Intersect::SphereRay ( const Sphere cSphere,
const Vector3 vRayOrigin,
const Vector3 vRayDirection,
Vector3 pvIntersect = nullptr 
) [static]

Check whether there's a sphere/ray intersection.

Parameters:
[in]cSphereSphere to check
[in]vRayOriginRay origin
[in]vRayDirectionRay direction vector
[out]pvIntersectIf not a null pointer, will receive the intersection point (if there's one)
Returns:
'true' if there's a sphere/ray intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SphereRay ( const Sphere cSphere,
const Vector3 vRayOrigin,
const Vector3 vRayDirection,
float  fDistance,
Vector3 pvIntersect = nullptr 
) [static]

Check whether there's a sphere/ray intersection.

Parameters:
[in]cSphereSphere to check
[in]vRayOriginRay origin
[in]vRayDirectionRay direction vector
[in]fDistanceRay 'length'
[out]pvIntersectIf not a null pointer, will receive the intersection point (if there's one)
Returns:
'true' if there's a sphere/ray intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SphereRayInFront ( const Sphere cSphere,
const Vector3 vRayOrigin,
const Vector3 vRayDirection,
Vector3 pvIntersect = nullptr 
) [static]

Check whether there's a sphere/ray intersection.

Parameters:
[in]cSphereSphere to check
[in]vRayOriginRay origin
[in]vRayDirectionRay direction vector
[out]pvIntersectIf not a null pointer, will receive the intersection point (if there's one)
Returns:
'true' if there's a sphere/ray intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SphereLine ( const Sphere cSphere,
const Vector3 vStart,
const Vector3 vEnd 
) [static]

Check whether there's a sphere/line intersection.

Parameters:
[in]cSphereSphere to check
[in]vStartLine start point
[in]vEndLine end point
Returns:
'true' if there's a sphere/line intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SphereSphere ( const Sphere cSphere,
const Vector3 vPos,
float  fRadius 
) [static]

Check whether there's a sphere/sphere intersection.

Parameters:
[in]cSphereSphere to check
[in]vPosSecond sphere position
[in]fRadiusSecond sphere radius
Returns:
'true' if there's a sphere/sphere intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SphereSphere ( const Sphere cSphere,
const Sphere cSphere2 
) [static]

Check whether there's a sphere/sphere intersection.

Parameters:
[in]cSphereSphere to check
[in]cSphere2Second sphere to check
Returns:
'true' if there's a sphere/sphere intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SphereSphere ( const Sphere cSphere,
const Sphere cSphere2,
const Vector3 vMove1,
const Vector3 vMove2 
) [static]

Check whether a sphere intersects with this sphere while moving.

Parameters:
[in]cSphereSphere to check
[in]cSphere2Second sphere to test
[in]vMove1Movement vector of this sphere
[in]vMove2Movement vector of the other sphere box
Returns:
'true' if there's an intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SphereAABox ( const Vector3 vSpherePos,
float  fSphereRadius,
const AABoundingBox cAABox 
) [static]

Check whether there's a sphere/axis aligned box intersection.

Parameters:
[in]vSpherePosPosition of the sphere to check
[in]fSphereRadiusRadius of the sphere to check
[in]cAABoxAxis aligned box to check
Returns:
'true' if there's a sphere/axis aligned box intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SphereAABox ( const Sphere cSphere,
const AABoundingBox cAABox 
) [static]

Check whether there's a sphere/axis aligned box intersection.

Parameters:
[in]cSphereSphere to check
[in]cAABoxAxis aligned box to check
Returns:
'true' if there's a sphere/axis aligned box intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SphereBox ( const Vector3 vSpherePos,
float  fSphereRadius,
const BoundingBox cBox 
) [static]

Check whether there's a sphere/box intersection.

Parameters:
[in]vSpherePosPosition of the sphere to check
[in]fSphereRadiusRadius of the sphere to check
[in]cBoxBox to check
Returns:
'true' if there's a sphere/box intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::SphereBox ( const Sphere cSphere,
const BoundingBox cBox 
) [static]

Check whether there's a sphere/box intersection.

Parameters:
[in]cSphereSphere to check
[in]cBoxBox to check
Returns:
'true' if there's a sphere/box intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::AABoxPoint ( const Vector3 vAABoxMin,
const Vector3 vAABoxMax,
const Vector3 vPos 
) [static]

Check whether a point is inside the axis aligned box.

Parameters:
[in]vAABoxMinAxis aligned box minimum position
[in]vAABoxMaxAxis aligned box box maximum position
[in]vPosPoint to test
Returns:
'true' if the given point is inside the axis aligned box, else 'false'
static PLMATH_API bool PLMath::Intersect::AABoxLine ( const Vector3 vAABoxMin,
const Vector3 vAABoxMax,
const Vector3 vStart,
const Vector3 vEnd,
float *  pfIntersection = nullptr 
) [static]

Check whether there's a axis aligned box/line intersection.

Parameters:
[in]vAABoxMinAxis aligned box minimum position
[in]vAABoxMaxAxis aligned box box maximum position
[in]vStartLine start point
[in]vEndLine end point
[out]pfIntersectionReceives the intersection distance if not null, <0 if there's no intersection or when the start point is inside the axis aligned box or when the distance is just negative
Returns:
'true' if there's a axis aligned box/line intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::AABoxLine ( const Vector3 vAABoxMin,
const Vector3 vAABoxMax,
const Line cLine,
float *  pfIntersection = nullptr 
) [static]

Check whether there's a axis aligned box/line intersection.

Parameters:
[in]vAABoxMinAxis aligned box minimum position
[in]vAABoxMaxAxis aligned box box maximum position
[in]cLineLine to check
[out]pfIntersectionReceives the intersection distance if not null, <0 if there's no intersection or when the start point is inside the axis aligned box or when the distance is just negative
Returns:
'true' if there's a axis aligned box/line intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::AABoxSphere ( const Vector3 vAABoxMin,
const Vector3 vAABoxMax,
const Vector3 vSpherePos,
float  fSphereRadius 
) [static]

Check whether there's a axis aligned box/sphere intersection.

Parameters:
[in]vAABoxMinAxis aligned box minimum position
[in]vAABoxMaxAxis aligned box box maximum position
[in]vSpherePosPosition of the sphere to check
[in]fSphereRadiusRadius of the sphere to check
Returns:
'true' if there's a sphere/axis aligned box intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::AABoxAABox ( const Vector3 vAABoxMin1,
const Vector3 vAABoxMax1,
const Vector3 vAABoxMin2,
const Vector3 vAABoxMax2 
) [static]

Check whether there's a axis aligned box/axis aligned box intersection.

Parameters:
[in]vAABoxMin1Axis aligned box minimum position 1
[in]vAABoxMax1Axis aligned box box maximum position 1
[in]vAABoxMin2Axis aligned box minimum position 2
[in]vAABoxMax2Axis aligned box box maximum position 2
Returns:
'true' if there's a axis aligned box/axis aligned box intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::AABoxAABox ( const AABoundingBox cBox1,
const AABoundingBox cBox2 
) [static]

Check whether there's a axis aligned box/axis aligned box intersection.

Parameters:
[in]cBox1Axis aligned box 1
[in]cBox2Axis aligned box 2
Returns:
'true' if there's a axis aligned box/axis aligned box intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::BoxPoint ( const BoundingBox cBox,
const Vector3 vPos 
) [static]

Check whether a point is inside the box.

Parameters:
[in]cBoxBox to check
[in]vPosPoint to test
Returns:
'true' if the given point is inside the box, else 'false'
static PLMATH_API bool PLMath::Intersect::BoxLine ( const BoundingBox cBox,
const Vector3 vA,
const Vector3 vB 
) [static]

Check whether a line intersects with the box.

Parameters:
[in]cBoxBox to check
[in]vALine start position
[in]vBLine end position
Returns:
'true' if the given line intersects with the box, else 'false'
static PLMATH_API bool PLMath::Intersect::BoxBox ( const BoundingBox cBox1,
const BoundingBox cBox2 
) [static]

Check whether another box intersects with this box.

Parameters:
[in]cBox1First box to check
[in]cBox2Second box to test
Returns:
'true' if the given box intersects with this box, else 'false'
static PLMATH_API bool PLMath::Intersect::BoxBox ( const BoundingBox cBox1,
const BoundingBox cBox2,
const Vector3 vMove1,
const Vector3 vMove2 
) [static]

Check whether another box intersects with this box while moving.

Parameters:
[in]cBox1First box to check
[in]cBox2Second box to test
[in]vMove1Movement vector of first box
[in]vMove2Movement vector of second box
Returns:
'true' if the given box intersects with this box while moving, else 'false'
static PLMATH_API bool PLMath::Intersect::BoxPlaneSet ( const BoundingBox cBox,
const PlaneSet cPlaneSet 
) [static]

Check whether the box is in the plane set or not.

Parameters:
[in]cBoxBox to check
[in]cPlaneSetPlane set to check
Returns:
'true' if the box is in the plane set, else 'false'
static PLMATH_API bool PLMath::Intersect::IsPlaneRay ( const Plane cPlane,
const Vector3 vRayDir 
) [static]

Checks if there's a plane/ray intersection.

Parameters:
[in]cPlanePlane to check
[in]vRayDirRay direction (must be normalized)
Returns:
'true' if the ray intersects the plane, else 'false' (ray is parallel to plane)
static PLMATH_API Vector3 PLMath::Intersect::PlaneRay ( const Plane cPlane,
const Vector3 vRayPos,
const Vector3 vRayDir 
) [static]

Returns the plane/ray intersection point.

Parameters:
[in]cPlanePlane to check
[in]vRayPosRay position
[in]vRayDirRay direction (must be normalized)
Returns:
The intersection point, if there was no intersection the ray position will be returned
static PLMATH_API float PLMath::Intersect::PlaneLine ( const Plane cPlane,
const Vector3 vStartPos,
const Vector3 vEndPos,
Vector3 pvPos = nullptr 
) [static]

Checks if there's a plane/line intersection.

Parameters:
[in]cPlanePlane to check
[in]vStartPosLine start position
[in]vEndPosLine end direction
[out]pvPosIf not a null pointer this will receive the intersection point (if there is any :)
Returns:
Factor between 0-1 if there was an intersection, -1.0f if no intersection
static PLMATH_API bool PLMath::Intersect::PlanePlane ( const Plane cPlane,
const Plane cPlane2 
) [static]

Checks if there's a plane/plane intersection.

Parameters:
[in]cPlanePlane to check
[in]cPlane2Plane2 to test with
Returns:
'true' if the plane intersects the plane, else 'false'
static PLMATH_API bool PLMath::Intersect::PlanePlane ( const Plane cPlane,
const Plane cPlane2,
Ray cRay 
) [static]

Checks if there's a plane/plane intersection and calculates the intersection ray.

Parameters:
[in]cPlanePlane to check
[in]cPlane2Second plane
[out]cRayReceives the intersection ray/line
Returns:
'true' if theres a plane intersection, else 'false'
static PLMATH_API bool PLMath::Intersect::PlanePlanePlane ( const Plane cP1,
const Plane cP2,
const Plane cP3,
Vector3 vRes 
) [static]

Checks if there's an intersection between the three planes and returns the intersection point.

Parameters:
[in]cP1Plane to check
[in]cP2Plane to intersect with
[in]cP3Plane to intersect with
[out]vResReceives the intersection point
Returns:
'true' if there's an intersection between the three planes, else 'false'
static PLMATH_API bool PLMath::Intersect::PlaneSetPoint ( const PlaneSet cPlaneSet,
const Vector3 vPoint 
) [static]

Test whether a point is in the plane set.

Parameters:
[in]cPlaneSetPlane set to check
[in]vPointPosition of the point
Returns:
'true' if the point is in plane set, else 'false'
static PLMATH_API bool PLMath::Intersect::PlaneSetPoint ( const PlaneSet cPlaneSet,
const Vector4 vPoint 
) [static]

Test whether a point is in the plane set.

Parameters:
[in]cPlaneSetPlane set to check
[in]vPointPosition of the point
Returns:
'true' if the point is in plane set, else 'false'
static PLMATH_API bool PLMath::Intersect::PlaneSetPoints ( const PlaneSet cPlaneSet,
const PLCore::Array< Vector3 > &  lstPoints 
) [static]

Test whether the given points are in the plane set.

Parameters:
[in]cPlaneSetPlane set to check
[in]lstPointsArray of all points to test
Returns:
'true' if the points are in plane set, else 'false'
static PLMATH_API bool PLMath::Intersect::PlaneSetPoints ( const PlaneSet cPlaneSet,
const PLCore::Array< Vector4 > &  lstPoints 
) [static]

Test whether the given points are in the plane set.

Parameters:
[in]cPlaneSetPlane set to check
[in]lstPointsArray of all points to test
Returns:
'true' if the points are in plane set, else 'false'
static PLMATH_API bool PLMath::Intersect::PlaneSetSphere ( const PlaneSet cPlaneSet,
const Vector3 vSphereOrigin,
float  fSphereRadius 
) [static]

Test whether a sphere is in the plane set.

Parameters:
[in]cPlaneSetPlane set to check
[in]vSphereOriginMiddle of the sphere
[in]fSphereRadiusSphere radius
Returns:
'true' if the sphere is in plane set, else 'false'
static PLMATH_API bool PLMath::Intersect::PlaneSetTriangle ( const PlaneSet cPlaneSet,
const Vector3 vV1,
const Vector3 vV2,
const Vector3 vV3 
) [static]

Test whether a triangle is in the plane set.

Parameters:
[in]cPlaneSetPlane set to check
[in]vV1First triangle point
[in]vV2Second triangle point
[in]vV3Third triangle point
Returns:
'true' if the triangle is in plane set, else 'false'
static PLMATH_API bool PLMath::Intersect::PlaneSetAABox ( const PlaneSet cPlaneSet,
const Vector3 vMin,
const Vector3 vMax,
PLCore::uint32 *  pnOutClipMask = nullptr 
) [static]

Tests whether an axis aligned box is within the plane set or not.

Parameters:
[in]cPlaneSetPlane set to check
[in]vMinMinimum position
[in]vMaxMaximum position
[out]pnOutClipMaskIf not a null pointer, this clip mask will receive the intersection state of a maximum number of 32 planes if the box intersects the plane set. If this mask is 0, there was no plane intersection at all. (= complete inside/outside the plane set)
Returns:
'true' if the axis aligned box is within plane set, else 'false'
static PLMATH_API bool PLMath::Intersect::TriangleRay ( const Vector3 vV1,
const Vector3 vV2,
const Vector3 vV3,
const Vector3 vN,
const Vector3 vRayOrigin,
const Vector3 vRayDirection,
Vector3 pvIntersectionPointPos = nullptr 
) [static]

Checks if there's a triangle/ray intersection.

Parameters:
[in]vV1First triangle point
[in]vV2Second triangle point
[in]vV3Third triangle point
[in]vNTriangle plane normal
[in]vRayOriginRay origin
[in]vRayDirectionRay direction vector
[out]pvIntersectionPointPosIf not a null pointer, will receive the position of the intersection point
Returns:
'true' if the ray intersects the triangle, else 'false'
static PLMATH_API bool PLMath::Intersect::TriangleRay ( const Vector3 vV1,
const Vector3 vV2,
const Vector3 vV3,
const Vector3 vN,
const Ray cRay,
Vector3 pvIntersectionPointPos = nullptr 
) [static]

Checks if there's a triangle/ray intersection.

Parameters:
[in]vV1First triangle point
[in]vV2Second triangle point
[in]vV3Third triangle point
[in]vNTriangle plane normal
[in]cRayRay to check
[out]pvIntersectionPointPosIf not a null pointer, will receive the position of the intersection point
Returns:
'true' if the ray intersects the triangle, else 'false'

The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:20
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported