Panda3D
|
Represents a line segment. More...
#include "physxSegment.h"
Public Member Functions | |
PhysxSegment (const LPoint3f &p0, const LPoint3f &p1) | |
PhysxSegment (const PhysxSegment &segment) | |
void | compute_direction (LPoint3f &dir) const |
Returns the direction vector from the segment's start point to it's end point. | |
float | compute_length () const |
Returns the distance from the segment's start point to it's end point. | |
void | compute_point (LPoint3f &p, float t) const |
Computes a point on the segment. | |
float | compute_square_length () const |
Returns the square distance from the segment's start point to it's end point. | |
LPoint3f | get_origin () const |
Returns the start point of the segment. | |
LPoint3f | get_p0 () const |
Returns the start point of the segment. | |
LPoint3f | get_p1 () const |
Returns the end point of the segment. | |
void | set_origin_direction (const LPoint3f &origin, const LVector3f &direction) |
Setup this segment from origin (start point) and direction vector. | |
void | set_p0 (LPoint3f p) |
Sets the start point of the segment. | |
void | set_p1 (LPoint3f p) |
Sets the end point of the segment. | |
Public Attributes | |
NxSegment | _segment |
Represents a line segment.
Definition at line 25 of file physxSegment.h.
|
inline |
Definition at line 17 of file physxSegment.I.
|
inline |
Definition at line 25 of file physxSegment.I.
PhysxSegment::PhysxSegment | ( | const LPoint3f & | p0, |
const LPoint3f & | p1 ) |
Definition at line 20 of file physxSegment.cxx.
|
inline |
Definition at line 34 of file physxSegment.I.
void PhysxSegment::compute_direction | ( | LPoint3f & | dir | ) | const |
Returns the direction vector from the segment's start point to it's end point.
Definition at line 80 of file physxSegment.cxx.
References PhysxManager::point3_to_nxVec3().
float PhysxSegment::compute_length | ( | ) | const |
Returns the distance from the segment's start point to it's end point.
Definition at line 93 of file physxSegment.cxx.
void PhysxSegment::compute_point | ( | LPoint3f & | p, |
float | t ) const |
Computes a point on the segment.
Definition at line 102 of file physxSegment.cxx.
References PhysxManager::point3_to_nxVec3().
float PhysxSegment::compute_square_length | ( | ) | const |
Returns the square distance from the segment's start point to it's end point.
Definition at line 116 of file physxSegment.cxx.
LPoint3f PhysxSegment::get_origin | ( | ) | const |
Returns the start point of the segment.
Definition at line 70 of file physxSegment.cxx.
References PhysxManager::nxVec3_to_point3().
LPoint3f PhysxSegment::get_p0 | ( | ) | const |
Returns the start point of the segment.
Definition at line 30 of file physxSegment.cxx.
References PhysxManager::nxVec3_to_vec3().
LPoint3f PhysxSegment::get_p1 | ( | ) | const |
Returns the end point of the segment.
Definition at line 50 of file physxSegment.cxx.
References PhysxManager::nxVec3_to_vec3().
void PhysxSegment::set_origin_direction | ( | const LPoint3f & | origin, |
const LVector3f & | direction ) |
Setup this segment from origin (start point) and direction vector.
Definition at line 125 of file physxSegment.cxx.
References PhysxManager::point3_to_nxVec3(), and PhysxManager::vec3_to_nxVec3().
void PhysxSegment::set_p0 | ( | LPoint3f | p | ) |
Sets the start point of the segment.
Definition at line 39 of file physxSegment.cxx.
References PhysxManager::vec3_to_nxVec3().
void PhysxSegment::set_p1 | ( | LPoint3f | p | ) |
Sets the end point of the segment.
Definition at line 59 of file physxSegment.cxx.
References PhysxManager::vec3_to_nxVec3().
NxSegment PhysxSegment::_segment |
Definition at line 47 of file physxSegment.h.