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

Represents a line segment. More...

#include "physxSegment.h"

Public Member Functions

 PhysxSegment (const PhysxSegment &segment)
 
 PhysxSegment (const LPoint3f &p0, const LPoint3f &p1)
 
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...
 
void set_origin_direction (const LPoint3f &origin, const LVector3f &direction)
 Setup this segment 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...
 

Public Attributes

NxSegment _segment
 

Detailed Description

Represents a line segment.

Definition at line 25 of file physxSegment.h.

Member Function Documentation

◆ compute_direction()

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 81 of file physxSegment.cxx.

◆ compute_length()

float PhysxSegment::compute_length ( ) const

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

Definition at line 94 of file physxSegment.cxx.

◆ compute_point()

void PhysxSegment::compute_point ( LPoint3f &  p,
float  t 
) const

Computes a point on the segment.

Definition at line 103 of file physxSegment.cxx.

◆ compute_square_length()

float PhysxSegment::compute_square_length ( ) const

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

Definition at line 117 of file physxSegment.cxx.

◆ get_origin()

LPoint3f PhysxSegment::get_origin ( ) const

Returns the start point of the segment.

Definition at line 71 of file physxSegment.cxx.

References PhysxManager::nxVec3_to_point3().

◆ get_p0()

LPoint3f PhysxSegment::get_p0 ( ) const

Returns the start point of the segment.

Definition at line 31 of file physxSegment.cxx.

References PhysxManager::nxVec3_to_vec3().

◆ get_p1()

LPoint3f PhysxSegment::get_p1 ( ) const

Returns the end point of the segment.

Definition at line 51 of file physxSegment.cxx.

References PhysxManager::nxVec3_to_vec3().

◆ set_origin_direction()

void PhysxSegment::set_origin_direction ( const LPoint3f &  origin,
const LVector3f &  direction 
)

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

Definition at line 126 of file physxSegment.cxx.

◆ set_p0()

void PhysxSegment::set_p0 ( LPoint3f  p)

Sets the start point of the segment.

Definition at line 40 of file physxSegment.cxx.

◆ set_p1()

void PhysxSegment::set_p1 ( LPoint3f  p)

Sets the end point of the segment.

Definition at line 60 of file physxSegment.cxx.


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