home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.6.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Modules
Classes
Examples
include
IMP
kinematics
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"
13
#include <
IMP/kinematics/KinematicNode.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
*/
36
PrismaticJoint
(
IMP::core::RigidBody
parent,
IMP::core::RigidBody
child,
37
IMP::core::XYZ
a,
IMP::core::XYZ
b);
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
*/
44
PrismaticJoint
(
IMP::core::RigidBody
parent,
IMP::core::RigidBody
child);
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
*/
77
virtual
void
update_joint_from_cartesian_witnesses
();
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
85
IMP_OBJECTS
(
PrismaticJoint
,
PrismaticJoints
);
86
87
IMPKINEMATICS_END_NAMESPACE
88
89
#endif
/* IMPKINEMATICS_PRISMATIC_JOINT_H */
exception.h
Exception definitions and assertions.
IMP::Vector
Definition:
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:
object_macros.h:42
check_macros.h
Exception definitions and assertions.
IMP::kinematics::Joint
Definition:
Joint.h:33
Object.h
A shared base class to help in debugging and things.
Vector3D.h
Simple 3D vector class.
IMP::kinematics::PrismaticJoint
Definition:
PrismaticJoint.h:28
IMP::core::RigidBody
A decorator for a rigid body.
Definition:
rigid_bodies.h:75