IMP  2.2.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 appling the tranformation
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
33  IMP_OVERRIDE;
35  kernel::Model *m, const kernel::ParticleIndexes &pis) const IMP_OVERRIDE;
37  kernel::Model *m, const kernel::ParticleIndexes &pis) const IMP_OVERRIDE;
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.
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
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
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)
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:72