00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TA_COLLISIONSHARED_H
00014 #define TA_COLLISIONSHARED_H
00015
00016 #ifndef TA_MFRAME_H
00017 #include "../Common/MFrame.h"
00018 #endif // TA_MFRAME_H
00019
00020 #ifndef TA_COLLISION_H
00021 #include "Collision.h"
00022 #endif // TA_COLLISION_H
00023
00024 namespace TA
00025 {
00026
00027
00028
00029 bool TAC_CALL CollisionShared_NewCollision(Collision& collision, CollisionCallData* pCollisionCallbackData);
00030
00031
00032
00033 bool TAC_CALL CollisionShared_NewCollisionWithComplex(Collision& collision, CollisionCallData* pCollisionCallbackData);
00034
00035
00036
00037 int TAC_CALL CollisionShared_SolveQuartic(float fB, float fC, float fD, float fE, float pfRootList[4]);
00038
00039
00040
00041 bool TAC_CALL CollisionShared_LineVsQuarterTorus(
00042 const Vec3& v3Line0,
00043 const Vec3& v3Line1,
00044 const Vec3& v3TorusCenter,
00045 const Vec3& v3TorusNormal,
00046 float fRadius1,
00047 float fRadius2,
00048 float& fResultTime,
00049 Vec3& v3ResultPos,
00050 Vec3& v3ResultNormal);
00051
00052
00053
00054 inline int TAC_CALL CollisionShared_Next(int nValue, int nMaxValue)
00055 {
00056 int nNext = nValue + 1;
00057 if (nNext >= nMaxValue)
00058 nNext = 0;
00059 return nNext;
00060
00061
00062
00063
00064
00065 }
00066
00067
00068 inline int TAC_CALL CollisionShared_Prev(int nValue, int nMaxValue)
00069 {
00070 int nNext = nValue - 1;
00071 if (nNext < 0)
00072 nNext = nMaxValue - 1;
00073 return nNext;
00074 }
00075
00076 }
00077
00078 #endif // TA_COLLISIONSHARED_H
© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.