zenilib: Zeni::Collision::Ray Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
Zeni::Collision::Ray Class Reference
Zenilib

Collision Ray. More...

`#include <Collision.h>`

## Public Member Functions

| Ray ()
| Ray (const Point3f &end_point_a_, const Point3f &end_point_b_)
| Ray (const Point3f &end_point_a_, const Vector3f &direction_vector_)
const Vector3f & | get_direction () const
const float & | get_direction2 () const
const Point3f & | get_end_point_a () const
const Point3f & | get_end_point_b () const
template<typename TYPE >
bool | intersects (const TYPE &rhs) const
std::pair< float, float > | nearest_point (const Ray &rhs) const
| Returns <distance, interpolation value [0.0f, inf)> More...
std::pair< float, float > | nearest_point (const Point3f &rhs) const
std::pair< float, float > | nearest_point (const Sphere &rhs) const
std::pair< float, float > | nearest_point (const Plane &rhs) const
std::pair< float, float > | nearest_point (const Line_Segment &rhs) const
std::pair< float, float > | nearest_point (const Line &rhs) const
std::pair< float, float > | nearest_point (const Parallelepiped &rhs) const
float | shortest_distance (const Sphere &rhs) const
float | shortest_distance (const Point3f &rhs) const
float | shortest_distance (const Plane &rhs) const
float | shortest_distance (const Line &rhs) const
float | shortest_distance (const Ray &rhs) const
float | shortest_distance (const Line_Segment &rhs) const
float | shortest_distance (const Infinite_Cylinder &rhs) const
float | shortest_distance (const Capsule &rhs) const
float | shortest_distance (const Parallelepiped &rhs) const

## Static Public Member Functions

static bool | has_lower_bound ()
static bool | has_upper_bound ()

## Detailed Description

Collision Ray.

This class ZENI_DLL describes a Ray object in 3-space. It is possible to test to see if it intersects any other object in Zeni_Collision, and it is also possible to find the shortest distance between it and any other object in Zeni_Collision. Additionally, it is possible to determine the closest point on the Ray to the object it is being compared to.

Author
  bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 275 of file Collision.h.

## Constructor & Destructor Documentation

Zeni::Collision::Ray::Ray | ( |  | ) |

inline

Definition at line 277 of file Collision.h.

Zeni::Collision::Ray::Ray | ( | const Point3f & | end_point_a_,
|  | const Point3f & | end_point_b_
| ) |  |

Definition at line 326 of file Collision.cpp.

Zeni::Collision::Ray::Ray | ( | const Point3f & | end_point_a_,
|  | const Vector3f & | direction_vector_
| ) |  |

Definition at line 334 of file Collision.cpp.

## Member Function Documentation

const Vector3f& Zeni::Collision::Ray::get_direction | ( |  | ) | const

inline

Definition at line 305 of file Collision.h.

const float& Zeni::Collision::Ray::get_direction2 | ( |  | ) | const

inline

Definition at line 306 of file Collision.h.

const Point3f& Zeni::Collision::Ray::get_end_point_a | ( |  | ) | const

inline

Definition at line 303 of file Collision.h.

const Point3f& Zeni::Collision::Ray::get_end_point_b | ( |  | ) | const

inline

Definition at line 304 of file Collision.h.

static bool Zeni::Collision::Ray::has_lower_bound | ( |  | ) |

inlinestatic

Definition at line 307 of file Collision.h.

static bool Zeni::Collision::Ray::has_upper_bound | ( |  | ) |

inlinestatic

Definition at line 308 of file Collision.h.

template<typename TYPE >

bool Zeni::Collision::Ray::intersects | ( | const TYPE & | rhs | ) | const

Definition at line 142 of file Collision.hxx.

References shortest_distance(), and ZENI_COLLISION_EPSILON.

std::pair< float, float > Zeni::Collision::Ray::nearest_point | ( | const Ray & | rhs | ) | const

Returns <distance, interpolation value [0.0f, inf)>

Definition at line 354 of file Collision.cpp.

References Zeni::Collision::nearest_point().

Referenced by nearest_point(), and shortest_distance().

std::pair< float, float > Zeni::Collision::Ray::nearest_point | ( | const Point3f & | rhs | ) | const

Definition at line 342 of file Collision.cpp.

References Zeni::Collision::nearest_point().

std::pair< float, float > Zeni::Collision::Ray::nearest_point | ( | const Sphere & | rhs | ) | const

Definition at line 345 of file Collision.cpp.

References Zeni::Collision::Sphere::get_center(), Zeni::Collision::Sphere::get_radius(), nearest_point(), and Zeni::Collision::unpoof().

std::pair< float, float > Zeni::Collision::Ray::nearest_point | ( | const Plane & | rhs | ) | const

Definition at line 348 of file Collision.cpp.

References Zeni::Collision::nearest_point().

std::pair< float, float > Zeni::Collision::Ray::nearest_point | ( | const Line_Segment & | rhs | ) | const

Definition at line 357 of file Collision.cpp.

References Zeni::Collision::nearest_point().

std::pair< float, float > Zeni::Collision::Ray::nearest_point | ( | const Line & | rhs | ) | const

Definition at line 351 of file Collision.cpp.

References Zeni::Collision::nearest_point().

std::pair< float, float > Zeni::Collision::Ray::nearest_point | ( | const Parallelepiped & | rhs | ) | const

Definition at line 360 of file Collision.cpp.

References Zeni::Collision::nearest_point().

float Zeni::Collision::Ray::shortest_distance | ( | const Sphere & | rhs | ) | const

inline

Definition at line 113 of file Collision.hxx.

References nearest_point().

Referenced by intersects(), Zeni::Collision::Sphere::shortest_distance(), Zeni::Collision::Plane::shortest_distance(), Zeni::Collision::Line::shortest_distance(), and Zeni::Collision::Parallelepiped::shortest_distance().

float Zeni::Collision::Ray::shortest_distance | ( | const Point3f & | rhs | ) | const

inline

Definition at line 116 of file Collision.hxx.

References nearest_point().

float Zeni::Collision::Ray::shortest_distance | ( | const Plane & | rhs | ) | const

inline

Definition at line 119 of file Collision.hxx.

References nearest_point().

float Zeni::Collision::Ray::shortest_distance | ( | const Line & | rhs | ) | const

inline

Definition at line 122 of file Collision.hxx.

References nearest_point().

float Zeni::Collision::Ray::shortest_distance | ( | const Ray & | rhs | ) | const

inline

Definition at line 125 of file Collision.hxx.

References nearest_point().

float Zeni::Collision::Ray::shortest_distance | ( | const Line_Segment & | rhs | ) | const

inline

Definition at line 128 of file Collision.hxx.

References nearest_point().

float Zeni::Collision::Ray::shortest_distance | ( | const Infinite_Cylinder & | rhs | ) | const

inline

Definition at line 131 of file Collision.hxx.

References Zeni::Collision::Infinite_Cylinder::shortest_distance().

float Zeni::Collision::Ray::shortest_distance | ( | const Capsule & | rhs | ) | const

inline

Definition at line 134 of file Collision.hxx.

References Zeni::Collision::Capsule::shortest_distance().

float Zeni::Collision::Ray::shortest_distance | ( | const Parallelepiped & | rhs | ) | const

inline

Definition at line 137 of file Collision.hxx.

References nearest_point().

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

- zenilib/jni/external/zenilib/zeni/Zeni/Collision.h
- zenilib/jni/external/zenilib/zeni/Collision.cpp
- zenilib/jni/external/zenilib/zeni/Zeni/Collision.hxx