Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
PhysxRay Class Reference

Represents an ray as an origin and direction. More...

#include "physxRay.h"

Public Member Functions

LVector3f get_direction () const
 Returns the ray direction.
 
float get_length () const
 Returns the ray length.
 
LPoint3f get_origin () const
 Returns the ray origin.
 
void set_direction (const LVector3f &direction)
 Set the ray direction.
 
void set_length (float length)
 Sets the ray length.
 
void set_origin (const LPoint3f &origin)
 Sets the ray origin.
 

Public Attributes

NxReal _length
 
NxRay _ray
 

Detailed Description

Represents an ray as an origin and direction.

The ray will be infinite if no length is given.

Definition at line 26 of file physxRay.h.

Constructor & Destructor Documentation

◆ PhysxRay()

PhysxRay::PhysxRay ( )
inline

Definition at line 17 of file physxRay.I.

◆ ~PhysxRay()

PhysxRay::~PhysxRay ( )
inline

Definition at line 29 of file physxRay.I.

Member Function Documentation

◆ get_direction()

LVector3f PhysxRay::get_direction ( ) const

Returns the ray direction.

Definition at line 51 of file physxRay.cxx.

References PhysxManager::nxVec3_to_vec3().

◆ get_length()

float PhysxRay::get_length ( ) const

Returns the ray length.

Definition at line 72 of file physxRay.cxx.

◆ get_origin()

LPoint3f PhysxRay::get_origin ( ) const

Returns the ray origin.

Definition at line 30 of file physxRay.cxx.

References PhysxManager::nxVec3_to_point3().

◆ set_direction()

void PhysxRay::set_direction ( const LVector3f & direction)

Set the ray direction.

It is not required to pass a normalized vector.

Definition at line 39 of file physxRay.cxx.

References PhysxManager::vec3_to_nxVec3().

◆ set_length()

void PhysxRay::set_length ( float length)

Sets the ray length.

If no length is set then the ray will be virtually infinite (the maximum floating point number will be used, e.g. 3.40282346639e+038).

Definition at line 62 of file physxRay.cxx.

◆ set_origin()

void PhysxRay::set_origin ( const LPoint3f & origin)

Sets the ray origin.

Definition at line 20 of file physxRay.cxx.

References PhysxManager::point3_to_nxVec3().

Member Data Documentation

◆ _length

NxReal PhysxRay::_length

Definition at line 42 of file physxRay.h.

◆ _ray

NxRay PhysxRay::_ray

Definition at line 41 of file physxRay.h.


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