IMP
2.1.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 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"
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
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
*/
79
virtual
void
update_joint_from_cartesian_witnesses
();
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
89
IMP_OBJECTS
(
PrismaticJoint
,
PrismaticJoints
);
90
91
IMPKINEMATICS_END_NAMESPACE
92
93
#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:32
IMP_OBJECTS
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition:
base/object_macros.h:77
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