Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Opcode::Sphere Class Reference

#include <Opcode.h>

Public Member Functions

inline_ Sphere ()
 Constructor. More...
 
inline_ Sphere (const Point &center, float radius)
 Constructor. More...
 
 Sphere (udword nb_verts, const Point *verts)
 Constructor. More...
 
inline_ Sphere (const Sphere &sphere)
 Copy constructor. More...
 
inline_ ~Sphere ()
 Destructor. More...
 
BSphereMethod Compute (udword nb_verts, const Point *verts)
 
bool FastCompute (udword nb_verts, const Point *verts)
 
inline_ const PointGetCenter () const
 
inline_ float GetRadius () const
 
inline_ const PointCenter () const
 
inline_ float Radius () const
 
inline_ SphereSet (const Point &center, float radius)
 
inline_ SphereSetCenter (const Point &center)
 
inline_ SphereSetRadius (float radius)
 
inline_ bool Contains (const Point &p) const
 
inline_ bool Contains (const Sphere &sphere) const
 
inline_ BOOL Contains (const AABB &aabb) const
 
inline_ bool Intersect (const Sphere &sphere) const
 
inline_ BOOL IsValid () const
 

Public Attributes

Point mCenter
 Sphere center. More...
 
float mRadius
 Sphere radius. More...
 

Detailed Description

Definition at line 25 of file Opcode.h.

Constructor & Destructor Documentation

inline_ Opcode::Sphere::Sphere ( )
inline

Constructor.

Definition at line 29 of file Opcode.h.

39 {
inline_ Opcode::Sphere::Sphere ( const Point center,
float  radius 
)
inline

Constructor.

Definition at line 31 of file Opcode.h.

39 {
Opcode::Sphere::Sphere ( udword  nb_verts,
const Point verts 
)

Constructor.

inline_ Opcode::Sphere::Sphere ( const Sphere sphere)
inline

Copy constructor.

Definition at line 35 of file Opcode.h.

39 {
inline_ Opcode::Sphere::~Sphere ( )
inline

Destructor.

Definition at line 37 of file Opcode.h.

39 {

Member Function Documentation

inline_ const Point& Opcode::Sphere::Center ( ) const
inline

Definition at line 46 of file Opcode.h.

BSphereMethod Opcode::Sphere::Compute ( udword  nb_verts,
const Point verts 
)
inline_ bool Opcode::Sphere::Contains ( const Point p) const
inline

Tests if a point is contained within the sphere.

Parameters
p[in] the point to test
Returns
true if inside the sphere

Definition at line 60 of file Opcode.h.

inline_ bool Opcode::Sphere::Contains ( const Sphere sphere) const
inline

Tests if a sphere is contained within the sphere.

Parameters
sphere[in] the sphere to test
Returns
true if inside the sphere

Definition at line 72 of file Opcode.h.

inline_ BOOL Opcode::Sphere::Contains ( const AABB aabb) const
inline

Tests if a box is contained within the sphere.

Parameters
aabb[in] the box to test
Returns
true if inside the sphere

Definition at line 88 of file Opcode.h.

bool Opcode::Sphere::FastCompute ( udword  nb_verts,
const Point verts 
)
inline_ const Point& Opcode::Sphere::GetCenter ( ) const
inline

Definition at line 43 of file Opcode.h.

inline_ float Opcode::Sphere::GetRadius ( ) const
inline

Definition at line 44 of file Opcode.h.

inline_ bool Opcode::Sphere::Intersect ( const Sphere sphere) const
inline

Tests if the sphere intersects another sphere

Parameters
sphere[in] the other sphere
Returns
true if spheres overlap

Definition at line 120 of file Opcode.h.

inline_ BOOL Opcode::Sphere::IsValid ( ) const
inline

Checks the sphere is valid.

Returns
true if the box is valid

Definition at line 132 of file Opcode.h.

inline_ float Opcode::Sphere::Radius ( ) const
inline

Definition at line 47 of file Opcode.h.

inline_ Sphere& Opcode::Sphere::Set ( const Point center,
float  radius 
)
inline

Definition at line 49 of file Opcode.h.

inline_ Sphere& Opcode::Sphere::SetCenter ( const Point center)
inline

Definition at line 50 of file Opcode.h.

inline_ Sphere& Opcode::Sphere::SetRadius ( float  radius)
inline

Definition at line 51 of file Opcode.h.

Member Data Documentation

Point Opcode::Sphere::mCenter

Sphere center.

Definition at line 139 of file Opcode.h.

float Opcode::Sphere::mRadius

Sphere radius.

Definition at line 140 of file Opcode.h.


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