00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef OPENCAL_SPHERE_H
00012
#define OPENCAL_SPHERE_H
00013
00014
00015
#include <OpenCAL/global.h>
00016
#include <OpenCAL/RigidBody.h>
00017
00018
namespace OpenCAL
00019 {
00020
00021
00025 class OPENCAL_API Sphere:
public RigidBody
00026 {
00027
protected:
00028
00029
float m_radius;
00030
00031
public:
00032
00033 Sphere(
System *parent,
float radius = 1.0f,
float mass = 1.0f);
00034
virtual ~Sphere();
00035
00036
00037
float getRadius()
const {
return m_radius; }
00038
00039
00040
void setRadius(
float radius) { m_radius = radius; }
00041
00042
00043
virtual void render();
00044
00045
virtual void calculateVolume();
00046
virtual void calculateInversedInertia();
00047
00048
00049
00050
00051
00052 };
00053 }
00054
00055
#endif // OPENCAL_SPHERE_H