IMP  2.2.1
The Integrative Modeling Platform
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"
15 
16 IMPCORE_BEGIN_NAMESPACE
17 
18 /** Show the collision detection hierarchy for a rigid body.*/
19 class IMPCOREEXPORT RigidBodyHierarchyGeometry
22  unsigned int node_, layer_;
23  RigidBodyHierarchyGeometry(internal::RigidBodyHierarchy *h, unsigned int node,
24  unsigned int layer);
25 
26  public:
28  const kernel::ParticlesTemp &constituents);
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 {
45  mutable algebra::Segment3D cache_;
46  static algebra::Segment3D extract_geometry(kernel::Particle *p);
47 
48  public:
50  const algebra::Segment3D &get_geometry() const;
51 };
52 
53 IMPCORE_END_NAMESPACE
54 
55 #endif /* IMPCORE_RIGID_BODY_GEOMETRIES_H */
A base class for geometry contained in particles.
functionality for defining rigid bodies
Represent an XYZR particle with a sphere.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class to handle individual model particles.
virtual Geometries get_components() const
Return a set of geometry composing this one.
A decorator for a rigid body.
Definition: rigid_bodies.h:75