zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Collision::Line Class Reference

Collision Line. More...

#include <Collision.h>

Public Member Functions

 Line ()
 
 Line (const Point3f &end_point_a_, const Point3f &end_point_b_)
 
 Line (const Point3f &end_point_a_, const Vector3f &direction_vector_)
 
const Vector3fget_direction () const
 
const float & get_direction2 () const
 
const Point3fget_end_point_a () const
 
const Point3fget_end_point_b () const
 
template<typename TYPE >
bool intersects (const TYPE &rhs) const
 
float shortest_distance (const Line &rhs) const
 
float shortest_distance (const Point3f &rhs) const
 
float shortest_distance (const Sphere &rhs) const
 
float shortest_distance (const Line_Segment &rhs) const
 
float shortest_distance (const Plane &rhs) const
 
float shortest_distance (const Parallelepiped &rhs) const
 
float shortest_distance (const Ray &rhs) const
 
float shortest_distance (const Infinite_Cylinder &rhs) const
 
float shortest_distance (const Capsule &rhs) const
 

Static Public Member Functions

static bool has_lower_bound ()
 
static bool has_upper_bound ()
 

Detailed Description

Collision Line.

This class ZENI_DLL describes a Line 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.

Author
bazald

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

Definition at line 318 of file Collision.h.

Constructor & Destructor Documentation

Zeni::Collision::Line::Line ( )
inline

Definition at line 320 of file Collision.h.

Zeni::Collision::Line::Line ( const Point3f end_point_a_,
const Point3f end_point_b_ 
)

Definition at line 291 of file Collision.cpp.

Zeni::Collision::Line::Line ( const Point3f end_point_a_,
const Vector3f direction_vector_ 
)

Definition at line 299 of file Collision.cpp.

Member Function Documentation

const Vector3f& Zeni::Collision::Line::get_direction ( ) const
inline

Definition at line 339 of file Collision.h.

const float& Zeni::Collision::Line::get_direction2 ( ) const
inline

Definition at line 340 of file Collision.h.

const Point3f& Zeni::Collision::Line::get_end_point_a ( ) const
inline

Definition at line 337 of file Collision.h.

const Point3f& Zeni::Collision::Line::get_end_point_b ( ) const
inline

Definition at line 338 of file Collision.h.

static bool Zeni::Collision::Line::has_lower_bound ( )
inlinestatic

Definition at line 341 of file Collision.h.

static bool Zeni::Collision::Line::has_upper_bound ( )
inlinestatic

Definition at line 342 of file Collision.h.

template<typename TYPE >
bool Zeni::Collision::Line::intersects ( const TYPE rhs) const

Definition at line 157 of file Collision.hxx.

References shortest_distance(), and ZENI_COLLISION_EPSILON.

float Zeni::Collision::Line::shortest_distance ( const Point3f rhs) const

Definition at line 307 of file Collision.cpp.

References Zeni::Collision::nearest_point().

float Zeni::Collision::Line::shortest_distance ( const Sphere rhs) const
float Zeni::Collision::Line::shortest_distance ( const Line_Segment rhs) const

Definition at line 319 of file Collision.cpp.

References Zeni::Collision::nearest_point().

float Zeni::Collision::Line::shortest_distance ( const Plane rhs) const

Definition at line 313 of file Collision.cpp.

References Zeni::Collision::nearest_point().

float Zeni::Collision::Line::shortest_distance ( const Parallelepiped rhs) const

Definition at line 322 of file Collision.cpp.

References Zeni::Collision::nearest_point().

float Zeni::Collision::Line::shortest_distance ( const Ray rhs) const
inline

Definition at line 146 of file Collision.hxx.

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

float Zeni::Collision::Line::shortest_distance ( const Infinite_Cylinder rhs) const
inline
float Zeni::Collision::Line::shortest_distance ( const Capsule rhs) const
inline

Definition at line 152 of file Collision.hxx.

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


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