gVirtualXRay  2.0.10
VirtualX-RayImagingLibraryonGPU
BoneMesh.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 __BoneMesh_h
36 #define __BoneMesh_h
37 
38 
56 //******************************************************************************
57 // Include
58 //******************************************************************************
59 
60 #ifndef INTERNALORGANMESH_H
62 #endif
63 
64 //******************************************************************************
65 // namespace
66 //******************************************************************************
67 namespace gVirtualXRay {
68 
69 
70 //==============================================================================
76 //==============================================================================
78 //------------------------------------------------------------------------------
79 {
80 //******************************************************************************
81 public:
82  //--------------------------------------------------------------------------
84  /*
85  * @param texture_3D_size: size of the side of the buffer of
86  * the 3D texture (default: 32)
87  */
88  //--------------------------------------------------------------------------
89  BoneMesh(unsigned int texture_3D_size = 32);
90 
91  //--------------------------------------------------------------------------
93  //--------------------------------------------------------------------------
94  virtual ~BoneMesh();
95 
96  //--------------------------------------------------------------------------
98  //--------------------------------------------------------------------------
99  virtual bool isSoftTissue() const;
100 
101  //--------------------------------------------------------------------------
103 
110  //--------------------------------------------------------------------------
111  virtual void updateVBO(int aTypeOfVBO, int aTypeOfPrimitive);
112 
113  //--------------------------------------------------------------------------
115  /*
116  * @param aShaderID: The GLSL shader used to display the anatomical mesh
117  */
118  //-------------------------------------------------------------------------
119  virtual void defineDisplayShaderInput(int shader_id);
120 
121 
122  //--------------------------------------------------------------------------
125  //--------------------------------------------------------------------------
126  virtual void initialize();
127 
128 
129 //******************************************************************************
130 protected:
131  //--------------------------------------------------------------------------
133  //--------------------------------------------------------------------------
134  virtual void generateTextures();
135 
136  //-------------------------------------------------------------------------
138  /*
139  * @param shader_id: The GLSL shader
140  */
141  //-------------------------------------------------------------------------
142  virtual void defineBumpMapShaderInput(int shader_id);
143 
144  //--------------------------------------------------------------------------
147  /*
148  * @param shader_id: The GLSL shader
149  */
150  //-------------------------------------------------------------------------
151  virtual void defineColourTextureShaderInput(int shader_id);
152 };
153 
154 } // namespace gVirtualXRay
155 
156 #endif // __BoneMesh_h
virtual void initialize()
BoneMesh is a class to handle a polygon mesh for Bone, with thin bumps stored using a 3D texture...
Definition: BoneMesh.h:77
InternalOrganMesh is a class to handle a polygon mesh for an internal organ. Internal organs use bump...
virtual bool isSoftTissue() const
return true if the mesh represent a soft tissue
Class to handle a polygon mesh for an internal organ.
virtual void defineBumpMapShaderInput(int shader_id)
Link the attributes to their id in the shader bump map generation.
virtual void defineColourTextureShaderInput(int shader_id)
virtual ~BoneMesh()
Destructor.
BoneMesh(unsigned int texture_3D_size=32)
Default Constructor.
virtual void generateTextures()
generates the textures
virtual void updateVBO(int aTypeOfVBO, int aTypeOfPrimitive)
Update the VBO.
virtual void defineDisplayShaderInput(int shader_id)
Link the attributes to their id in the shader.