Graphite  Version 3
An experimental 3D geometry processing program
pdb_mesh_grob_shader.h
1 /*
2  * OGF/Graphite: Geometry and Graphics Programming Library + Utilities
3  * Copyright (C) 2000-2009 INRIA - Project ALICE
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *
19  * If you modify this software, you should include a notice giving the
20  * name of the person performing the modification, the date of modification,
21  * and the reason for such modification.
22  *
23  * Contact: Bruno Levy - levy@loria.fr
24  *
25  * Project ALICE
26  * LORIA, INRIA Lorraine,
27  * Campus Scientifique, BP 239
28  * 54506 VANDOEUVRE LES NANCY CEDEX
29  * FRANCE
30  *
31  * Note that the GNU General Public License does not permit incorporating
32  * the Software into proprietary programs.
33  *
34  * As an exception to the GPL, Graphite can be linked with
35  * the following (non-GPL) libraries:
36  * Qt, SuperLU, WildMagic and CGAL
37  */
38 
39 #ifndef H_OGF_MESH_GFX_SHADERS_MESH_GROB_PDB_SHADER_H
40 #define H_OGF_MESH_GFX_SHADERS_MESH_GROB_PDB_SHADER_H
41 
42 #include <OGF/mesh_gfx/common/common.h>
44 
49 namespace OGF {
50 
51  gom_class MESH_GFX_API PDBMeshGrobShader : public MeshGrobShader {
52  public:
53 
59 
63  ~PDBMeshGrobShader() override;
64 
65 
66  enum AtomColoring { constant, atom, chain };
67 
68  gom_properties:
74  void set_lighting(bool value) {
75  lighting_ = value;
76  update();
77  }
78 
84  bool get_lighting() const {
85  return lighting_;
86  }
87 
88  void set_atom_colors(AtomColoring x) {
89  atom_colors_ = x;
90  update();
91  }
92 
93  AtomColoring get_atom_colors() const {
94  return atom_colors_;
95  }
96 
97  void set_atom_size(index_t value) {
98  atom_size_ = value;
99  update();
100  }
101 
102  index_t get_atom_size() const {
103  return atom_size_;
104  }
105 
106  public:
107 
111  void draw() override;
112 
113  private:
114  bool lighting_;
115  AtomColoring atom_colors_;
116  index_t atom_size_;
117  };
118 
119 }
120 
121 #endif
Base class for drawing and picking MeshGrob.
A Grob wrapper around Geogram's Mesh class.
Definition: mesh_grob.h:56
update()
Redraws the scene.
PDBMeshGrobShader(MeshGrob *grob)
PDBMeshGrobShader constructor.
bool get_lighting() const
Gets whether lighting is used.
void draw() override
Draws the Grob.
~PDBMeshGrobShader() override
PDBMeshGrobShader destructor.
Classes for drawing and picking MeshGrob.
geo_index_t index_t
The type for storing and manipulating indices.
Definition: numeric.h:329
Global Graphite namespace.
Definition: common.h:76