zenilib: Zeni::Collision::Parallelepiped 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 | List of all members
Zeni::Collision::Parallelepiped Class Reference
Zenilib

Collision Parallelepiped. More...

`#include <Collision.h>`

## Public Member Functions

| Parallelepiped ()
| Parallelepiped (const Point3f &point_, const Vector3f &edge_a_, const Vector3f &edge_b_, const Vector3f &edge_c_)
const Point3f & | get_center () const
const Matrix4f & | get_convert_from () const
const Matrix4f & | get_convert_to () const
const Vector3f & | get_edge_a () const
const Vector3f & | get_edge_b () const
const Vector3f & | get_edge_c () const
const Vector3f & | get_extents () const
const Vector3f & | get_normal_a () const
const Vector3f & | get_normal_b () const
const Vector3f & | get_normal_c () const
const Point3f & | get_point () const
template<>
bool | intersects (const Parallelepiped &rhs) const
template<typename TYPE >
bool | intersects (const TYPE &rhs) const
float | shortest_distance (const Parallelepiped &rhs) const
float | shortest_distance (const Point3f &rhs) const
float | shortest_distance (const Sphere &rhs) const
float | shortest_distance (const Plane &rhs) const
float | shortest_distance (const Infinite_Cylinder &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 Capsule &rhs) const

## Detailed Description

Collision Parallelepiped.

This class ZENI_DLL describes a Parallelepiped 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 421 of file Collision.h.

## Constructor & Destructor Documentation

Zeni::Collision::Parallelepiped::Parallelepiped | ( |  | ) |

inline

Definition at line 423 of file Collision.h.

Zeni::Collision::Parallelepiped::Parallelepiped | ( | const Point3f & | point_,
|  | const Vector3f & | edge_a_,
|  | const Vector3f & | edge_b_,
|  | const Vector3f & | edge_c_
| ) |  |

Definition at line 465 of file Collision.cpp.

References Zeni::Collision::absolute_float_unclamp(), Zeni::Vector3f::i, Zeni::Vector3f::j, and Zeni::Vector3f::k.

## Member Function Documentation

const Point3f& Zeni::Collision::Parallelepiped::get_center | ( |  | ) | const

inline

Definition at line 446 of file Collision.h.

const Matrix4f& Zeni::Collision::Parallelepiped::get_convert_from | ( |  | ) | const

inline

Definition at line 444 of file Collision.h.

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

const Matrix4f& Zeni::Collision::Parallelepiped::get_convert_to | ( |  | ) | const

inline

Definition at line 445 of file Collision.h.

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

const Vector3f& Zeni::Collision::Parallelepiped::get_edge_a | ( |  | ) | const

inline

Definition at line 441 of file Collision.h.

const Vector3f& Zeni::Collision::Parallelepiped::get_edge_b | ( |  | ) | const

inline

Definition at line 442 of file Collision.h.

const Vector3f& Zeni::Collision::Parallelepiped::get_edge_c | ( |  | ) | const

inline

Definition at line 443 of file Collision.h.

const Vector3f& Zeni::Collision::Parallelepiped::get_extents | ( |  | ) | const

inline

Definition at line 447 of file Collision.h.

const Vector3f& Zeni::Collision::Parallelepiped::get_normal_a | ( |  | ) | const

inline

Definition at line 448 of file Collision.h.

const Vector3f& Zeni::Collision::Parallelepiped::get_normal_b | ( |  | ) | const

inline

Definition at line 449 of file Collision.h.

const Vector3f& Zeni::Collision::Parallelepiped::get_normal_c | ( |  | ) | const

inline

Definition at line 450 of file Collision.h.

const Point3f& Zeni::Collision::Parallelepiped::get_point | ( |  | ) | const

inline

Definition at line 440 of file Collision.h.

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

template<>

bool Zeni::Collision::Parallelepiped::intersects | ( | const Parallelepiped & | rhs | ) | const

inline

Definition at line 225 of file Collision.hxx.

References ZENI_COLLISION_EPSILON.

template<typename TYPE >

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

Definition at line 220 of file Collision.hxx.

References shortest_distance(), and ZENI_COLLISION_EPSILON.

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

Definition at line 495 of file Collision.cpp.

References fabs(), i, j, m, max, R, and u.

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

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

Definition at line 657 of file Collision.cpp.

References Zeni::Vector3f::magnitude(), Zeni::Collision::nearest_point(), and Zeni::Collision::simple_clamp().

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

Definition at line 709 of file Collision.cpp.

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

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

Definition at line 670 of file Collision.cpp.

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

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

Definition at line 712 of file Collision.cpp.

References Zeni::Collision::Infinite_Cylinder::get_radius(), shortest_distance(), and Zeni::Collision::unpoof().

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

inline

Definition at line 206 of file Collision.hxx.

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

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

inline

Definition at line 209 of file Collision.hxx.

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

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

inline

Definition at line 212 of file Collision.hxx.

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

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

inline

Definition at line 215 of file Collision.hxx.

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

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