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

KX_IPOTransform.h

Go to the documentation of this file.
00001 
00006 
00007 #ifndef KX_IPOTRANSFORM_H
00008 #define KX_IPOTRANSFORM_H
00009 
00010 #include "MT_Transform.h"
00011 
00012 class KX_IPOTransform {
00013 public:
00014         KX_IPOTransform() :
00015                 m_position(0.0, 0.0, 0.0),
00016                 m_eulerAngles(0.0, 0.0, 0.0),
00017                 m_scaling(1.0, 1.0, 1.0),
00018                 m_deltaPosition(0.0, 0.0, 0.0),
00019                 m_deltaEulerAngles(0.0, 0.0, 0.0),
00020                 m_deltaScaling(0.0, 0.0, 0.0)
00021                 {}
00022 
00023         MT_Transform         GetTransform() const {
00024                 return MT_Transform(m_position + m_deltaPosition,
00025                                                         MT_Matrix3x3(m_eulerAngles + m_deltaEulerAngles,
00026                                                                                  m_scaling + m_deltaScaling));
00027         }
00028 
00029         MT_Point3&               GetPosition()          { return m_position;    }
00030         MT_Vector3&          GetEulerAngles()       { return m_eulerAngles;     }
00031         MT_Vector3&          GetScaling()           { return m_scaling; }
00032 
00033         const MT_Point3&         GetPosition()    const { return m_position;    }
00034         const MT_Vector3&    GetEulerAngles() const { return m_eulerAngles;     }
00035         const MT_Vector3&    GetScaling()     const { return m_scaling; }
00036         
00037         MT_Vector3&          GetDeltaPosition()     { return m_deltaPosition; }
00038         MT_Vector3&          GetDeltaEulerAngles()  { return m_deltaEulerAngles; }
00039         MT_Vector3&          GetDeltaScaling()      { return m_deltaScaling; }
00040         
00041         void SetPosition(const MT_Point3& pos)      { m_position = pos;         }
00042         void SetEulerAngles(const MT_Vector3& eul)  { m_eulerAngles = eul;      }
00043         void SetScaling(const MT_Vector3& scaling)  { m_scaling = scaling;      }
00044         
00045         void ClearDeltaStuff() { 
00046                 m_deltaPosition.setValue(0.0, 0.0, 0.0);
00047                 m_deltaEulerAngles.setValue(0.0, 0.0, 0.0);
00048                 m_deltaScaling.setValue(0.0, 0.0, 0.0);
00049         }
00050 
00051 protected:
00052         MT_Point3              m_position;
00053         MT_Vector3             m_eulerAngles;
00054         MT_Vector3             m_scaling;
00055         MT_Vector3             m_deltaPosition;
00056         MT_Vector3             m_deltaEulerAngles;
00057         MT_Vector3             m_deltaScaling;
00058 };
00059 
00060 #endif
00061 
00062 
00063 
00064 

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