V-ART
sphere.h
Go to the documentation of this file.
1 
5 #ifndef VART_SPHERE_H
6 #define VART_SPHERE_H
7 
8 #include "vart/graphicobj.h"
9 #include "vart/material.h"
10 
11 namespace VART {
16  class Sphere : public GraphicObj {
17  public:
18  Sphere();
20  Sphere(const VART::Sphere& sphere);
21 
22  Sphere( float fRad );
23 
25  VART::Sphere & operator=(const VART::Sphere & sphere);
26 
29  virtual VART::SceneNode * Copy();
30 
31  void SetRadius( float r );
33  void SetMaterial(const Material& mat) { material = mat; }
35  Material GetMaterial() const { return material; }
36  float GetRadius();
39  bool DrawInstanceOGL() const;
40  virtual void ComputeBoundingBox();
41  private:
42  Material material;
43  float radius;
44  }; // end class declaration
45 } // end namespace
46 #endif
Base class for objects that compose a scene graph.
Definition: scenenode.h:25
Header file for V-ART class "Material".
Header file for V-ART class "GraphicObj".
void SetRadius(float r)
Definition: sphere.cpp:44
virtual VART::SceneNode * Copy()
Returns a copy of an Sphere. Every derived class must reimplements this method, to avoid errors with ...
Definition: sphere.cpp:34
Material GetMaterial() const
Returns of copy of the cylinder's material.
Definition: sphere.h:35
float GetRadius()
Definition: sphere.cpp:49
A sphere.
Definition: sphere.h:16
bool DrawInstanceOGL() const
Draws the sphere using OpenGL engine.
Definition: sphere.cpp:63
An scene node that is associated with a shape.
Definition: graphicobj.h:18
virtual void ComputeBoundingBox()
Computes the bounding box.
Definition: sphere.cpp:53
Material properties for graphical objects.
Definition: material.h:16
void SetMaterial(const Material &mat)
Material assignment.
Definition: sphere.h:33
VART::Sphere & operator=(const VART::Sphere &sphere)
Copies all Sphere data to another sphere.
Definition: sphere.cpp:26