OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
cartoon_render_options.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 /*
20  Author: Stefan Scheuber
21 */
22 
23 #ifndef OST_GFX_CARTOON_RENDER_OPTIONS_HH
24 #define OST_GFX_CARTOON_RENDER_OPTIONS_HH
25 
26 #include <boost/shared_ptr.hpp>
27 
28 #include <ost/gfx/module_config.hh>
29 
30 #include "render_options.hh"
31 
32 namespace ost { namespace gfx {
33 
35 public:
36  CartoonRenderOptions(bool force_tube=false);
37 
38  // RenderOptions interface
39  virtual RenderMode::Type GetRenderMode();
40  virtual bool CanApplyRenderOptions(RenderOptionsPtr render_options);
41  virtual void ApplyRenderOptions(RenderOptionsPtr render_options);
42 
44  void SetPolyMode(uint poly_mode);
45  uint GetPolyMode() const;
46 
48  void SetSplineDetail(uint spline_detail);
49  uint GetSplineDetail() const;
50 
52  void SetArcDetail(uint arc_detail);
53  uint GetArcDetail() const;
54 
56  void SetNormalSmoothFactor(float smooth_factor);
57  float GetNormalSmoothFactor() const;
58 
59  // tube/coil region
60  void SetTubeRadius(float tube_radius);
61  float GetTubeRadius() const;
62  void SetTubeRatio(float tube_ratio);
63  float GetTubeRatio() const;
64  unsigned int GetTubeProfileType() const;
65  void SetTubeProfileType(unsigned int);
66 
67  // helix
68  void SetHelixWidth(float helix_width);
69  float GetHelixWidth() const;
70  void SetHelixThickness(float helix_thickness);
71  float GetHelixThickness() const;
73  void SetHelixEcc(float helix_ecc);
74  float GetHelixEcc() const;
76  void SetHelixProfileType(unsigned int);
77  unsigned int GetHelixProfileType() const;
79  unsigned int GetHelixMode() const;
80  void SetHelixMode(unsigned int);
81 
82  // strand
83  void SetStrandWidth(float strand_width);
84  float GetStrandWidth() const;
85  void SetStrandThickness(float strand_thickness);
86  float GetStrandThickness() const;
88  void SetStrandEcc(float strand_ecc);
89  float GetStrandEcc() const;
91  void SetStrandProfileType(unsigned int);
92  unsigned int GetStrandProfileType() const;
94  void SetStrandMode(unsigned int);
95  unsigned int GetStrandMode() const;
96 
97  // misc options
98 
100  void SetColorBlendMode(unsigned int);
101  unsigned int GetColorBlendMode() const;
102 
104  void SetTwistHack(bool);
105  bool GetTwistHack() const {return twist_hack_;}
106 
107  // used internally to calculate autoslab boundaries
108  float GetMaxRad() const;
109 
110 private:
111  bool force_tube_;
112  uint spline_detail_;
113  uint poly_mode_;
114  uint arc_detail_;
115 
116  float smooth_factor_;
117 
118  float tube_radius_;
119  float tube_ratio_;
120  unsigned int tube_profile_;
121  float helix_width_;
122  float helix_thickness_;
123  float helix_ecc_;
124  unsigned int helix_profile_;
125  unsigned int helix_mode_;
126  float strand_width_;
127  float strand_thickness_;
128  float strand_ecc_;
129  unsigned int strand_profile_;
130  unsigned int strand_mode_;
131 
132  unsigned int color_blend_mode_;
133 
134  bool twist_hack_;
135 };
136 
137 typedef boost::shared_ptr<CartoonRenderOptions> CartoonRenderOptionsPtr;
138 
139 }}
140 
141 #endif /* OST_GFX_CARTOON_RENDER_OPTIONS_HH */
#define DLLEXPORT_OST_GFX
boost::shared_ptr< CartoonRenderOptions > CartoonRenderOptionsPtr
boost::shared_ptr< RenderOptions > RenderOptionsPtr
unsigned int uint
Definition: base.hh:29