Main Page   Class Hierarchy   Compound List   File List   Compound Members  

animobject.h

00001 #ifndef _ANIM_OBJECT_H_
00002 #define _ANIM_OBJECT_H_
00003 
00004 // std includes
00005 #include <string>
00006 
00007 // csl includes
00008 
00009 #include "../../csl/base/gmlsmartobject.h"
00010 #include "../../csl/math/gmlvector3.h"
00011 
00012 
00013 namespace cganim
00014   {
00015   
00021   class AnimObject: public gml::SmartObject
00022     {
00023     public:
00024 
00026     AnimObject()
00027       : m_velocity(0.0), m_mass(1), m_color(0.7, 0.7, 0.7), m_ks(0), m_matte(1)
00028       {}
00029 
00031     gml::Vector3d GetVelocity() const
00032       { 
00033       return m_velocity; 
00034       }
00035 
00037     void SetVelocity(const gml::Vector3d& new_velocity)
00038       {
00039       m_velocity = new_velocity;
00040       }
00041 
00043     double GetMass() const
00044       {
00045       return m_mass;
00046       }
00047 
00049     void SetMass(double new_mass)
00050       {
00051       m_mass = new_mass;
00052       }
00053 
00055     gml::Vector3d GetColor() const
00056       {
00057       return m_color;
00058       }
00059 
00061     void SetColor(const gml::Vector3d& new_color)
00062       {
00063       m_color = new_color;
00064       }
00065 
00067     std::string GetTexture() const
00068       {
00069       return m_texture;
00070       }
00071 
00073     void SetTexture(const std::string& texture)
00074       {
00075       m_texture = texture;
00076       }
00077 
00079     double GetSpecularLevel() const
00080       {
00081       return m_ks;
00082       }
00083 
00085     void SetSpecularLevel(double ks)
00086       {
00087       m_ks = ks;
00088       }
00089 
00091     void SetMatte(double matte)
00092       {
00093       m_matte = matte;
00094       }
00095 
00097     double GetMatte() const
00098       {
00099       return m_matte;
00100       }
00101 
00102     private:
00103 
00105       gml::Vector3d m_velocity;
00106 
00108       double m_mass;
00109 
00111       gml::Vector3d m_color;
00112 
00113 
00115       std::string m_texture;
00116 
00118       double m_ks;
00119 
00121       double m_matte;
00122     };
00123 
00124   }
00125 #endif

Generated on Wed May 5 13:20:39 2004 for AnimDatalibrary by doxygen1.3