29#ifndef GU_INTERSECTION_RAY_PLANE_H
30#define GU_INTERSECTION_RAY_PLANE_H
32#include "foundation/PxPlane.h"
39 PX_INLINE bool intersectRayPlane(
const PxVec3& orig,
const PxVec3& dir,
const PxPlane& plane,
float& distanceAlongLine, PxVec3* pointOnPlane = NULL)
41 const float dn = dir.dot(plane.n);
42 if(-1E-7f < dn && dn < 1E-7f)
45 distanceAlongLine = -plane.distance(orig)/dn;
48 *pointOnPlane = orig + distanceAlongLine * dir;
#define PX_INLINE
Definition PxPreprocessor.h:320
GLM_FUNC_DECL bool intersectRayPlane(genType const &orig, genType const &dir, genType const &planeOrig, genType const &planeNormal, typename genType::value_type &intersectionDistance)
Definition intersect.inl:7
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39