#include <Sphere.h>
Public Member Functions |
| Sphere () |
| Constructor.
|
| ~Sphere () |
| Destructor.
|
void | AddPoint (const gfx::Vertex3 *vPoint) |
| Add an internal point to calculate the bounding sphere.
|
void | AddPoint (const Vector &v) |
| Add an internal point to calculate the bounding sphere.
|
void | AddSphere (const Sphere *sphere) |
| Add an internal sphere to calculate the bounding sphere.
|
void | AddBox (const AABB &aabb) |
| Adds a AABB to calculate the bounding sphere.
|
CollisionType | Collision (const Plane *pPlane) const |
| Checks the sphere collision with a plane and returns ECT_Behind , ECT_Front or ECT_Intersect.
|
bool | Inside (const math::Vector &point) const |
| Returns true if point is inside the sphere.
|
const Vector & | GetCenter () const |
| Returns the sphere center point.
|
float | GetRadius () const |
| Returns the sphere radius.
|
float | GetDistance (const Plane *pPlane) const |
| Returns the distance of the plane.
|
void | SetCenter (const Vector &v) |
| Sets the sphere center.
|
void | SetRadius (float f) |
| Sets the sphere center.
|
int | getType () const |
| Shape () |
| Constructor.
|
virtual | ~Shape () |
| Distructor.
|
Detailed Description
Definition at line 20 of file Sphere.h.
Constructor & Destructor Documentation
kge::math::Sphere::Sphere |
( |
| ) |
|
kge::math::Sphere::~Sphere |
( |
| ) |
|
|
inline |
Destructor.
Definition at line 28 of file Sphere.h.
Member Function Documentation
void kge::math::Sphere::AddBox |
( |
const AABB & |
aabb | ) |
|
Adds a AABB to calculate the bounding sphere.
void kge::math::Sphere::AddPoint |
( |
const gfx::Vertex3 * |
vPoint | ) |
|
Add an internal point to calculate the bounding sphere.
void kge::math::Sphere::AddPoint |
( |
const Vector & |
v | ) |
|
Add an internal point to calculate the bounding sphere.
void kge::math::Sphere::AddSphere |
( |
const Sphere * |
sphere | ) |
|
Add an internal sphere to calculate the bounding sphere.
Checks the sphere collision with a plane and returns ECT_Behind , ECT_Front or ECT_Intersect.
const Vector& kge::math::Sphere::GetCenter |
( |
| ) |
const |
|
inline |
Returns the sphere center point.
Definition at line 49 of file Sphere.h.
float kge::math::Sphere::GetDistance |
( |
const Plane * |
pPlane | ) |
const |
Returns the distance of the plane.
float kge::math::Sphere::GetRadius |
( |
| ) |
const |
|
inline |
Returns the sphere radius.
Definition at line 52 of file Sphere.h.
int kge::math::Sphere::getType |
( |
void |
| ) |
const |
|
inlinevirtual |
bool kge::math::Sphere::Inside |
( |
const math::Vector & |
point | ) |
const |
Returns true if point is inside the sphere.
void kge::math::Sphere::SetCenter |
( |
const Vector & |
v | ) |
|
|
inline |
Sets the sphere center.
Definition at line 58 of file Sphere.h.
void kge::math::Sphere::SetRadius |
( |
float |
f | ) |
|
|
inline |
Sets the sphere center.
Definition at line 61 of file Sphere.h.
Member Data Documentation
bool kge::math::Sphere::m_bFirstPoint |
|
protected |
Check for first point recive.
Definition at line 71 of file Sphere.h.
float kge::math::Sphere::m_fRadius |
The sphere radius.
Definition at line 68 of file Sphere.h.
int kge::math::Sphere::m_iType |
|
protected |
Vector kge::math::Sphere::m_vCenter |
The center of the sphere.
Definition at line 65 of file Sphere.h.
Vector kge::math::Sphere::m_vMax |
The max point uses by AddPoint function.
Definition at line 65 of file Sphere.h.
Vector kge::math::Sphere::m_vMin |
The min point uses by AddPoint function.
Definition at line 65 of file Sphere.h.
The documentation for this class was generated from the following file:
- E:/mycodes/git/kge/Include/math/Sphere.h