diff --git a/modules/gfx/pymod/export_scene.cc b/modules/gfx/pymod/export_scene.cc index 18728c2cf3feee60f5727efffd5a61c098f4151b..39d1fde6bde504a407dea60247b7cadf01fb5b8a 100644 --- a/modules/gfx/pymod/export_scene.cc +++ b/modules/gfx/pymod/export_scene.cc @@ -60,7 +60,7 @@ geom::AlignedCuboid scene_get_bb2(Scene* scene, bool use_tf) return scene->GetBoundingBox(use_tf); } -geom::AlignedCuboid scene_get_bb3(Scene* scene, const mol::Transform& tf) +geom::AlignedCuboid scene_get_bb3(Scene* scene, const geom::Transform& tf) { return scene->GetBoundingBox(tf); } diff --git a/modules/gfx/src/entity.cc b/modules/gfx/src/entity.cc index 3aec22fe5eaee632938be7b74ba4bc97342db774..df1ad6bfc08fc8b9b7d421653eca750d7f0469cd 100644 --- a/modules/gfx/src/entity.cc +++ b/modules/gfx/src/entity.cc @@ -231,7 +231,7 @@ void Entity::Rebuild() // update center in transformation geom::Vec3 center=this->GetCenter(); - Transform tf=this->GetTF(); + geom::Transform tf=this->GetTF(); tf.SetCenter(center); tf.SetTrans(center+GetTF().GetTrans()-GetTF().GetCenter()); this->SetTF(tf); diff --git a/modules/gfx/src/gfx_object.cc b/modules/gfx/src/gfx_object.cc index d527ceffabf5b805535a0dc1c796cd74b82ab19b..f7e3b06a5af9a5b1962156db728b4556e331c98c 100644 --- a/modules/gfx/src/gfx_object.cc +++ b/modules/gfx/src/gfx_object.cc @@ -400,7 +400,7 @@ geom::AlignedCuboid GfxObj::GetBoundingBox(bool use_tf) const } void GfxObj::ProcessLimits(geom::Vec3& minc, geom::Vec3& maxc, - const mol::Transform& tf) const + const geom::Transform& tf) const { try { geom::AlignedCuboid coord_limits=tf.Apply(this->GetBoundingBox(true)); @@ -476,13 +476,13 @@ void GfxObj::OnInput(const InputEvent& e) } } -const mol::Transform& GfxObj::GetTF() const +const geom::Transform& GfxObj::GetTF() const { return transform_; } -void GfxObj::SetTF(const mol::Transform& tf) +void GfxObj::SetTF(const geom::Transform& tf) { transform_=tf; } diff --git a/modules/gfx/src/gfx_object.hh b/modules/gfx/src/gfx_object.hh index 8809e1046fe10d15c410bc51f86545cc1bc32cf1..fc906c35c9fdb7c563417c6785e5023d2dabe594 100644 --- a/modules/gfx/src/gfx_object.hh +++ b/modules/gfx/src/gfx_object.hh @@ -33,7 +33,7 @@ #include <ost/config.hh> #include <ost/gfx/module_config.hh> -#include <ost/mol/transform.hh> +#include <ost/geom/transform.hh> #include "gfx_object_fw.hh" #include "gfx_object_base.hh" @@ -123,7 +123,7 @@ public: will be adjusted based on the Cuboid returned by GetBoundingBox(true) */ virtual void ProcessLimits(geom::Vec3& minc, geom::Vec3& maxc, - const mol::Transform& tf) const; + const geom::Transform& tf) const; // implemented in derived classes for the actual GL rendering /* @@ -168,9 +168,9 @@ public: void Clear(); /// \brief get transform - const mol::Transform& GetTF() const; + const geom::Transform& GetTF() const; /// \brief set transform - void SetTF(const mol::Transform& tf); + void SetTF(const geom::Transform& tf); // add a label at the given position void AddLabel(const String& s, const geom::Vec3& pos, const Color& col, float psize); @@ -225,7 +225,7 @@ public: RenderMode::Type render_mode_; unsigned int debug_flags_; - mol::Transform transform_; + geom::Transform transform_; bool rebuild_; bool refresh_; float line_width_; diff --git a/modules/gfx/src/impl/entity_detail.cc b/modules/gfx/src/impl/entity_detail.cc index 02e40b2138edee1e989c80a6680fee04fedbc897..407654cfcfa514cc379a240ac1a68bc6d131a077 100644 --- a/modules/gfx/src/impl/entity_detail.cc +++ b/modules/gfx/src/impl/entity_detail.cc @@ -57,7 +57,7 @@ void DoRenderBlur(BondEntryList& bl, float bf1, float bf2) { // add blur for this particular orientation! // don't use vertex array, but on-the-fly oriented and z-sorted quads - mol::Transform tf = Scene::Instance().GetTransform(); + geom::Transform tf = Scene::Instance().GetTransform(); std::vector<BlurQuadEntry> bql; for (BondEntryList::iterator it=bl.begin(); it!=bl.end();++it) { diff --git a/modules/gfx/src/impl/scene_fx.cc b/modules/gfx/src/impl/scene_fx.cc index 8979d96441fc5367ec6cf223266654949683bee4..de0000484bf41a13d91220a312e54013ac643922 100644 --- a/modules/gfx/src/impl/scene_fx.cc +++ b/modules/gfx/src/impl/scene_fx.cc @@ -406,7 +406,7 @@ void SceneFX::prep_shadow_map() #endif // modelview transform for the lightsource pov - mol::Transform ltrans(Scene::Instance().GetTransform()); + geom::Transform ltrans(Scene::Instance().GetTransform()); ltrans.SetRot(Scene::Instance().GetLightRot()*ltrans.GetRot()); // calculate encompassing box for ortho projection diff --git a/modules/gfx/src/map_iso.cc b/modules/gfx/src/map_iso.cc index 5dbd4d3907c57964a3b21c0d9183e3e1917ccf2e..7a2c5160c435badb6bd25267759c6fd9a119ebed 100644 --- a/modules/gfx/src/map_iso.cc +++ b/modules/gfx/src/map_iso.cc @@ -86,7 +86,7 @@ MapIso::MapIso(const String& name, const img::MapHandle& mh, SetMatDiff(Color(1,1,1)); SetMatSpec(Color(0.1,0.1,0.1)); SetMatShin(32); - mol::Transform tf=this->GetTF(); + geom::Transform tf=this->GetTF(); tf.SetCenter(this->GetCenter()); tf.SetTrans(this->GetCenter()); this->SetTF(tf); diff --git a/modules/gfx/src/povray.hh b/modules/gfx/src/povray.hh index b647420a148964a96a26abe3b73b264b74316116..c8ef79461b8380c9c870d547fe1f6e26b180d0eb 100644 --- a/modules/gfx/src/povray.hh +++ b/modules/gfx/src/povray.hh @@ -26,7 +26,7 @@ #include <string> #include <fstream> -#include <ost/mol/transform.hh> +#include <ost/geom/transform.hh> #include "color.hh" @@ -63,7 +63,7 @@ public: public: bool use_tf; - mol::Transform tf; + geom::Transform tf; private: std::string pov_file_; diff --git a/modules/gfx/src/prim_list.cc b/modules/gfx/src/prim_list.cc index b531ba2796a597b8e8eb9d171c6a49d9d87a1e42..e07820e6bc6c15af276b8a7012baa21b00545eb3 100644 --- a/modules/gfx/src/prim_list.cc +++ b/modules/gfx/src/prim_list.cc @@ -65,12 +65,12 @@ geom::AlignedCuboid PrimList::GetBoundingBox() const geom::Vec3 maxc(-std::numeric_limits<float>::max(), -std::numeric_limits<float>::max(), -std::numeric_limits<float>::max()); - ProcessLimits(minc,maxc,mol::Transform()); + ProcessLimits(minc,maxc,geom::Transform()); return geom::AlignedCuboid(minc,maxc); } void PrimList::ProcessLimits(geom::Vec3& minc, geom::Vec3& maxc, - const mol::Transform& tf) const + const geom::Transform& tf) const { for(SpherePrimList::const_iterator it=points_.begin();it!=points_.end();++it) { geom::Vec3 tpos = tf.Apply(it->position); diff --git a/modules/gfx/src/prim_list.hh b/modules/gfx/src/prim_list.hh index 395e53e2ad22ce359b37281caead22cad1a423e9..afc999a7febc930495d2f7620c7795295293be42 100644 --- a/modules/gfx/src/prim_list.hh +++ b/modules/gfx/src/prim_list.hh @@ -64,7 +64,7 @@ class DLLEXPORT_OST_GFX PrimList: public GfxObj virtual geom::AlignedCuboid GetBoundingBox() const; virtual void ProcessLimits(geom::Vec3& minc, geom::Vec3& maxc, - const mol::Transform& tf) const; + const geom::Transform& tf) const; /// \brief get center virtual geom::Vec3 GetCenter() const; diff --git a/modules/gfx/src/scene.cc b/modules/gfx/src/scene.cc index fde6ad665d0ce3537bf9c97d5e3d26d1055bb62a..2650eea5b09f5169bee74a9e984437573619aa3c 100644 --- a/modules/gfx/src/scene.cc +++ b/modules/gfx/src/scene.cc @@ -699,13 +699,13 @@ float Scene::GetDefaultTextSize() namespace { -void draw_lightdir(const Vec3& ldir, const mol::Transform& tf) +void draw_lightdir(const Vec3& ldir, const geom::Transform& tf) { glPushAttrib(GL_ENABLE_BIT); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); - mol::Transform tmpt(tf); + geom::Transform tmpt(tf); tmpt.SetRot(Mat3::Identity()); glMultMatrix(tmpt.GetTransposedMatrix().Data()); glDisable(GL_NORMALIZE); @@ -1216,7 +1216,7 @@ namespace { class BBCalc: public GfxNodeVisitor { public: - BBCalc(const geom::Vec3& mmin, const geom::Vec3& mmax, const mol::Transform& tf): + BBCalc(const geom::Vec3& mmin, const geom::Vec3& mmax, const geom::Transform& tf): minc(mmin),maxc(mmax),tf(tf),valid(false) {} bool VisitNode(GfxNode* node, const Stack& st) { @@ -1235,7 +1235,7 @@ public: } Vec3 minc,maxc; - mol::Transform tf; + geom::Transform tf; bool valid; }; @@ -1243,10 +1243,10 @@ public: geom::AlignedCuboid Scene::GetBoundingBox(bool use_tf) const { - return GetBoundingBox(use_tf ? transform_ : mol::Transform()); + return GetBoundingBox(use_tf ? transform_ : geom::Transform()); } -geom::AlignedCuboid Scene::GetBoundingBox(const mol::Transform& tf) const +geom::AlignedCuboid Scene::GetBoundingBox(const geom::Transform& tf) const { BBCalc bbcalc(Vec3(std::numeric_limits<float>::max(), std::numeric_limits<float>::max(), @@ -1264,12 +1264,12 @@ geom::AlignedCuboid Scene::GetBoundingBox(const mol::Transform& tf) const return geom::AlignedCuboid(geom::Vec3(),geom::Vec3()); } -mol::Transform Scene::GetTransform() const +geom::Transform Scene::GetTransform() const { return transform_; } -void Scene::SetTransform(const mol::Transform& t) +void Scene::SetTransform(const geom::Transform& t) { transform_=t; this->RequestRedraw(); @@ -1721,7 +1721,7 @@ public: } } Vec3 minc,maxc; - mol::Transform transform; + geom::Transform transform; bool valid; }; diff --git a/modules/gfx/src/scene.hh b/modules/gfx/src/scene.hh index 62630ced64dd95afd7b36957e2a97d6f35a3ba61..4edc6663770bbdb3c047382f04e925474bd06baf 100644 --- a/modules/gfx/src/scene.hh +++ b/modules/gfx/src/scene.hh @@ -30,7 +30,7 @@ #include <boost/shared_array.hpp> #include <ost/gfx/module_config.hh> -#include <ost/mol/transform.hh> +#include <ost/geom/transform.hh> #include <ost/mol/atom_handle.hh> #include "gl_include.hh" @@ -84,7 +84,7 @@ class DLLEXPORT_OST_GFX Scene { // refactoring of the scene it into a management // and a view part struct SceneViewStackEntry { - mol::Transform transform; + geom::Transform transform; float fov; float znear,zfar; }; @@ -363,13 +363,13 @@ class DLLEXPORT_OST_GFX Scene { geom::AlignedCuboid GetBoundingBox(bool use_tf=true) const; /// \brief return bounding box of with a given transform - geom::AlignedCuboid GetBoundingBox(const mol::Transform& tf) const; + geom::AlignedCuboid GetBoundingBox(const geom::Transform& tf) const; /// \brief get full underlying transformation - mol::Transform GetTransform() const; + geom::Transform GetTransform() const; /// \brief set transform - void SetTransform(const mol::Transform& t); + void SetTransform(const geom::Transform& t); /// \brief returns a compact, internal representation of the scene orientation geom::Mat4 GetRTC() const; @@ -513,7 +513,7 @@ private: mutable GfxNodeP root_node_; // mutable is slightly hackish SceneObserverList observers_; - mol::Transform transform_; // overall modelview transformation + geom::Transform transform_; // overall modelview transformation bool gl_init_; diff --git a/modules/gui/src/dock_widget.cc b/modules/gui/src/dock_widget.cc index 9ba553ca55d551e6c669150cf222e7e9967df800..53b7d7ea70f32d44f965a0f1d65de3029ebc3c1a 100644 --- a/modules/gui/src/dock_widget.cc +++ b/modules/gui/src/dock_widget.cc @@ -35,4 +35,4 @@ void DockWidget::closeEvent(QCloseEvent* e) emit OnClose(this); } -}} // ns \ No newline at end of file +}} // ns diff --git a/modules/gui/src/tools/map_tool.cc b/modules/gui/src/tools/map_tool.cc index e16895621fabc2ca32c2797dd395a00fc8b936af..96e622a3d39b914a37f6e2c87a9ec0ddcfeb72ee 100644 --- a/modules/gui/src/tools/map_tool.cc +++ b/modules/gui/src/tools/map_tool.cc @@ -56,7 +56,7 @@ void MapTool::MouseMove(const MouseEvent& event) gfx::Scene::Instance().StatusMessage(s.str()); } } else if(gfx::MapSlab* ms = dynamic_cast<gfx::MapSlab*>(np.get())) { - mol::Transform tf = gfx::Scene::Instance().GetTransform(); + geom::Transform tf = gfx::Scene::Instance().GetTransform(); geom::Plane plane = ms->GetPlane(); if(event.GetButtons()==MouseEvent::LeftButton) { if (event.IsShiftPressed()) { diff --git a/modules/mol/base/src/coord_group.cc b/modules/mol/base/src/coord_group.cc index 4fe6677ee7da3981ee2bc3f9b48f2c26599820e4..5af231a559b8e07db90f6ec34d539aa238ed63ea 100644 --- a/modules/mol/base/src/coord_group.cc +++ b/modules/mol/base/src/coord_group.cc @@ -19,9 +19,10 @@ #include <ost/invalid_handle.hh> #include <ost/integrity_error.hh> #include <ost/log.hh> -#include <ost/mol/in_mem_coord_source.hh> -#include <ost/mol/view_op.hh> -#include <ost/mol/mol.hh> +#include <ost/geom/transform.hh> +#include "in_mem_coord_source.hh" +#include "view_op.hh" +#include "mol.hh" #include "coord_group.hh" @@ -255,7 +256,7 @@ CoordGroupHandle CoordGroupHandle::Filter(const EntityView& selected, int first, return filtered_cg; } -void CoordGroupHandle::ApplyTransform(const mol::Transform& tf) +void CoordGroupHandle::ApplyTransform(const geom::Transform& tf) { this->CheckValidity(); if (source_->IsMutable()) { diff --git a/modules/mol/base/src/coord_group.hh b/modules/mol/base/src/coord_group.hh index 573ab8ffb59ffc19b1ac78eac5979821dbc4344e..623f745efbb3bc37411d93279ee99baa5c5fb7f5 100644 --- a/modules/mol/base/src/coord_group.hh +++ b/modules/mol/base/src/coord_group.hh @@ -112,7 +112,7 @@ public: CoordGroupHandle Filter(const EntityView& selected,int first=0,int last=-1) const; /// \brief apply in-place transform to each coordinate in each frame - void ApplyTransform(const Transform& tf); + void ApplyTransform(const geom::Transform& tf); private: diff --git a/modules/mol/base/src/coord_source.cc b/modules/mol/base/src/coord_source.cc index 06b7864b7a831fa2fe8d0e144765b6bff2094b9e..fa58ce041c963aaac3dbf522be37533fb33e0b4a 100644 --- a/modules/mol/base/src/coord_source.cc +++ b/modules/mol/base/src/coord_source.cc @@ -21,10 +21,10 @@ Author: Marco Biasini */ #include <ost/log.hh> +#include <ost/geom/transform.hh> #include "atom_handle.hh" #include "xcs_editor.hh" #include "in_mem_coord_source.hh" -#include "transform.hh" #include "coord_source.hh" namespace ost { namespace mol { @@ -165,7 +165,7 @@ geom::Vec3 CoordSource::GetAtomPos(uint frame, AtomHandle atom) const return geom::Vec3(); } -void CoordSource::ApplyTransform(const Transform& tf) +void CoordSource::ApplyTransform(const geom::Transform& tf) { if(!mutable_) return; size_t frame_count=GetFrameCount(); diff --git a/modules/mol/base/src/coord_source.hh b/modules/mol/base/src/coord_source.hh index 51cfe0717f2a98a408b7eecd87654a7bcff3ec4c..3f83e5a3e19800956364a2c679d38660412d0736 100644 --- a/modules/mol/base/src/coord_source.hh +++ b/modules/mol/base/src/coord_source.hh @@ -85,7 +85,7 @@ public: virtual void AddFrame(const std::vector<geom::Vec3>& coords,const geom::Vec3& cell_size,const geom::Vec3& cell_angles) = 0; virtual void InsertFrame(int pos, const std::vector<geom::Vec3>& coords) = 0; - void ApplyTransform(const Transform& tf); + void ApplyTransform(const geom::Transform& tf); protected: void SetMutable(bool flag); diff --git a/modules/mol/base/src/entity_handle.hh b/modules/mol/base/src/entity_handle.hh index 67b2a847e4ab4050d9dfd9043e9fa3ab46ae0bd6..2783b404b75b11a1e31127017d8461b740752cf5 100644 --- a/modules/mol/base/src/entity_handle.hh +++ b/modules/mol/base/src/entity_handle.hh @@ -20,7 +20,6 @@ #define OST_ENTITY_HANDLE_HH #include <ost/mol/module_config.hh> -#include <ost/mol/transform.hh> #include "impl/entity_impl_fw.hh" #include "entity_visitor_fw.hh" diff --git a/modules/mol/base/src/impl/entity_impl.hh b/modules/mol/base/src/impl/entity_impl.hh index d1d1ca050f30a7fdee8d7ab5d64bf417ee183dc8..ccbf85b449cdf035493096c73157a485dc9baea8 100644 --- a/modules/mol/base/src/impl/entity_impl.hh +++ b/modules/mol/base/src/impl/entity_impl.hh @@ -31,7 +31,6 @@ #include <ost/mol/entity_view.hh> -#include <ost/mol/transform.hh> #include <ost/mol/residue_prop.hh> #include <ost/mol/impl/atom_impl_fw.hh> #include <ost/mol/impl/residue_impl_fw.hh> diff --git a/modules/mol/base/src/transform.hh b/modules/mol/base/src/transform.hh new file mode 100644 index 0000000000000000000000000000000000000000..a3cad4c8ba2b2976644b7957f07a23ab735a3241 --- /dev/null +++ b/modules/mol/base/src/transform.hh @@ -0,0 +1,6 @@ +#include <ost/geom/transform.hh> + +namespace ost { namespace mol { +#warning mol::Transform is deprecated, use geom::Transform instead + typedef geom::Transform Transform; +}} diff --git a/modules/mol/base/tests/test_coord_group.cc b/modules/mol/base/tests/test_coord_group.cc index 3c0cdc18fbe5fe139c930d0e7f54ad26cb5941ea..a26f2e2bd7dcfb296a62922792408e4b4c2c4b97 100644 --- a/modules/mol/base/tests/test_coord_group.cc +++ b/modules/mol/base/tests/test_coord_group.cc @@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE(coord_group) BOOST_CHECK(ac.GetPos()==geom::Vec3(-17,-18,-19)); BOOST_CHECK(ad.GetPos()==geom::Vec3(9,10,11)); - Transform tf; + geom::Transform tf; tf.ApplyXAxisRotation(17.0); tf.ApplyYAxisRotation(-135.0); tf.ApplyZAxisRotation(234.0); diff --git a/modules/mol/base/tests/test_entity.cc b/modules/mol/base/tests/test_entity.cc index 46a4de626f41d8a37c57c8b0292ab2e7605dca2b..d8ecd8f3b9a9007e84549d6b4a20e302a1a5fe67 100644 --- a/modules/mol/base/tests/test_entity.cc +++ b/modules/mol/base/tests/test_entity.cc @@ -181,7 +181,7 @@ BOOST_AUTO_TEST_CASE(transformation) BOOST_CHECK(eh.IsTransformationIdentity()==true); - Transform trans; + geom::Transform trans; trans.ApplyZAxisRotation(90.0); geom::Mat4 mat = trans.GetMatrix(); @@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE(transformation) CHECK_TRANSFORMED_ATOM_POSITION(atom3,tr_atom3); CHECK_ORIGINAL_ATOM_POSITION(atom3,orig_atom3); - Transform trans2; + geom::Transform trans2; trans2.ApplyXAxisTranslation(3.5); geom::Mat4 mat2 = trans2.GetMatrix();