IMP logo
IMP Reference Guide  2.6.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-2016 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/Object.h>
16 #include <IMP/exception.h>
17 #include <IMP/core/internal/dihedral_helpers.h>
18 #include <IMP/algebra/Vector3D.h>
19 #include <IMP/check_macros.h>
20 
21 IMPKINEMATICS_BEGIN_NAMESPACE
22 
23 /********************** PrismaticJoint ***************/
24 
25 /**
26  joint in which too rigid bodies may slide along a line
27 */
28 class IMPKINEMATICSEXPORT PrismaticJoint : public Joint {
29  public:
30  /********* Constructors ********/
31  /**
32  Create a prismatic joint whose axis of translation is from a
33  to b, which serve as witnesses for the joint transformation
34  (a is associated with the parent and b with the child)
35  */
38 
39  /**
40  Create a prismatic joint whose axis of translation is between
41  the reference frames of parent and child, who also
42  serve as witnesses for the joint transformation
43  */
45 
46  private:
47  public:
48  /************* Public getters / setters *************/
49  /**
50  gets the length of the prismatic joint, that is the length
51  between the two witnesses
52  */
53  double get_length() const;
54 
55  /**
56  sets the length of the prismatic joint to l, that is
57  the length between the two witnesses set up upon construction
58  (in a lazy fashion, without updating external coords).
59  Updates the owner of the change in internal coordinates.
60 
61  @note it is assumed that l > 0, and for efficiency, runtime
62  checks for this are not made in fast mode
63  */
64  void set_length(double l);
65 
66  protected:
67  /************ General protected methods *************/
68 
69  /**
70  Update the length and transformation of the prismatic joint
71  based on the distance and relative orientation of the witnesses
72  given upon construction.
73 
74  @note It is assumed that external coordinates are updated before
75  calling this function.
76  */
78 
79  private:
80  IMP::core::XYZ a_; // prismatic joint from point, associated with parent
81  IMP::core::XYZ b_; // prismatic joint to point, associated with child
82  double l_; // the length of the prismatic joint
83 };
84 
86 
87 IMPKINEMATICS_END_NAMESPACE
88 
89 #endif /* IMPKINEMATICS_PRISMATIC_JOINT_H */
Exception definitions and assertions.
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.
Definition: object_macros.h:42
Exception definitions and assertions.
A shared base class to help in debugging and things.
Simple 3D vector class.
A decorator for a rigid body.
Definition: rigid_bodies.h:75