3#include "JointConstraint.h"
4#include "CollisionManager.h"
10#include <sfh/ogre/C3DLine.h>
18 virtual vec3 Current (
double T,
const double* X,
const double* Position) = 0;
19 virtual double OceanSurfaceElevation(
double T,
const double* X,
const double* Position) = 0;
20 virtual void CurrentQuery(
double T,
const double* X,
const vec3& Position, vec3& current,
double& surface_elevation,
double& density) = 0;
21 virtual double SeaDepth (
const double* Position) = 0;
25 class DiscreteElement;
28 class SupergridLineStructure;
39static const mat6 Identity_memory = mat6::Identity();
44 void SetDiscreteElement(
DiscreteElement* discrete_element){m_discrete_element = discrete_element;}
51 virtual void Setup(
double T,
const double *
const X);
52 virtual const mat6& InertialMatrix();
55 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
59 mat6 m_FullInertiaMatrix;
101 virtual void Setup(
double T,
const double *
const X, mat6& InertiaMatrix, vec6& Force) = 0;
103 double GetElementLength();
104 double GetElementRadius();
105 double GetElementMass();
113 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
144 virtual void OverrideStates(
double T,
double * X);
149 virtual void GetTempStates( vec3& P, Quat& Q, vec3& V, vec3& W);
151 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
158 std::vector<DiscreteElement*> m_sub_element;
179 cable_spec (
double Diameter,
double rho,
double E);
183 LineSegment(cable_spec spec,
double segment_length);
187 const std::vector<DiscreteElement*>* GetDiscreteElements();
190 const cable_spec& GetCableSpecification();
191 double GetAxialStiffness(){
return m_cable_spec.
EA;}
192 double GetBendingStiffness(){
return m_cable_spec.
EI;}
193 double GetStabilizer(){
return m_cable_spec.
Stabilizer;}
195 double GetSegmentLength();
196 double GetCableStartPosition();
199 CollisionManager::MaterialCharacteristic GetMaterialCharacteristic(){
return m_material_characteristics;}
201 virtual void XmlInfo(TiXmlElement& xml_node);
202 virtual std::string GetSegmentTypeName() = 0;
204#ifdef FH_VISUALIZATION
205 std::string Material(){
return m_material;}
206 double GetMaxTension(){
return m_max_tension;}
207 void SetMaxTension(
double max_tension){m_max_tension = max_tension;}
210 virtual void SetLineStructure(SupergridLineStructure* linestructure);
212 cable_spec m_cable_spec;
214 double m_line_structure_start_length;
215 int m_line_structure_ix;
216 CollisionManager::MaterialCharacteristic m_material_characteristics;
218 SupergridLineStructure* m_line_structure;
219 std::vector<DiscreteElement*> m_discrete_element;
221#ifdef FH_VISUALIZATION
222 double m_max_tension;
223 std::string m_material;
279 virtual void XmlInfo(TiXmlElement& xml_node);
283#ifdef FH_VISUALIZATION
284 virtual void RenderInit(Ogre::Root*
const ogreRoot);
285 virtual void RenderUpdate(
const double T,
const double*
const X);
286 void UpdateData(
const double*
const X);
287 virtual Ogre::ColourValue Color(
size_t ix);
288 void SetHQ_Render(
bool HQ_render){m_HQ_render = HQ_render;}
289 static double log_scale(
const double max_limit,
double x);
290 static Ogre::ColourValue RYGCBM(
double f);
301 std::vector<ModifiableRigidElement*> m_rigid_element_buffer;
302 std::vector<LineSegment*> m_segment;
303 std::vector<DiscreteElement*> m_super_element;
304 std::vector<double> m_rigid_element_tension;
307#ifdef FH_VISUALIZATION
309 std::vector<Ogre::SceneNode*> m_nodes;
311 int m_colour_counter;
Definition: ConstraintSolver.h:31
Definition: SupergridLineStructure.h:15
Definition: JointConstraint.h:17
Definition: ObjectFactoryStack.h:22
Definition: RigidElement.h:15
int ix_Q()
index of Position state
Definition: RigidElement.h:42
int ix_W()
index of Velocity state
Definition: RigidElement.h:44
int ix_V()
index of Orientation state
Definition: RigidElement.h:43
int ix_P()
Angular velocity.
Definition: RigidElement.h:41
Definition: SupergridLineStructure.h:73
LineSegment * GetLineSegment()
DiscreteElement * GetSuperElement()
const std::vector< DiscreteElement * > * GetSubElements()
ModifiableRigidElement * GetRigidElement()
Definition: SupergridLineStructure.h:170
Definition: SupergridLineStructure.h:40
DiscreteElement * GetDiscreteElement()
virtual void Setup(double T, const double *const X)
virtual const vec6 & Forces()
full 6x6 Inertia Matrix
Definition: SupergridLineStructure.h:237
virtual void AddSegment(LineSegment *l)
SupergridLineStructure(ConstraintSolver *solver, ISimObjectCreator *creator, Environment_Interface *environment, int rigid_element_buffer_size, double beta, std::string name)
const std::vector< DiscreteElement * > * GetDiscreteElements()
double GetBeta()
Computes structural connections.
const std::vector< double > * GetRigidElementTension()
virtual void ComputeConstraints(const double T, const double *const X)
const std::vector< LineSegment * > * GetLineSegments()
const std::vector< ModifiableRigidElement * > * GetRigidElements()
Definition: CollisionManager.h:6
Definition: SupergridLineStructure.h:108
Definition: SupergridLineStructure.h:172
double Stabilizer
youngs modulus times cross section second area moment [Pa*m^4] or [N*m^2]
Definition: SupergridLineStructure.h:177
double W
diameter [m]
Definition: SupergridLineStructure.h:174
double EA
weight [kg/m]
Definition: SupergridLineStructure.h:175
double EI
youngs modulus times cross section area [Pa*m^2] or [N]
Definition: SupergridLineStructure.h:176