Panda3D
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. More...
 
float get_length () const
 Returns the ray length. More...
 
LPoint3f get_origin () const
 Returns the ray origin. More...
 
void set_direction (const LVector3f &direction)
 Set the ray direction. More...
 
void set_length (float length)
 Sets the ray length. More...
 
void set_origin (const LPoint3f &origin)
 Sets the ray origin. More...
 

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.

Member Function Documentation

◆ get_direction()

LVector3f PhysxRay::get_direction ( ) const

Returns the ray direction.

Definition at line 52 of file physxRay.cxx.

References PhysxManager::nxVec3_to_vec3().

◆ get_length()

float PhysxRay::get_length ( ) const

Returns the ray length.

Definition at line 73 of file physxRay.cxx.

◆ get_origin()

LPoint3f PhysxRay::get_origin ( ) const

Returns the ray origin.

Definition at line 31 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 40 of file physxRay.cxx.

◆ 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 63 of file physxRay.cxx.

◆ set_origin()

void PhysxRay::set_origin ( const LPoint3f &  origin)

Sets the ray origin.

Definition at line 21 of file physxRay.cxx.


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