9 #ifndef IMPEXAMPLE_RANDOMIZING_H
10 #define IMPEXAMPLE_RANDOMIZING_H
12 #include <IMP/example/example_config.h>
17 IMPEXAMPLE_BEGIN_NAMESPACE
20 template <
class Rig
idBody,
class BoundingVolume>
21 void randomize_rigid_body(RigidBody rbi,
22 const BoundingVolume &bv) {
23 core::RigidBody rb(rbi);
26 algebra::Transformation3D tr(rot, trans);
27 algebra::ReferenceFrame3D rf(tr);
28 rb.set_reference_frame(rf);
34 template <
class ParticlesList,
class BoundingVolume>
36 const BoundingVolume &bv) {
37 for (
unsigned int i=0; i< ps.size(); ++i) {
40 if (core::RigidBody::particle_is_instance(ps[i])) {
41 randomize_rigid_body(ps[i], bv);
45 }
else if (core::RigidMember::particle_is_instance(ps[i])) {
55 IMPEXAMPLE_END_NAMESPACE