IMP logo
IMP Reference Guide  2.20.2
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-2022 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 ParticlesTemp &constituents);
29  display::Geometries get_components() const override;
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(Particle *p);
47 
48  public:
50  const algebra::Segment3D &get_geometry() const override;
51 };
52 
53 IMPCORE_END_NAMESPACE
54 
55 #endif /* IMPCORE_RIGID_BODY_GEOMETRIES_H */
A base class for geometry contained in particles.
Smart pointer to Object-derived classes that does not refcount.
Definition: WeakPointer.h:77
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
functionality for defining rigid bodies
Represent an XYZR particle with a sphere.
Simple implementation of segments in 3D.
Definition: Segment3D.h:25
virtual Geometries get_components() const
Return a set of geometry composing this one.
Class to handle individual particles of a Model object.
Definition: Particle.h:43
A decorator for a rigid body.
Definition: rigid_bodies.h:82