IMP  2.3.1
The Integrative Modeling Platform
Transform.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/Transform.h \brief Transform a particle
3  *
4  * Copyright 2007-2014 IMP Inventors. All rights reserved.
5  *
6  */
7 
8 #ifndef IMPCORE_TRANSFORM_H
9 #define IMPCORE_TRANSFORM_H
10 #include <IMP/core/core_config.h>
12 #include <IMP/SingletonModifier.h>
13 #include <IMP/singleton_macros.h>
14 IMPCORE_BEGIN_NAMESPACE
15 
16 //! Apply a transformation to a passed particle
17 /**
18  \see algebra::Transformation3D
19  See IMP::SingletonFunctor for an example of how to transform a set of
20  particles.
21  */
22 class IMPCOREEXPORT Transform : public SingletonModifier {
23  public:
24  //! Initialize
25  /**
26  \param[in] t a 3d transformation to be applied on a particle
27  \param[in] ignore_non_xyz if false then applying the transformation
28  on a non XYZ particle will result in an exception.
29  */
30  Transform(const algebra::Transformation3D &t, bool ignore_non_xyz = false);
31 
32  virtual void apply_index(kernel::Model *m, kernel::ParticleIndex p) const
40  ;
41 
42  private:
44  bool ignore_non_xyz_;
45 };
46 
47 IMPCORE_END_NAMESPACE
48 #endif /* IMPCORE_TRANSFORM_H */
Import IMP/kernel/SingletonModifier.h in the namespace.
Simple 3D transformation class.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Import IMP/kernel/singleton_macros.h in the namespace.
virtual void apply_index(kernel::Model *m, kernel::ParticleIndex v) const
A base class for modifiers of kernel::ParticlesTemp.
virtual ModelObjectsTemp do_get_inputs(kernel::Model *m, const ParticleIndexes &pis) const
Apply a transformation to a passed particle.
Definition: Transform.h:22
Simple 3D transformation class.
virtual ModelObjectsTemp do_get_outputs(kernel::Model *m, const ParticleIndexes &pis) const
#define IMP_SINGLETON_MODIFIER_METHODS(Name)
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73