zenilib: Zeni::Collision Namespace Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
Zeni::Collision Namespace Reference

## Classes

class | Capsule
| Collision Capsule. More...
class | Infinite_Cylinder
| Collision Infinite Cylinder. More...
class | Line
| Collision Line. More...
class | Line_Segment
| Collision Line Segment. More...
class | Parallelepiped
| Collision Parallelepiped. More...
class | Plane
| Collision Plane. More...
class | Ray
| Collision Ray. More...
class | Sphere
| Collision Sphere. More...

## Functions

void | absolute_float_unclamp (float &value, const float &new_value)
template<typename VALUE_TYPE >
void | double_unclamp (VALUE_TYPE &min_value, VALUE_TYPE &max_value, const VALUE_TYPE &new_value)
template<typename LINE_TYPE >
std::pair< float, float > | nearest_point (const LINE_TYPE &lhs, const Point3f &rhs)
template<typename LINE_TYPE >
std::pair< float, float > | nearest_point (const LINE_TYPE &lhs, const Plane &rhs)
template<typename LINE_TYPE1 , typename LINE_TYPE2 >
std::pair< float, float > | nearest_point (const LINE_TYPE1 &lhs, const LINE_TYPE2 &rhs)
template<typename LINE_TYPE >
std::pair< float, float > | nearest_point (const LINE_TYPE &lhs, const Parallelepiped &rhs)
template<typename VALUE_TYPE >
void | simple_clamp (VALUE_TYPE &value, const VALUE_TYPE &lower, const VALUE_TYPE &upper)
std::pair< float, float > | unpoof (const std::pair< float, float > &lhs, const float &radii)
float | unpoof (const float &lhs, const float &radii)

## Function Documentation

void Zeni::Collision::absolute_float_unclamp | ( | float & | value,
|  | const float & | new_value
| ) |  |

inline

Definition at line 43 of file Collision.cpp.

References fabs().

Referenced by Zeni::Collision::Parallelepiped::Parallelepiped().

template<typename VALUE_TYPE >

void Zeni::Collision::double_unclamp | ( | VALUE_TYPE & | min_value,
|  | VALUE_TYPE & | max_value,
|  | const VALUE_TYPE & | new_value
| ) |  |

Definition at line 58 of file Collision.cpp.

Referenced by Zeni::Collision::Parallelepiped::shortest_distance().

template<typename LINE_TYPE >

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

Definition at line 66 of file Collision.cpp.

References Zeni::Vector3f::magnitude(), and u.

Referenced by Zeni::Collision::Line_Segment::nearest_point(), Zeni::Collision::Ray::nearest_point(), Zeni::Collision::Line::shortest_distance(), and Zeni::Collision::Parallelepiped::shortest_distance().

template<typename LINE_TYPE >

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

Definition at line 85 of file Collision.cpp.

References Zeni::Collision::Plane::get_normal(), Zeni::Collision::Plane::get_point(), Zeni::Collision::Plane::shortest_distance(), and u.

template<typename LINE_TYPE1 , typename LINE_TYPE2 >

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

Definition at line 100 of file Collision.cpp.

References Zeni::Vector3f::magnitude(), u, and ZENI_COLLISION_EPSILON.

template<typename LINE_TYPE >

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

Begin Degenerative (Axis Aligned) Safe Code

End Degenerative (Axis Aligned) Safe Code

Definition at line 162 of file Collision.cpp.

References Zeni::Vector3f::divide_by(), END_OF_TIME, fabs(), Zeni::Collision::Parallelepiped::get_convert_from(), Zeni::Collision::Parallelepiped::get_convert_to(), Zeni::Collision::Parallelepiped::get_point(), Zeni::Vector3f::i, Zeni::Vector3f::j, Zeni::Vector3f::k, max, min, simple_clamp(), Zeni::Point3f::x, Zeni::Point3f::y, Zeni::Point3f::z, and ZENI_COLLISION_EPSILON.

template<typename VALUE_TYPE >

void Zeni::Collision::simple_clamp | ( | VALUE_TYPE & | value,
|  | const VALUE_TYPE & | lower,
|  | const VALUE_TYPE & | upper
| ) |  |

Definition at line 50 of file Collision.cpp.

Referenced by nearest_point(), and Zeni::Collision::Parallelepiped::shortest_distance().

std::pair<float, float> Zeni::Collision::unpoof | ( | const std::pair< float, float > & | lhs,
|  | const float & | radii
| ) |  |

inline

Definition at line 35 of file Collision.cpp.

References max.

Referenced by Zeni::Collision::Line_Segment::nearest_point(), Zeni::Collision::Ray::nearest_point(), Zeni::Collision::Capsule::nearest_point(), Zeni::Collision::Sphere::shortest_distance(), Zeni::Collision::Plane::shortest_distance(), Zeni::Collision::Line::shortest_distance(), Zeni::Collision::Infinite_Cylinder::shortest_distance(), and Zeni::Collision::Parallelepiped::shortest_distance().

float Zeni::Collision::unpoof | ( | const float & | lhs,
|  | const float & | radii
| ) |  |

inline

Definition at line 39 of file Collision.cpp.

References max.