3#include <eigen_matrix_defs.h>
5#include <CEnvironment.h>
9#include <sfh/ogre/C3DLine.h>
12typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> MatriX;
16 void Init(
double diameter,
int num_circumference,
double height);
17 void InitStates(CoRiBoDynamics::Vector& PA, CoRiBoDynamics::Vector& PB);
19 CoRiBoDynamics::Vector Points(CoRiBoDynamics::Vector& PA, CoRiBoDynamics::Vector& PB,
double T,
const double * X);
21 int cols() {
return m_nc; }
22 int rows() {
return m_nr; }
24#ifdef FH_VISUALIZATION
25 void RenderInit(Ogre::Root*
const ogreRoot);
26 void RenderUpdate(
const double T,
const double*
const X);
27 std::unique_ptr<C3DLine> m_h_line;
28 std::unique_ptr<C3DLine> m_v_line;
48 int ixP (
int r,
int c) {
return 3*(r + c*m_nr); }
49 int ixTL(
int r,
int c) {
return 3*m_nP + r + c*m_nr; }
50 int ixTR(
int r,
int c) {
return 3*m_nP + r + ((c + m_nc-1)%m_nc)*m_nr; }
51 int ixTU(
int r,
int c) {
return 4*m_nP + r + c*(m_nr+1); }
52 int ixTD(
int r,
int c) {
return 4*m_nP + (r+1)%(m_nr+1) + c*(m_nr+1); }
54 int ixNL(
int r,
int c) {
return 3*(r + c*m_nr); }
55 int ixNR(
int r,
int c) {
return 3*(r + ((c + m_nc - 1) % m_nc)*m_nr); }
56 int ixNU(
int r,
int c) {
return 3*(m_nP + r + c*(m_nr + 1)); }
57 int ixND(
int r,
int c) {
return 3*(m_nP + (r + 1) % (m_nr + 1) + c*(m_nr + 1)); }
59 CoRiBoDynamics::Vector m_X;
60 CoRiBoDynamics::Vector m_PA;
61 CoRiBoDynamics::Vector m_PB;
62 CoRiBoDynamics::Vector m_U;
63 CoRiBoDynamics::Vector m_F;
65 CoRiBoDynamics::Vector Constraint(
const CoRiBoDynamics::Vector& X);
67 MatriX Jacobian(
const CoRiBoDynamics::Vector& X);
69 CoRiBoDynamics::Vector DeltaX(
const CoRiBoDynamics::Vector& X);
71 void NewtonRhapson(CoRiBoDynamics::Vector& X);
Definition: CEnvironment.h:10
Definition: ParametricNet.h:14