Program listing for file mechanics/src/joints/FixedJointR.hpp

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef FixedJointRELATION_H
#define FixedJointRELATION_H

#include <MechanicsFwd.hpp>
#include <SiconosFwd.hpp>
#include <NewtonEulerJointR.hpp>


class FixedJointR : public NewtonEulerJointR
{
protected:

  ACCEPT_SERIALIZATION(FixedJointR);


  double _G10G20d1x, _G10G20d1y, _G10G20d1z;
  double _cq2q101, _cq2q102, _cq2q103, _cq2q104;

public:

  FixedJointR() : NewtonEulerJointR() {};


  FixedJointR(SP::NewtonEulerDS d1, SP::NewtonEulerDS d2 = SP::NewtonEulerDS());


  virtual ~FixedJointR() {};


  virtual void setBasePositions(SP::SiconosVector q1,
                                SP::SiconosVector q2 = SP::SiconosVector());


  virtual unsigned int numberOfConstraints() { return 6; }

  virtual void computeJachq(double time, Interaction& inter, SP::BlockVector q0);

  virtual void computeh(double time, BlockVector& q0, SiconosVector& y);

  virtual unsigned int numberOfDoF() { return 0; }

  virtual DoF_Type typeOfDoF(unsigned int axis) { return DOF_TYPE_INVALID; }

protected:

  virtual void Jd1d2(double X1, double Y1, double Z1,
                     double q10, double q11, double q12, double q13,
                     double X2, double Y2, double Z2,
                     double q20, double q21, double q22, double q23);

  virtual void Jd1(double X1, double Y1, double Z1,
                   double q10, double q11, double q12, double q13);
};

#endif