Panda3D
Public Member Functions | Public Attributes

PhysxRay Class Reference

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

#include "physxRay.h"

List of all members.

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 28 of file physxRay.h.


Member Function Documentation

LVector3f PhysxRay::get_direction ( ) const

Returns the ray direction.

Definition at line 62 of file physxRay.cxx.

References PhysxManager::nxVec3_to_vec3().

float PhysxRay::get_length ( ) const

Returns the ray length.

Definition at line 88 of file physxRay.cxx.

LPoint3f PhysxRay::get_origin ( ) const

Returns the ray origin.

Definition at line 36 of file physxRay.cxx.

References PhysxManager::nxVec3_to_point3().

void PhysxRay::set_direction ( const LVector3f direction)

Set the ray direction.

It is not required to pass a normalized vector.

Definition at line 48 of file physxRay.cxx.

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

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

void PhysxRay::set_origin ( const LPoint3f origin)

Sets the ray origin.

Definition at line 24 of file physxRay.cxx.

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


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations