IMP  2.2.0
The Integrative Modeling Platform
PrismaticJoint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/kinematics/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-2014 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  public:
49  /************* Public getters / setters *************/
50  /**
51  gets the length of the prismatic joint, that is the length
52  between the two witnesses
53  */
54  double get_length() const;
55 
56  /**
57  sets the length of the prismatic joint to l, that is
58  the length between the two witnesses set up upon construction
59  (in a lazy fashion, without updating external coords).
60  Updates the owner of the change in internal coordinates.
61 
62  @note it is assumed that l > 0, and for efficiency, runtime
63  checks for this are not made in fast mode
64  */
65  void set_length(double l);
66 
67  protected:
68  /************ General protected methods *************/
69 
70  /**
71  Update the length and transformation of the prismatic joint
72  based on the distance and relative orientation of the witnesses
73  given upon construction.
74 
75  @note It is assumed that external coordinates are updated before
76  calling this function.
77  */
79 
80  private:
81  IMP::core::XYZ a_; // prismatic joint from point, associated with parent
82  IMP::core::XYZ b_; // prismatic joint to point, associated with child
83  double l_; // the length of the prismatic joint
84 };
85 
87 
88 IMPKINEMATICS_END_NAMESPACE
89 
90 #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:30
#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