Line data Source code
1 : /**
2 : * @file Sphere.h
3 : * @brief represent and operate on a sphere.
4 : *
5 : * Sphere class.
6 : */
7 : #ifndef _SPHERE_H_
8 : #define _SPHERE_H_
9 :
10 : #include "Matrix.h"
11 : #include "Vector.h"
12 :
13 : class Sphere {
14 : public:
15 : Sphere();
16 : ~Sphere();
17 :
18 : void setSphere(const float& x, const float& y, const float& z, const float& radius);
19 :
20 : void getOriginVector(Vector&) const;
21 : float getRadius() const;
22 2 : void setOriginVector(const Vector &v) { x = v.x; y = v.y; z = v.z; }
23 :
24 : private:
25 : float x, y, z; // origin
26 : float radius;
27 : };
28 :
29 : #endif
|