IMP
2.2.0
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
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>
11
#include <
IMP/algebra/Transformation3D.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;
34
virtual
kernel::ModelObjectsTemp
do_get_inputs
(
35
kernel::Model
*m,
const
kernel::ParticleIndexes
&pis)
const
IMP_OVERRIDE;
36
virtual
kernel::ModelObjectsTemp
do_get_outputs
(
37
kernel::Model
*m,
const
kernel::ParticleIndexes
&pis)
const
IMP_OVERRIDE;
38
IMP_SINGLETON_MODIFIER_METHODS
(
Transform
);
39
IMP_OBJECT_METHODS
(
Transform
);
40
;
41
42
private
:
43
algebra::Transformation3D
t_;
44
bool
ignore_non_xyz_;
45
};
46
47
IMPCORE_END_NAMESPACE
48
#endif
/* IMPCORE_TRANSFORM_H */
SingletonModifier.h
Import IMP/kernel/SingletonModifier.h in the namespace.
IMP::algebra::Transformation3D
Simple 3D transformation class.
Definition:
Transformation3D.h:30
singleton_macros.h
Import IMP/kernel/singleton_macros.h in the namespace.
IMP::base::Vector
Definition:
base/Vector.h:37
IMP::kernel::SingletonModifier::apply_index
virtual void apply_index(kernel::Model *m, kernel::ParticleIndex v) const
IMP::kernel::SingletonModifier
A base class for modifiers of kernel::ParticlesTemp.
Definition:
kernel/SingletonModifier.h:33
IMP::kernel::ParticleInputs::do_get_inputs
virtual ModelObjectsTemp do_get_inputs(kernel::Model *m, const ParticleIndexes &pis) const
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::core::Transform
Apply a transformation to a passed particle.
Definition:
Transform.h:22
IMP::base::Index< ParticleIndexTag >
Transformation3D.h
Simple 3D transformation class.
IMP::kernel::ParticleOutputs::do_get_outputs
virtual ModelObjectsTemp do_get_outputs(kernel::Model *m, const ParticleIndexes &pis) const
IMP_SINGLETON_MODIFIER_METHODS
#define IMP_SINGLETON_MODIFIER_METHODS(Name)
Definition:
kernel/singleton_macros.h:92
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/Model.h:72