Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

KX_IPO_SGController.h

Go to the documentation of this file.
00001 #ifndef __IPO_SGCONTROLLER_H
00002 #define __IPO_SGCONTROLLER_H
00003 
00004 #include "SG_Controller.h"
00005 #include "SG_Spatial.h"
00006 
00007 #include "KX_IPOTransform.h"
00008 #include "KX_IInterpolator.h"
00009 
00010 typedef std::vector<KX_IInterpolator *> T_InterpolatorList;
00011 
00012 class KX_IpoSGController : public SG_Controller
00013 {
00014         KX_IPOTransform m_ipo_xform;
00015         T_InterpolatorList      m_interpolators;
00016         short                           m_modify_position        : 1;
00017         short                           m_modify_orientation : 1;
00018         short                           m_modify_scaling         : 1;
00019         bool                            m_modified;
00020 
00021         double          m_ipotime;
00022 public:
00023         KX_IpoSGController() : m_ipotime(0),
00024         m_modify_position(false),
00025         m_modify_orientation(false),
00026         m_modify_scaling(false),
00027         m_modified(true)
00028         {
00029         };
00030         virtual ~KX_IpoSGController()

00031         {
00032 
00033         }
00034 
00035         virtual SG_Controller*  GetReplica();
00036 
00037         void    SetModifyPosition(bool modifypos) {     
00038                 m_modify_position=modifypos;
00039         }
00040         void    SetModifyOrientation(bool modifyorient) {       
00041                 m_modify_orientation=modifyorient;
00042         }
00043         void    SetModifyScaling(bool modifyscale) {    
00044                 m_modify_scaling=modifyscale;
00045         }
00046         
00047         KX_IPOTransform& GetIPOTransform()

00048         {
00049                 return m_ipo_xform;
00050         }
00051         void    AddInterpolator(KX_IInterpolator* interp);
00052         virtual bool Update(double time);
00053         virtual void    SetSimulatedTime(double time)

00054         {
00055                 m_ipotime = time;
00056                 m_modified = true;
00057         }
00058 };
00059 #endif //__IPO_SGCONTROLLER_H

Generated at Thu Feb 1 13:03:05 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000