IMP  2.1.1
The Integrative Modeling Platform
PrismaticJoint.h
Go to the documentation of this file.
1 /**
2  * \file PrismaticJoint.h
3  * \brief a prismatic joint between rigid bodies as part of a kinematic tree
4  * \authors Dina Schneidman, Barak Raveh
5  *
6  * Copyright 2007-2012 IMP Inventors. All rights reserved.
7  */
8 
9 #ifndef IMPKINEMATICS_PRISMATIC_JOINT_H
10 #define IMPKINEMATICS_PRISMATIC_JOINT_H
11 
12 #include "kinematics_config.h"
14 #include <IMP/kinematics/Joint.h>
15 #include <IMP/base/Object.h>
16 //#include <IMP/compatibility/nullptr.h>
17 #include <IMP/base/exception.h>
18 #include <IMP/core/internal/dihedral_helpers.h>
19 #include <IMP/algebra/Vector3D.h>
20 #include <IMP/base/check_macros.h>
21 
22 IMPKINEMATICS_BEGIN_NAMESPACE
23 
24 /********************** PrismaticJoint ***************/
25 
26 /**
27  joint in which too rigid bodies may slide along a line
28 */
29 class IMPKINEMATICSEXPORT PrismaticJoint : public Joint{
30  public:
31  /********* Constructors ********/
32  /**
33  Create a prismatic joint whose axis of translation is from a
34  to b, which serve as witnesses for the joint transformation
35  (a is associated with the parent and b with the child)
36  */
39 
40  /**
41  Create a prismatic joint whose axis of translation is between
42  the reference framess of parent and child, who also
43  serve as witnesses for the joint transformation
44  */
46 
47  private:
48 
49  public:
50  /************* Public getters / setters *************/
51  /**
52  gets the length of the prismatic joint, that is the length
53  between the two witnesses
54  */
55  double get_length() const;
56 
57  /**
58  sets the length of the prismatic joint to l, that is
59  the length between the two witnesses set up upon construction
60  (in a lazy fashion, without updating external coords).
61  Updates the owner of the change in internal coordinates.
62 
63  @note it is assumed that l > 0, and for efficiency, runtime
64  checks for this are not made in fast mode
65  */
66  void set_length(double l);
67 
68  protected:
69  /************ General protected methods *************/
70 
71  /**
72  Update the length and transformation of the prismatic joint
73  based on the distance and relative orientation of the witnesses
74  given upon construction.
75 
76  @note It is assumed that external coordinates are updated before
77  calling this function.
78  */
80 
81  private:
82 
83  IMP::core::XYZ a_; // prismatic joint from point, associated with parent
84  IMP::core::XYZ b_; // prismatic joint to point, associated with child
85  double l_; // the length of the prismatic joint
86 
87 };
88 
90 
91 IMPKINEMATICS_END_NAMESPACE
92 
93 #endif /* IMPKINEMATICS_PRISMATIC_JOINT_H */
virtual void update_joint_from_cartesian_witnesses()
functionality for defining a kinematic joint between rigid bodies as part of a kinematic tree ...
functionality for defining nodes on a kinematic chain
A decorator for a particle with x,y,z coordinates.
Definition: XYZ.h:32
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Exception definitions and assertions.
Simple 3D vector class.
Exception definitions and assertions.
A shared base class to help in debugging and things.
A decorator for a rigid body.
Definition: rigid_bodies.h:75