gVirtualXRay  2.0.10
VirtualX-RayImagingLibraryonGPU
LungsMesh.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (c) 2017, Dr Franck P. Vidal (franck.p.vidal@fpvidal.net),
4 http://www.fpvidal.net/
5 All rights reserved.
6 
7 Redistribution and use in source and binary forms, with or without modification,
8 are permitted provided that the following conditions are met:
9 
10 1. Redistributions of source code must retain the above copyright notice,
11 this list of conditions and the following disclaimer.
12 
13 2. Redistributions in binary form must reproduce the above copyright notice,
14 this list of conditions and the following disclaimer in the documentation and/or
15 other materials provided with the distribution.
16 
17 3. Neither the name of the Bangor University nor the names of its contributors
18 may be used to endorse or promote products derived from this software without
19 specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 
32 */
33 
34 
35 #ifndef __LungsMesh_h
36 #define __LungsMesh_h
37 
55 //******************************************************************************
56 // Include
57 //******************************************************************************
58 
59 #ifndef SOFT_TISSUE_MESH_H
61 #endif
62 
63 //******************************************************************************
64 // namespace
65 //******************************************************************************
66 namespace gVirtualXRay {
67 
68 
69 //==============================================================================
75 //==============================================================================
77 //------------------------------------------------------------------------------
78 {
79 //******************************************************************************
80 public:
81  //--------------------------------------------------------------------------
83  /*
84  * @param x_mirror: To know if the mesh is upside down for the x axis
85  * (default: false)
86  * @param y_mirror: To know if the mesh is upside down for the y axis
87  * (default: false)
88  * @param z_mirror: To know if the mesh is upside down for the z axis
89  * (default: false)
90  * @param texture_2D_size: Size of the side of the buffer
91  * of the 2D texture
92  * (default: 2048)
93  * @param texture_3D_size: Size of the side of the buffer
94  * of the 3D texture (default: 32)
95  * @param optimize_texture_coordinates: To know if the texture
96  * coordinates need to be optimized
97  * (default: true)
98  */
99  //--------------------------------------------------------------------------
100  LungsMesh(bool x_mirror = false,
101  bool y_mirror = false,
102  bool z_mirror = false,
103  bool optimize_texture_coordinates = true,
104  unsigned int texture_2D_size = 2048,
105  unsigned int texture_3D_size = 32);
106 
107 
108  //--------------------------------------------------------------------------
110  //--------------------------------------------------------------------------
111  virtual ~LungsMesh();
112 
113 
114 //******************************************************************************
115 protected:
116  //--------------------------------------------------------------------------
118  /*
119  * @param shader_id: The GLSL shader
120  */
121  //-------------------------------------------------------------------------
122  virtual void defineBumpMapShaderInput(int shader_id);
123 
124 
125  //--------------------------------------------------------------------------
128  /*
129  * @param shader_id: The GLSL shader
130  */
131  //-------------------------------------------------------------------------
132  virtual void defineColourTextureShaderInput(int shader_id);
133 
134 
135  // To know if the model is upside down to draw the lines
139 
140 };
141 
142 
143 } // namespace gVirtualXRay
144 
145 
146 #endif // __LungsMesh_h
SoftTissueMesh is a class to handle a polygon mesh for an internal organ. It uses procedural texturin...
virtual void defineColourTextureShaderInput(int shader_id)
virtual ~LungsMesh()
Destructor.
Class to handle a polygon mesh for an internal organ.
LungsMesh is a class to handle a polygon mesh for a lung. It uses 2D texture for the bump map and 3D ...
Definition: LungsMesh.h:76
LungsMesh(bool x_mirror=false, bool y_mirror=false, bool z_mirror=false, bool optimize_texture_coordinates=true, unsigned int texture_2D_size=2048, unsigned int texture_3D_size=32)
Constructor.
virtual void defineBumpMapShaderInput(int shader_id)
Link the attributes to their id in the shader bump map generation.