Marine systems simulation
CCollision.h
1#pragma once
2//@group{marine_elements,RMCable,CCollision,Cable Collision}
56#include <Eigen/Eigen>
57#pragma warning(push)
58#pragma warning( disable : 4996)
59#include <unsupported/Eigen/SparseExtra>
60#pragma warning(pop)
61
62#include <SimObject.h>
63#ifdef FH_VISUALIZATION
64 #include "sfh/ogre/C3DLine.h"
65#endif
66
67namespace RbCable
68{
69 class CCollision : public SimObject
70 {
71 public:
72 CCollision(const string& simObjectName, ISimObjectCreator* const creator);
74 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
75 // void InitialConditionSetup(const double T, const double *const currentIC, double* const updatedIC, ISimObjectCreator* const creator);
76
77 const double* energy(const double T, const double* const X);
78 const double* momentum(const double T, const double* const X);
79
80#ifdef FH_VISUALIZATION
81 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
82 void RenderUpdate( const double T, const double* const X);
83#endif
84
85 protected:
86 typedef Eigen::Matrix<double,3,3> mat3;
87 typedef Eigen::Matrix<double,3,1> vec3;
88
89
90 int m_NUM;
91 int m_CON;
92
93 double m_radius;
94 double m_mass;
95 double m_alpha;
96 double m_beta;
97 double m_epsilon;
98
99 double m_spring;
100 double m_damping;
101
102 struct element {int p;int v;};
103 element* m_el;
104
105 double m_systemEnergy[3];
106 double m_systemMomentum[3];
107
108 struct contact {int a; int b; double D;};
109
110
111
112#ifdef FH_VISUALIZATION
113 Ogre::SceneNode** m_ManualObjectNodes;
114#endif
115 };
116
117}
Definition: CCollision.h:70
CCollision(const string &simObjectName, ISimObjectCreator *const creator)
reads parameters, registers states, output and intput ports.
Definition: CCollision.h:108
Definition: CCollision.h:102