home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.14.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
core
version 2.14.0
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-2020 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
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
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
WeakPointer<Particle>
p_;
45
mutable
algebra::Segment3D
cache_;
46
static
algebra::Segment3D
extract_geometry(
Particle
*p);
47
48
public
:
49
RigidBodyTorque
(
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::WeakPointer
Smart pointer to Object-derived classes that does not refcount.
Definition:
WeakPointer.h:76
IMP::display::SegmentGeometry
Display a segment.
Definition:
primitive_geometries.h:47
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::Vector< WeakPointer< Particle > >
IMP::Pointer< internal::RigidBodyHierarchy >
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::algebra::Segment3D
Simple implementation of segments in 3D.
Definition:
Segment3D.h:24
IMP::display::Geometry::get_components
virtual Geometries get_components() const
Return a set of geometry composing this one.
Definition:
declare_Geometry.h:48
IMP::Particle
Class to handle individual particles of a Model object.
Definition:
Particle.h:41
IMP::core::RigidBody
A decorator for a rigid body.
Definition:
rigid_bodies.h:82