1#ifndef C_CROWFOOT_MATH_H
2#define C_CROWFOOT_MATH_H
28#ifdef FH_VISUALIZATION
30#pragma warning( disable : 4251)
33# include "cable/subroutines/CInternalCable.h"
45 Eigen::Vector3d fasteningPos;
53 std::string materialName;
58 materialName =
"Trawl/SteelWire";
79 int AddLine(
double length,
const double *
const fasteningpos);
88 void Update(
const double *
const F,
double *
const posOut);
99 void CalcIterativePos(
const double *
const F,
double *
const posOut,
int maxNumIter = 500,
double expectedLengthToGo = 3.0,
100 double tolerance = 0.00001);
139#ifdef FH_VISUALIZATION
141 virtual void RenderInit(Ogre::Root*
const pOgreRoot, Ogre::SceneManager* m_pSceneMgr, std::string m_SimObjectName);
144 virtual void RenderUpdate(std::vector<const double*>& aadPos,
const double adPosCollectingPoint[3]);
149 void CalcForOneLine(
const Eigen::Vector3d& Force,
const Eigen::Vector3d& ForceDir,
double *
const posOut);
152 void CalcForTwoLines(
const Eigen::Vector3d& Force,
const Eigen::Vector3d& ForceDir,
double *
const posOut);
155 void CalcForThreeLines(
const Eigen::Vector3d&,
const Eigen::Vector3d& ForceDir,
double *
const posOut);
164 void CalcForOneActive(
int index,
const Eigen::Vector3d&,
const Eigen::Vector3d& pos,
double *
const posOut);
167 void CalcForTwoActive(
int index1,
int index2,
const Eigen::Vector3d& Force, Eigen::Vector3d pos,
double *
const posOut);
170 void SetPosition(
double *
const posOut,
const Eigen::Vector3d &pos );
178 std::vector<LineDef> m_lines;
179 std::vector<Eigen::Vector3d> m_lineForces;
181 double m_maxLineForce;
185# ifdef CROWFOOTMATH_DEBUG_RENDERING
186 Eigen::Vector3f DEBUG_poss0;
187 Eigen::Vector3f DEBUG_poss1;
188 Eigen::Vector3f DEBUG_ForceDir;
191# ifdef FH_VISUALIZATION
192 std::vector<SCableRenderSpec*> m_RenderSpecs;
193 std::vector<Ogre::ManualObject*> m_RenderObjects;
195 Ogre::SceneNode* m_lineSceneNode;
198# ifdef CROWFOOTMATH_DEBUG_RENDERING
199 Ogre::Entity* m_pRenderSphere[2];
200 Ogre::SceneNode* m_pRenderNodeSphere[2];
201 CDynamicLines* m_pLines;
202 Ogre::SceneNode* m_debugLineSceneNode;