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
rigid_body_geometries.h
Go to the documentation of this file.
1
/**
2
* \file IMP/core/rigid_body_geometries.h
3
* \brief functionality for defining rigid bodies
4
*
5
* Copyright 2007-2014 IMP Inventors. All rights reserved.
6
*/
7
8
#ifndef IMPCORE_RIGID_BODY_GEOMETRIES_H
9
#define IMPCORE_RIGID_BODY_GEOMETRIES_H
10
11
#include <IMP/core/core_config.h>
12
#include "
rigid_bodies.h
"
13
#include "internal/rigid_body_tree.h"
14
#include <
IMP/display/particle_geometry.h
>
15
16
IMPCORE_BEGIN_NAMESPACE
17
18
/** Show the collision detection hierarchy for a rigid body.*/
19
class
IMPCOREEXPORT
RigidBodyHierarchyGeometry
20
:
public
display::SingletonGeometry
{
21
base::Pointer<internal::RigidBodyHierarchy>
h_;
22
unsigned
int
node_, layer_;
23
RigidBodyHierarchyGeometry
(internal::RigidBodyHierarchy *h,
unsigned
int
node,
24
unsigned
int
layer);
25
26
public
:
27
RigidBodyHierarchyGeometry
(
RigidBody
rb,
28
const
kernel::ParticlesTemp
&constituents);
29
display::Geometries
get_components
()
const
;
30
IMP_OBJECT_METHODS
(
RigidBodyHierarchyGeometry
);
31
};
32
33
IMP_PARTICLE_GEOMETRY(RigidBodyDerivative,
core::RigidBody
, {
34
ret = internal::get_rigid_body_derivative_geometries(d.get_model(),
35
d.get_particle_index());
36
});
37
38
IMP_PARTICLE_GEOMETRY(RigidBodyFrame,
core::RigidBody
, {
39
ret.push_back(
new
display::ReferenceFrameGeometry
(d.get_reference_frame()));
40
});
41
42
/** Display the torque on a rigid body as a line segment.*/
43
class
IMPCOREEXPORT
RigidBodyTorque
:
public
display::SegmentGeometry
{
44
base::WeakPointer<kernel::Particle>
p_;
45
mutable
algebra::Segment3D
cache_;
46
static
algebra::Segment3D
extract_geometry(
kernel::Particle
*p);
47
48
public
:
49
RigidBodyTorque
(
kernel::Particle
*p);
50
const
algebra::Segment3D
&get_geometry()
const
;
51
};
52
53
IMPCORE_END_NAMESPACE
54
55
#endif
/* IMPCORE_RIGID_BODY_GEOMETRIES_H */
IMP::display::SingletonGeometry
A base class for geometry contained in particles.
Definition:
particle_geometry.h:24
IMP::core::RigidBodyTorque
Definition:
rigid_body_geometries.h:43
IMP::core::RigidBodyHierarchyGeometry
Definition:
rigid_body_geometries.h:19
IMP::display::SegmentGeometry
Display a segment.
Definition:
primitive_geometries.h:47
IMP::base::Pointer< internal::RigidBodyHierarchy >
IMP::base::Vector< base::WeakPointer< Particle > >
IMP::display::ReferenceFrameGeometry
Display a reference frame.
Definition:
primitive_geometries.h:66
rigid_bodies.h
functionality for defining rigid bodies
particle_geometry.h
Represent an XYZR particle with a sphere.
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/Particle.h:34
IMP::algebra::Segment3D
Definition:
Segment3D.h:23
IMP::base::WeakPointer
Definition:
base/WeakPointer.h:75
IMP::display::Geometry::get_components
virtual Geometries get_components() const
Return a set of geometry composing this one.
Definition:
declare_Geometry.h:48
IMP::core::RigidBody
A decorator for a rigid body.
Definition:
rigid_bodies.h:75