Panda3D
Public Member Functions | Public Attributes | List of all members
PhysxCapsule Class Reference

Represents a capsule. More...

#include "physxCapsule.h"

Public Member Functions

 PhysxCapsule (const PhysxSegment &segment, float radius)
 
void compute_direction (LPoint3f &dir) const
 Returns the direction vector from the segment's start point to it's end point. More...
 
float compute_length () const
 Returns the distance from the segment's start point to it's end point. More...
 
void compute_point (LPoint3f &p, float t) const
 Computes a point on the segment. More...
 
float compute_square_length () const
 Returns the square distance from the segment's start point to it's end point. More...
 
LPoint3f get_origin () const
 Returns the start point of the segment. More...
 
LPoint3f get_p0 () const
 Returns the start point of the segment. More...
 
LPoint3f get_p1 () const
 Returns the end point of the segment. More...
 
float get_radius () const
 Returns the capsule's radius. More...
 
void set_origin_direction (const LPoint3f &origin, const LVector3f &direction)
 Setup this capsule from origin (start point) and direction vector. More...
 
void set_p0 (LPoint3f p)
 Sets the start point of the segment. More...
 
void set_p1 (LPoint3f p)
 Sets the end point of the segment. More...
 
void set_radius (float value)
 Sets the capsule's radius. More...
 

Public Attributes

NxCapsule _capsule
 

Detailed Description

Represents a capsule.

Definition at line 27 of file physxCapsule.h.

Member Function Documentation

◆ compute_direction()

void PhysxCapsule::compute_direction ( LPoint3f dir) const

Returns the direction vector from the segment's start point to it's end point.

Definition at line 106 of file physxCapsule.cxx.

References compute_length(), LVecBase3f::is_nan(), and PhysxManager::point3_to_nxVec3().

Referenced by get_origin().

◆ compute_length()

float PhysxCapsule::compute_length ( ) const

Returns the distance from the segment's start point to it's end point.

Definition at line 122 of file physxCapsule.cxx.

References compute_point().

Referenced by compute_direction().

◆ compute_point()

void PhysxCapsule::compute_point ( LPoint3f p,
float  t 
) const

Computes a point on the segment.

Definition at line 133 of file physxCapsule.cxx.

References compute_square_length(), LVecBase3f::is_nan(), and PhysxManager::point3_to_nxVec3().

Referenced by compute_length().

◆ compute_square_length()

float PhysxCapsule::compute_square_length ( ) const

Returns the square distance from the segment's start point to it's end point.

Definition at line 149 of file physxCapsule.cxx.

References set_origin_direction().

Referenced by compute_point().

◆ get_origin()

LPoint3f PhysxCapsule::get_origin ( ) const

Returns the start point of the segment.

Definition at line 94 of file physxCapsule.cxx.

References compute_direction(), and PhysxManager::nxVec3_to_point3().

Referenced by set_p1().

◆ get_p0()

LPoint3f PhysxCapsule::get_p0 ( ) const

Returns the start point of the segment.

Definition at line 46 of file physxCapsule.cxx.

References PhysxManager::nxVec3_to_vec3(), and set_p0().

Referenced by set_radius().

◆ get_p1()

LPoint3f PhysxCapsule::get_p1 ( ) const

Returns the end point of the segment.

Definition at line 70 of file physxCapsule.cxx.

References PhysxManager::nxVec3_to_vec3(), and set_p1().

Referenced by set_p0().

◆ get_radius()

float PhysxCapsule::get_radius ( ) const

Returns the capsule's radius.

Definition at line 24 of file physxCapsule.cxx.

References set_radius().

◆ set_origin_direction()

void PhysxCapsule::set_origin_direction ( const LPoint3f origin,
const LVector3f direction 
)

Setup this capsule from origin (start point) and direction vector.

Definition at line 161 of file physxCapsule.cxx.

References LVecBase3f::is_nan(), PhysxManager::point3_to_nxVec3(), and PhysxManager::vec3_to_nxVec3().

Referenced by compute_square_length().

◆ set_p0()

void PhysxCapsule::set_p0 ( LPoint3f  p)

Sets the start point of the segment.

Definition at line 57 of file physxCapsule.cxx.

References get_p1(), LVecBase3f::is_nan(), and PhysxManager::vec3_to_nxVec3().

Referenced by get_p0().

◆ set_p1()

void PhysxCapsule::set_p1 ( LPoint3f  p)

Sets the end point of the segment.

Definition at line 81 of file physxCapsule.cxx.

References get_origin(), LVecBase3f::is_nan(), and PhysxManager::vec3_to_nxVec3().

Referenced by get_p1().

◆ set_radius()

void PhysxCapsule::set_radius ( float  value)

Sets the capsule's radius.

Definition at line 35 of file physxCapsule.cxx.

References get_p0().

Referenced by get_radius().


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