OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
trace_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-2020 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_TRACE_RENDERER_BASE_HH
20 #define OST_GFX_IMPL_TRACE_RENDERER_BASE_HH
21 
22 /*
23  Authors: Marco Biasini, Ansgar Philippsen
24 */
25 
26 #include <ost/gfx/module_config.hh>
29 
30 namespace ost { namespace gfx { namespace impl {
31 
41 public:
42  TraceRendererBase(BackboneTrace* trace, int overshoot);
43 
44  virtual geom::AlignedCuboid GetBoundingBox() const;
45 
46  virtual void PrepareRendering(bool twist_hack);
47  virtual bool HasDataToRender() const;
48  virtual void UpdateViews();
49  virtual void Apply(const gfx::ByElementColorOp& op);
50  virtual void Apply(const gfx::ByChainColorOp& op);
51  virtual void Apply(const gfx::UniformColorOp& op);
52  virtual void Apply(const gfx::GradientLevelColorOp& op);
53  virtual void Apply(const gfx::EntityViewColorOp& op);
54  virtual void Apply(const gfx::MapHandleColorOp& op);
55  virtual void PickAtom(const geom::Line3& line, Real line_width,
56  mol::AtomHandle& picked_atom);
57 
58  virtual void PickBond(const geom::Line3& line, Real line_width,
59  mol::BondHandle& picked_bond);
60 protected:
61 
62  void set_node_colors(const Color& c, const mol::Query& q, ColorMask mask);
63 
64  void rebuild_sel(const SplineEntryListList& spline_list_list,
65  SplineEntryListList& sel_spline_list_list,
66  const Color& sel_color);
67 
71 };
72 
73 }}}
74 
75 #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
unsigned char ColorMask
Definition: color_op.hh:43
std::vector< SplineEntryList > SplineEntryListList
Selection Query.
Definition: query.hh:74
chemical bond
Definition: bond_handle.hh:34