MorphoGraphX
ClipRegion.hpp
Go to the documentation of this file.
1 //
2 // This file is part of MorphoGraphX - http://www.MorphoGraphX.org
3 // Copyright (C) 2012-2015 Richard S. Smith and collaborators.
4 //
5 // If you use MorphoGraphX in your work, please cite:
6 // http://dx.doi.org/10.7554/eLife.05864
7 //
8 // MorphoGraphX is free software, and is licensed under under the terms of the
9 // GNU General (GPL) Public License version 2.0, http://www.gnu.org/licenses.
10 //
11 #ifndef CLIP_REGION_H
12 #define CLIP_REGION_H
13 
19 #include <Config.hpp>
20 #include <GL.hpp>
21 
22 #include <Clip.hpp>
23 #include <Colors.hpp>
24 #include <Geometry.hpp>
25 #include <MGXViewer/qglviewer.h>
26 #include <Parms.hpp>
27 
28 #include <iostream>
29 
30 namespace mgx {
31 typedef util::Color<float> Color3f;
32 
38 class mgx_EXPORT ClipRegion {
39 public:
40  ClipRegion();
41  ~ClipRegion(){
42  };
43 
44  Clip* clip;
45 
46  void setClip(Clip* c);
47 
51  GLenum clip0;
55  GLenum clip1;
56 
58 
60  void readParms(util::Parms& parms, QString section);
61 
63  void writeParms(QTextStream& pout, QString section);
64 
66  void disable()
67  {
68  glDisable(clip0);
69  glDisable(clip1);
70  }
71 
73  void drawClip();
74 
76  void drawGrid(float width);
77 };
78 } // namespace mgx
79 #endif /*CLIP_REGION_H*/
void disable()
Draw (use) clipping place (ax + by + cz + d = 0)
Definition: ClipRegion.hpp:66
Defines the util::Parms class.
Class to handle rotatable pair of clipping planes.
Definition: ClipRegion.hpp:38
GLenum clip1
OpenGL identifier for the second clipping plane.
Definition: ClipRegion.hpp:55
Common definitions and utilities for all geometry algorithms This file is shared by cuda...
This namespace contains all the API of MorphoGraphX.
Definition: Assert.hpp:26
A utility class to parse L-Studio like parameter files.
Definition: Parms.hpp:115
Colors::ColorType GridColor
Color used to draw the grid.
Definition: ClipRegion.hpp:57
ColorType
Mesh1 and 2 must have the same order for their colors.
Definition: Colors.hpp:34
Definition: Clip.hpp:21
GLenum clip0
OpenGL identifier for the first clipping plane.
Definition: ClipRegion.hpp:51