29#ifndef GU_DISTANCE_POINT_SEGMENT_H
30#define GU_DISTANCE_POINT_SEGMENT_H
32#include "common/PxPhysXCommonConfig.h"
40 PX_FORCE_INLINE PxReal distancePointSegmentSquaredInternal(
const PxVec3& p0,
const PxVec3& dir,
const PxVec3& point, PxReal* param=NULL)
42 PxVec3 diff = point - p0;
43 PxReal fT = diff.dot(dir);
51 const PxReal sqrLen = dir.magnitudeSquared();
67 return diff.magnitudeSquared();
77 return distancePointSegmentSquaredInternal(p0, p1 - p0, point, param);
Represents a line segment.
Definition GuSegment.h:49
3 Element vector class.
Definition PxVec3.h:50
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_INLINE
Definition PxPreprocessor.h:320
PX_FORCE_INLINE PxReal distancePointSegmentSquared(const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &point, PxReal *param=NULL)
Definition GuDistancePointSegment.h:75
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39