00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "OctreeODEEngine.h"
00013 #include "ConstrainedVertex.h"
00014
00015
00016 namespace animal {
00017
00018 namespace octree {
00019
00020 OctreeODEEngine::OctreeODEEngine(Vec3d bboxMin, Vec3d bboxMax, MFVec3f *points, MFVec3f normals, unsigned int nMaxPointsPerCell)
00021 : OctreeEngine(bboxMin, bboxMax, points, normals, nMaxPointsPerCell)
00022 {
00023 }
00024
00025
00026 OctreeODEEngine::~OctreeODEEngine()
00027 {
00028 }
00029
00030 void OctreeODEEngine::integrate_VVerlet( FloatingPointType h )
00031
00032
00033
00034 {
00035 int a= ConstrainedVertex::ACC;
00036
00037
00038 compute_accelerations(ConstrainedVertex::ACC, ConstrainedVertex::POS, ConstrainedVertex::VEL);
00039
00040
00041 v_eq_a_plus_alpha_b(ConstrainedVertex::VELHALF, ConstrainedVertex::VEL, h/2, ConstrainedVertex::ACC);
00042
00043
00044 v_eq_a_plus_alpha_b(ConstrainedVertex::POS, ConstrainedVertex::POS, h, ConstrainedVertex::VELHALF );
00045
00046
00047
00048 compute_accelerations(ConstrainedVertex::ACC, ConstrainedVertex::POS, ConstrainedVertex::VELHALF);
00049
00050
00051 v_eq_a_plus_alpha_b(ConstrainedVertex::VEL, ConstrainedVertex::VELHALF, h/2, ConstrainedVertex::ACC);
00052
00053 }
00054
00055 };
00056
00057 };