OpenStructure
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 
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
axis-aligned cuboid
Line3.
Definition: composite3.hh:39
virtual void Apply(const gfx::UniformColorOp &op)
void rebuild_sel(const SplineEntryListList &spline_list_list, SplineEntryListList &sel_spline_list_list, const Color &sel_color)
TraceRendererBase(BackboneTrace *trace, int overshoot)
virtual void Apply(const gfx::MapHandleColorOp &op)
virtual void PickBond(const geom::Line3 &line, Real line_width, mol::BondHandle &picked_bond)
pick bond
virtual void Apply(const gfx::ByChainColorOp &op)
virtual void Apply(const gfx::EntityViewColorOp &op)
virtual void Apply(const gfx::ByElementColorOp &op)
virtual bool HasDataToRender() const
virtual void UpdateViews()
update views
virtual void Apply(const gfx::GradientLevelColorOp &op)
virtual geom::AlignedCuboid GetBoundingBox() const
virtual void PrepareRendering(bool twist_hack)
void set_node_colors(const Color &c, const mol::Query &q, ColorMask mask)
virtual void PickAtom(const geom::Line3 &line, Real line_width, mol::AtomHandle &picked_atom)
pick atom
Handle to atom datatype.
Definition: atom_handle.hh:37
chemical bond
Definition: bond_handle.hh:35
Selection Query.
Definition: query.hh:74
#define DLLEXPORT_OST_GFX
float Real
Definition: base.hh:44
std::vector< SplineEntryList > SplineEntryListList
unsigned char ColorMask
Definition: color_op.hh:43
Definition: base.dox:1