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

Collision Sphere. More...

#include <Collision.h>

Public Member Functions

 Sphere ()
 Sphere (const Point3f &center_, const float &radius_)
const Point3fget_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.


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 ( )

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

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

Definition at line 29 of file Collision.hxx.

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

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

Definition at line 32 of file Collision.hxx.

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

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

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

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
float Zeni::Collision::Sphere::shortest_distance ( const Capsule rhs) const

Definition at line 44 of file Collision.hxx.

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

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

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