CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csSphere Class Reference
[Geometry utilities]

This class represents a sphere. More...

#include <sphere.h>

List of all members.

Public Methods

 csSphere ()
 Create a new empty sphere at (0,0,0). More...

 csSphere (const csVector3 &center, float radius)
 Create a new sphere. More...

 csSphere (const csSphere &s)
 Copy Constructor. More...

csVector3 & GetCenter ()
 Get the center of this sphere. More...

const csVector3 & GetCenter () const
 Get the center of this sphere. More...

void SetCenter (const csVector3 &c)
 Set the center of this sphere. More...

float GetRadius () const
 Get the radius of this sphere. More...

void SetRadius (float r)
 Set the radius of this sphere. More...

void Union (const csVector3 &ocenter, float oradius)
 Calculate the union of this sphere and another. More...

csSphere & operator+= (const csSphere &s)
 Calculate the union of this sphere and another one. More...


Friends

csSphere operator+ (const csSphere &s1, const csSphere &s2)
 Calculate the union of two spheres. More...


Detailed Description

This class represents a sphere.

Definition at line 36 of file sphere.h.


Constructor & Destructor Documentation

csSphere::csSphere (    )  [inline]
 

Create a new empty sphere at (0,0,0).

Definition at line 44 of file sphere.h.

References csVector3::Set.

csSphere::csSphere (  const csVector3 &    center,
float    radius
)  [inline]
 

Create a new sphere.

Definition at line 51 of file sphere.h.

csSphere::csSphere (  const csSphere &    s )  [inline]
 

Copy Constructor.

Definition at line 58 of file sphere.h.

References center, and radius.


Member Function Documentation

const csVector3& csSphere::GetCenter (    )  const [inline]
 

Get the center of this sphere.

Definition at line 63 of file sphere.h.

csVector3& csSphere::GetCenter (    )  [inline]
 

Get the center of this sphere.

Definition at line 61 of file sphere.h.

float csSphere::GetRadius (    )  const [inline]
 

Get the radius of this sphere.

Definition at line 67 of file sphere.h.

csSphere& csSphere::operator+= (  const csSphere &    s )  [inline]
 

Calculate the union of this sphere and another one.

Definition at line 77 of file sphere.h.

References center, radius, and Union.

void csSphere::SetCenter (  const csVector3 &    c )  [inline]
 

Set the center of this sphere.

Definition at line 65 of file sphere.h.

void csSphere::SetRadius (  float    r )  [inline]
 

Set the radius of this sphere.

Definition at line 69 of file sphere.h.

void csSphere::Union (  const csVector3 &    ocenter,
float    oradius
) 
 

Calculate the union of this sphere and another.

Referenced by operator+=.


Friends And Related Function Documentation

csSphere operator+ (  const csSphere &    s1,
const csSphere &    s2
)  [friend]
 

Calculate the union of two spheres.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14