gVirtualXRay  2.0.10
VirtualX-RayImagingLibraryonGPU
CuboidMesh.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (c) 2023, 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 __CuboidMesh_h
36 #define __CuboidMesh_h
37 
38 
68 //******************************************************************************
69 // Include
70 //******************************************************************************
71 #ifndef __gVirtualXRayConfig_h
73 #endif
74 
75 #include <string>
76 #include <vector>
77 
78 #ifndef __PolygonMesh_h
80 #endif
81 
82 
83 //******************************************************************************
84 // namespace
85 //******************************************************************************
86 namespace gVirtualXRay {
87 
88 
89 //==============================================================================
94 //==============================================================================
95 template<typename T> class CuboidMesh: public PolygonMesh
96 //------------------------------------------------------------------------------
97 {
98 //******************************************************************************
99 public:
100  //--------------------------------------------------------------------------
102  /*
103  * @param aWidth: the width of the cuboid, i.e. its length along the X-axis (default value: 1 cm)
104  * @param aHeight: the height of the cuboid, i.e. its length along the Y-axis (default value: 1 cm)
105  * @param aDepth: the depth of the cuboid, i.e. its length along the Z-axis (default value: 1 cm)
106  */
107  //--------------------------------------------------------------------------
108  CuboidMesh(double aWidth = 1.0 * cm,
109  double aHeight = 1.0 * cm,
110  double aDepth = 1.0 * cm,
111  int anIndexDataType = 0);
112 
113 
114  //--------------------------------------------------------------------------
116  /*
117  * @param aWidth: the width of the cuboid, i.e. its length along the X-axis (default value: 1 cm)
118  * @param aHeight: the height of the cuboid, i.e. its length along the Y-axis (default value: 1 cm)
119  * @param aDepth: the depth of the cuboid, i.e. its length along the Z-axis (default value: 1 cm)
120  */
121  //--------------------------------------------------------------------------
122  void create(double aWidth = 1.0 * cm,
123  double aHeight = 1.0 * cm,
124  double aDepth = 1.0 * cm,
125  int anIndexDataType = 0);
126 };
127 
128 
129 } // namespace gVirtualXRay
130 
131 
132 //******************************************************************************
133 #include "CuboidMesh.inl"
134 
135 
136 #endif // __CuboidMesh_h
CuboidMesh(double aWidth=1.0 *cm, double aHeight=1.0 *cm, double aDepth=1.0 *cm, int anIndexDataType=0)
Default constructor.
Definition: CuboidMesh.inl:71
Class to handle 3D meshes of cuboids.
void create(double aWidth=1.0 *cm, double aHeight=1.0 *cm, double aDepth=1.0 *cm, int anIndexDataType=0)
Create a new cuboid.
Definition: CuboidMesh.inl:84
PolygonMesh is a class to handle polygon (triangles) meshes.
Definition: PolygonMesh.h:114
const double cm
centimeter
Definition: Units.h:106
CuboidMesh is a class to handle 3D meshes of cuboids.
Definition: CuboidMesh.h:95
Class to handle polygon (triangles) meshes.