00001 /** 00002 * \file Transform.h \brief Transform a particle 00003 * 00004 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00005 * 00006 */ 00007 #ifndef IMPCORE_TRANSFORM_H 00008 #define IMPCORE_TRANSFORM_H 00009 #include "core_config.h" 00010 #include <IMP/algebra/Transformation3D.h> 00011 #include <IMP/SingletonModifier.h> 00012 00013 IMPCORE_BEGIN_NAMESPACE 00014 00015 00016 //! Apply a transformation to a passed particle 00017 /** 00018 \see algebra::Transformation3D 00019 See IMP::SingletonFunctor for an example of how to transform a set of 00020 particles. 00021 */ 00022 class IMPCOREEXPORT Transform : public SingletonModifier 00023 { 00024 public: 00025 //! Initialize 00026 /** 00027 /param[in] t a 3d transformation to be applied on a particle 00028 /param[in] ignore_non_xyz if false then appling the tranformation 00029 on a non XYZ particle will result in an exception. 00030 */ 00031 Transform(const algebra::Transformation3D &t, 00032 bool ignore_non_xyz=false); 00033 00034 IMP_SINGLETON_MODIFIER(Transform); 00035 private: 00036 algebra::Transformation3D t_; 00037 bool ignore_non_xyz_; 00038 }; 00039 00040 00041 IMPCORE_END_NAMESPACE 00042 #endif /* IMPCORE_TRANSFORM_H */