KrisLibrary  1.0.0
Wrench.h
1 #ifndef ROBOTICS_WRENCH_H
2 #define ROBOTICS_WRENCH_H
3 
4 #include <KrisLibrary/math/vector.h>
5 #include <KrisLibrary/math/matrix.h>
7 using namespace Math;
8 using namespace Math3D;
9 
11 {
12  void setTransformed(const RigidBodyVelocity& w,const RigidTransform& T);
13  void setShifted(const RigidBodyVelocity& w,const Vector3& shift);
14 
15  Vector3 v,w;
16 };
17 
18 struct Wrench
19 {
20  void setForceAtPoint(const Vector3& f,const Vector3& p);
21  void setTransformed(const Wrench& w,const RigidTransform& T);
22  void setShifted(const Wrench& w,const Vector3& shift);
23 
24  Vector3 f,m;
25 };
26 
27 struct SpatialVector : public Vector
28 {
29  SpatialVector();
30  void set(const Vector3& a,const Vector3& b);
31  void get(Vector3& a,Vector3& b) const;
32  void setForce(const Vector3& force,const Vector3& moment)
33  { set(force,moment); }
34  void setVelocity(const Vector3& linVel,const Vector3& angVel)
35  { set(linVel,angVel); }
36  void setAccel(const Vector3& linAccel,const Vector3& angAccel)
37  { set(linAccel,angAccel); }
38 };
39 
40 struct SpatialMatrix : public Matrix
41 {
42  SpatialMatrix();
43  void setUpperLeft(const Matrix3& mat11);
44  void setLowerRight(const Matrix3& mat22);
45  void setUpperRight(const Matrix3& mat12);
46  void setLowerLeft(const Matrix3& mat21);
47  void getUpperLeft(Matrix3& mat11) const;
48  void getLowerRight(Matrix3& mat22) const;
49  void getUpperRight(Matrix3& mat12) const;
50  void getLowerLeft(Matrix3& mat21) const;
51  void setForceShift(const Vector3& origMomentCenter,const Vector3& newMomentCenter);
52  void setForceTransform(const RigidTransform& T);
53  void setVelocityShift(const Vector3& origRefPoint,const Vector3& newRefPoint);
54  void setVelocityTransform(const RigidTransform& T);
55  void setMassMatrix(const Real& mass,const Matrix3& inertia);
56 };
57 
58 #endif
A 3D vector class.
Definition: math3d/primitives.h:136
Definition: Wrench.h:40
Class declarations for useful 3D math types.
A rigid-body transformation.
Definition: math3d/primitives.h:820
Definition: Wrench.h:27
Definition: Wrench.h:18
Contains all the definitions in the Math3D package.
Definition: AnyGeometry.h:13
A 3x3 matrix class.
Definition: math3d/primitives.h:469
Contains all definitions in the Math package.
Definition: WorkspaceBound.h:12
Definition: Wrench.h:10