35#include "foundation/PxVec3.h"
90 return (
p0==other.
p0 &&
p1==other.
p1);
96 return (
p0!=other.
p0 ||
p1!=other.
p1);
119 return (
p0 +
p1)*0.5f;
127 PX_INLINE PxF32 computeSquareLength()
const
129 return (
p1-
p0).magnitudeSquared();
136 return ((
p1 -
p0).magnitudeSquared());
143 return ((
p1 -
p0).magnitude());
Represents a line segment.
Definition GuSegment.h:49
PxVec3 p0
Start of segment.
Definition GuSegment.h:170
PX_INLINE PxVec3 computeDirection() const
Return the vector from point0 to point1.
Definition GuSegment.h:105
PX_INLINE bool operator!=(const Segment &other) const
Inequality operator.
Definition GuSegment.h:94
PX_INLINE PxReal lengthSquared() const
Return the square of the length of vector from point0 to point1.
Definition GuSegment.h:134
PX_INLINE bool operator==(const Segment &other) const
Equality operator.
Definition GuSegment.h:88
PX_INLINE void computePoint(PxVec3 &pt, PxF32 t) const
Computes a point on the segment.
Definition GuSegment.h:158
PX_INLINE ~Segment()
Destructor.
Definition GuSegment.h:75
PxVec3 p1
End of segment.
Definition GuSegment.h:171
PX_INLINE Segment & operator=(const Segment &other)
Assignment operator.
Definition GuSegment.h:80
PX_INLINE Segment()
Constructor.
Definition GuSegment.h:54
PX_INLINE Segment(const Segment &seg)
Copy constructor.
Definition GuSegment.h:68
PX_INLINE PxVec3 getPointAt(PxReal t) const
Return the point at parameter t along the line: point0 + t*(point1-point0)
Definition GuSegment.h:165
PX_INLINE Segment(const PxVec3 &_p0, const PxVec3 &_p1)
Constructor.
Definition GuSegment.h:61
PX_INLINE PxReal length() const
Return the length of vector from point0 to point1.
Definition GuSegment.h:141
PX_INLINE PxVec3 computeCenter() const
Return the center of the segment segment.
Definition GuSegment.h:117
PX_INLINE void computeDirection(PxVec3 &dir) const
Return the vector from point0 to point1.
Definition GuSegment.h:111
3 Element vector class.
Definition PxVec3.h:50
PX_CUDA_CALLABLE PX_FORCE_INLINE float magnitude() const
returns the magnitude
Definition PxVec3.h:183
#define PX_COMPILE_TIME_ASSERT(exp)
Definition PxPreprocessor.h:428
#define PX_INLINE
Definition PxPreprocessor.h:320
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39