00001 #ifndef PHINTERSECTION_H
00002 #define PHINTERSECTION_H
00003 #include <Collision/CDFramePair.h>
00004 #include <Collision/CDDetectorImp.h>
00005 #include <Physics/PHSolid.h>
00006
00007 namespace Spr{;
00008
00009 class PHConvexPair:public CDConvexPairWithNormal, public CDContactAnalysis{
00010 public:
00011
00012 float area;
00013 Vec3f reflexSpringForce;
00014 Vec3f reflexDamperForce;
00015 Vec3f reflexSpringTorque;
00016 Vec3f reflexDamperTorque;
00017 Vec3f reflexForcePoint;
00018
00019
00020 Vec3f transFrictionBase[2];
00021 Vec3f rotFricSpring;
00022 Quaternionf lastOri01;
00023 Vec3f dynaFric;
00024 Vec3f dynaFricMom;
00025 Vec3f frictionForce;
00026 Vec3f frictionTorque;
00027
00028
00029 float rk, rb, fk, fb;
00030
00031
00032
00033 void CalcReflexForce(Vec3f* cog, Vec3f* vel, Vec3f* angVel, float k, float b);
00034
00035 void CalcTriangleReflexForce(Vec3f p, Vec3f p1, Vec3f p2, Vec3f cog, Vec3f vel, Vec3f angVel, float k, float b);
00036
00037 void CalcFriction(Quaternionf* ori, Vec3f* pos, Vec3f* cog, Vec3f* vel, Vec3f* angVel, float k, float b);
00038
00039
00040
00041
00042 void CalcReflexForce(Vec3f* cog, Vec3f* vel, Vec3f* angVel, float rk, float rb, float fk, float fb);
00043
00044
00045 void CalcTriangleReflexForce(Vec3f p, Vec3f p1, Vec3f p2, Vec3f cog, Vec3f vel, Vec3f angVel, float rk, float rb, float fk, float fb);
00046 };
00047 class PHGeometryPair:public CDGeometryPair{
00048 };
00049
00050 };
00051 #endif