IMP
2.2.1
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
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"
13
#include <
IMP/kinematics/KinematicNode.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
*/
37
PrismaticJoint
(
IMP::core::RigidBody
parent,
IMP::core::RigidBody
child,
38
IMP::core::XYZ
a,
IMP::core::XYZ
b);
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
*/
45
PrismaticJoint
(
IMP::core::RigidBody
parent,
IMP::core::RigidBody
child);
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
*/
78
virtual
void
update_joint_from_cartesian_witnesses
();
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
86
IMP_OBJECTS
(
PrismaticJoint
,
PrismaticJoints
);
87
88
IMPKINEMATICS_END_NAMESPACE
89
90
#endif
/* IMPKINEMATICS_PRISMATIC_JOINT_H */
IMP::base::Vector
Definition:
base/Vector.h:37
IMP::kinematics::Joint::update_joint_from_cartesian_witnesses
virtual void update_joint_from_cartesian_witnesses()
Joint.h
functionality for defining a kinematic joint between rigid bodies as part of a kinematic tree ...
KinematicNode.h
functionality for defining nodes on a kinematic chain
IMP::core::XYZ
A decorator for a particle with x,y,z coordinates.
Definition:
XYZ.h:30
IMP_OBJECTS
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition:
base/object_macros.h:52
exception.h
Exception definitions and assertions.
IMP::kinematics::Joint
Definition:
Joint.h:33
Vector3D.h
Simple 3D vector class.
IMP::kinematics::PrismaticJoint
Definition:
PrismaticJoint.h:29
check_macros.h
Exception definitions and assertions.
Object.h
A shared base class to help in debugging and things.
IMP::core::RigidBody
A decorator for a rigid body.
Definition:
rigid_bodies.h:75