Marine systems simulation
ShipContact.h
1#pragma once
2
3#include "SimObject.h"
4#include "CollisionManager.h"
5
6
8public:
9 typedef std::vector<CoRiBoDynamics::CollisionManager::InternalObject,Eigen::aligned_allocator<CoRiBoDynamics::CollisionManager::InternalObject>> GeometryVector;
10
11 virtual GeometryVector CheckForContact(CoRiBoDynamics::CollisionManager::ExternalObject& object) = 0;
12};
13
14
16public:
17 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
18
19 ShipContact(ISimObjectCreator* creator, CoRiBoDynamics::ConstraintSolver* solver, double beta);
20
21 void Update(const double * P,const double * Q, const double * V, const double * W);
22
23 void ComputeConstraints(const double T, const double * const X);
24
25 double m_Force[3];
26 double m_Torque[3];
27
28 void AddCollisionCheckInterface(CollisionCheckInterface* i){m_collision_interfaces.push_back(i);}
29
30#ifdef FH_VISUALIZATION
31 void RenderInit(Ogre::Root* const ogreRoot);
32 void RenderUpdate();
33 Ogre::SceneNode* m_node;
34#endif
35
36protected:
37
38 std::vector<CollisionCheckInterface*> m_collision_interfaces;
39
40 Eigen::Quaterniond m_capsule_rotation_offset;
41 Eigen::Vector3d m_capsule_offset;
42 Eigen::Vector3d m_offset_arm_global;
43
44 double m_Q[4];
45 double m_W[3];
46 double m_P[3];
47 double m_V[3];
48 ExternalObject m_capsule;
49};
Definition: CollisionManager.h:135
Definition: CollisionManager.h:37
Definition: ConstraintSolver.h:31
Definition: ShipContact.h:7
Definition: ShipContact.h:15
void ComputeConstraints(const double T, const double *const X)