OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
connect_renderer_base.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2011 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_GFX_IMPL_CONNECT_RENDERER_HH
20 #define OST_GFX_IMPL_CONNECT_RENDERER_HH
21 
22 #include <ost/gfx/module_config.hh>
25 /*
26  Author: Marco Biasini, Ansgar Philippsen
27  */
28 namespace ost { namespace gfx { namespace impl {
29 
35 public:
37 
38  virtual void PrepareRendering();
39 
40  virtual geom::AlignedCuboid GetBoundingBox() const;
41 
42  virtual void Apply(const gfx::ByElementColorOp& op);
43  virtual void Apply(const gfx::ByChainColorOp& op);
44  virtual void Apply(const gfx::UniformColorOp& op);
45  virtual void Apply(const gfx::GradientLevelColorOp& op);
46  virtual void Apply(const gfx::EntityViewColorOp& op);
47 
48  virtual void PickAtom(const geom::Line3& line, Real line_width,
49  mol::AtomHandle& picked_atom);
50 #if OST_IMG_ENABLED
51  virtual void Apply(const gfx::MapHandleColorOp& op);
52 #endif
53 
54  virtual void PickBond(const geom::Line3& line, Real line_width,
55  mol::BondHandle& picked_bond);
56  virtual void UpdateViews();
57 protected:
58  void SetFixedPickRadius(float radius) { pick_radius_=radius;}
59  bool HasFixedPickRadius() const { return pick_radius_!=0.0; }
60  float GetFixedPickRadius() const { return pick_radius_; }
61 
62 protected:
63  float pick_radius_;
66 };
67 
68 }}}
69 
70 #endif
Handle to atom datatype.
Definition: atom_handle.hh:37
float Real
Definition: base.hh:44
axis-aligned cuboid
Line3.
Definition: composite3.hh:39
#define DLLEXPORT_OST_GFX
chemical bond
Definition: bond_handle.hh:34