zenilib: Zeni::Collision::Sphere 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::Sphere Class Reference
Zenilib

Collision Sphere. More...

`#include <Collision.h>`

## Public Member Functions

| Sphere ()
| Sphere (const Point3f &center_, const float &radius_)
const Point3f & | get_center () const
const float & | get_radius () const
template<typename TYPE >
bool | intersects (const TYPE &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

## Detailed Description

Collision Sphere.

This class ZENI_DLL describes an Sphere object in 3-space. The Sphere extends the Point3f to have a radius. 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 181 of file Collision.h.

## Constructor & Destructor Documentation

Zeni::Collision::Sphere::Sphere | ( |  | ) |

inline

Definition at line 183 of file Collision.h.

Zeni::Collision::Sphere::Sphere | ( | const Point3f & | center_,
|  | const float & | radius_
| ) |  |

Definition at line 256 of file Collision.cpp.

## Member Function Documentation

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

inline

Definition at line 199 of file Collision.h.

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

const float& Zeni::Collision::Sphere::get_radius | ( |  | ) | const

inline

Definition at line 200 of file Collision.h.

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

template<typename TYPE >

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

Definition at line 52 of file Collision.hxx.

References shortest_distance(), and ZENI_COLLISION_EPSILON.

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

Definition at line 262 of file Collision.cpp.

References Zeni::Collision::unpoof().

Referenced by intersects().

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

Definition at line 265 of file Collision.cpp.

References Zeni::Collision::unpoof().

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

inline

Definition at line 29 of file Collision.hxx.

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

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

inline

Definition at line 32 of file Collision.hxx.

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

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

inline

Definition at line 35 of file Collision.hxx.

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

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

inline

Definition at line 38 of file Collision.hxx.

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

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

inline

Definition at line 41 of file Collision.hxx.

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

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

inline

Definition at line 44 of file Collision.hxx.

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

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

inline

Definition at line 47 of file Collision.hxx.

References Zeni::Collision::Parallelepiped::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