diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-02-21 22:30:11 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-02-21 22:30:11 +0400 |
commit | 815e00917dcb4137f9687ab602f527920fa8c41d (patch) | |
tree | 4c089bc7f19a9249f59428268c8aa99edad1b438 /source/gameengine/Physics/common/PHY_DynamicTypes.h | |
parent | 6b600d079351fa5490d74d5661c47346196e57f3 (diff) |
BGE cleanup: Removing the PHY__Vector classes and replacing them with MT_Vectors. The PHY__Vectors didn't offer anything (not even any real abstraction) and they required annoying MT_Vector <-> PHY_Vector conversions all over the place. No functional changes.
Diffstat (limited to 'source/gameengine/Physics/common/PHY_DynamicTypes.h')
-rw-r--r-- | source/gameengine/Physics/common/PHY_DynamicTypes.h | 71 |
1 files changed, 4 insertions, 67 deletions
diff --git a/source/gameengine/Physics/common/PHY_DynamicTypes.h b/source/gameengine/Physics/common/PHY_DynamicTypes.h index 0fe2533cf93..d10f48ad7a4 100644 --- a/source/gameengine/Physics/common/PHY_DynamicTypes.h +++ b/source/gameengine/Physics/common/PHY_DynamicTypes.h @@ -20,69 +20,9 @@ subject to the following restrictions: #ifndef __PHY_DYNAMICTYPES_H__ #define __PHY_DYNAMICTYPES_H__ - +#include "MT_Vector3.h" struct KX_ClientObjectInfo; -class PHY_Shape; - -struct PHY__Vector2 -{ - float m_vec[2]; - - operator const float* () const - { - return &m_vec[0]; - } - operator float* () - { - return &m_vec[0]; - } -}; - -struct PHY__Vector3 -{ - float m_vec[4]; - - operator const float* () const - { - return &m_vec[0]; - } - operator float* () - { - return &m_vec[0]; - } -}; - -struct PHY__Vector4 -{ - float m_vec[4]; - PHY__Vector4() {} - void setValue(const float *value) - { - m_vec[0] = *value++; - m_vec[1] = *value++; - m_vec[2] = *value++; - m_vec[3] = *value++; - } - void setValue(const double *value) - { - m_vec[0] = (float)(*value++); - m_vec[1] = (float)(*value++); - m_vec[2] = (float)(*value++); - m_vec[3] = (float)(*value++); - } - - operator const float* () const - { - return &m_vec[0]; - } - operator float* () - { - return &m_vec[0]; - } -}; - -//typedef float PHY__Vector3[4]; enum { @@ -97,9 +37,9 @@ enum }; typedef struct PHY_CollData { - PHY__Vector3 m_point1; /* Point in object1 in world coordinates */ - PHY__Vector3 m_point2; /* Point in object2 in world coordinates */ - PHY__Vector3 m_normal; /* point2 - point1 */ + MT_Vector3 m_point1; /* Point in object1 in world coordinates */ + MT_Vector3 m_point2; /* Point in object2 in world coordinates */ + MT_Vector3 m_normal; /* point2 - point1 */ } PHY_CollData; @@ -148,7 +88,4 @@ typedef enum PHY_ShapeType { PHY_SHAPE_PROXY } PHY_ShapeType; - -typedef float PHY_Vector3[3]; - #endif /* __PHY_DYNAMICTYPES_H__ */ |