12#ifndef CVisualRBQuat_H
13#define CVisualRBQuat_H
27#include "sfh/math/math.h"
28#include "sfh/sim/kinematics.h"
29#include "sfh/constants.h"
32namespace Visualization {
34typedef Eigen::Matrix<double, 3, 1> vec3;
35typedef Eigen::Matrix<int, 3, 1> vec3i;
36typedef Eigen::Quaternion<double> quat;
41 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
44 CVisualRBQuat(std::string sSimObjectName, ISimObjectCreator* pCreator);
46 virtual void InitialConditionSetup(
const double T,
const double*
const X,
double*
const XDot, ISimObjectCreator* pCreator);
48 virtual void OdeFcn(
const double T,
const double*
const X,
double*
const XDot,
const bool bIsMajorTimeStep);
50#ifdef FH_VISUALIZATION
52 virtual void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const pCreator);
55 virtual void RenderUpdate(
const double T,
const double*
const X);
63 std::vector<int> m_DOFIndex;
70 ISignalPort* m_ForceIn;
71 ISignalPort* m_InQuat;
73 ISignalPort* m_InOmega;
76 double m_DOFDirections[6];
78 const double* PositionNED(
const double T,
const double*
const X);
80 const double* QuaternionNED(
const double T,
const double*
const X);
81 double m_ForceCoeffs[6];
83 const double* ForceOut(
const double T,
const double*
const X);
85 const double* VelocityNED(
const double T,
const double*
const X);
87#ifdef FH_VISUALIZATION
88 Ogre::SceneNode* m_RenderNode;
89 Ogre::SceneManager* m_SceneMgr;
Definition: CVisualRBQuat.h:39
virtual void OdeFcn(const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep)
Calculate the state derivatives.