15 #include "physxCapsule.h" 16 #include "physxManager.h" 26 return _capsule.radius;
37 _capsule.radius = radius;
111 _capsule.computeDirection(nDir);
112 PhysxManager::update_point3_from_nxVec3(dir, nDir);
124 return _capsule.computeLength();
138 _capsule.computePoint(nP, t);
139 PhysxManager::update_point3_from_nxVec3(p, nP);
151 return _capsule.computeSquareLength();
163 nassertv(!origin.
is_nan());
164 nassertv(!direction.
is_nan());
void set_p0(LPoint3f p)
Sets the start point of the segment.
LPoint3f get_p1() const
Returns the end point of the segment.
void compute_direction(LPoint3f &dir) const
Returns the direction vector from the segment's start point to it's end point.
float get_radius() const
Returns the capsule's radius.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
bool is_nan() const
Returns true if any component of the vector is not-a-number, false otherwise.
void set_radius(float value)
Sets the capsule's radius.
void set_origin_direction(const LPoint3f &origin, const LVector3f &direction)
Setup this capsule from origin (start point) and direction vector.
void set_p1(LPoint3f p)
Sets the end point of the segment.
void compute_point(LPoint3f &p, float t) const
Computes a point on the segment.
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
static LVector3f nxVec3_to_vec3(const NxVec3 &v)
Converts from NxVec3 to LVector3f.
float compute_length() const
Returns the distance from the segment's start point to it's end point.
LPoint3f get_p0() const
Returns the start point of the segment.
LPoint3f get_origin() const
Returns the start point of the segment.
static LPoint3f nxVec3_to_point3(const NxVec3 &p)
Converts from NxVec3 to LPoint3f.
float compute_square_length() const
Returns the square distance from the segment's start point to it's end point.