/src/assimp/contrib/Open3DGC/o3dgcIndexedFaceSet.inl
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | Copyright (c) 2013 Khaled Mammou - Advanced Micro Devices, Inc. |
3 | | |
4 | | Permission is hereby granted, free of charge, to any person obtaining a copy |
5 | | of this software and associated documentation files (the "Software"), to deal |
6 | | in the Software without restriction, including without limitation the rights |
7 | | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
8 | | copies of the Software, and to permit persons to whom the Software is |
9 | | furnished to do so, subject to the following conditions: |
10 | | |
11 | | The above copyright notice and this permission notice shall be included in |
12 | | all copies or substantial portions of the Software. |
13 | | |
14 | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
15 | | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
16 | | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
17 | | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
18 | | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
19 | | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
20 | | THE SOFTWARE. |
21 | | */ |
22 | | |
23 | | #pragma once |
24 | | #ifndef O3DGC_INDEXED_FACE_SET_INL |
25 | | #define O3DGC_INDEXED_FACE_SET_INL |
26 | | |
27 | | #include <math.h> |
28 | | namespace o3dgc |
29 | | { |
30 | | template <class T> |
31 | | void IndexedFaceSet<T>::ComputeMinMax(O3DGCSC3DMCQuantizationMode quantMode) |
32 | 0 | { |
33 | 0 | ComputeVectorMinMax(m_coord , m_nCoord , 3, 3, m_coordMin , m_coordMax , quantMode); |
34 | 0 | ComputeVectorMinMax(m_normal , m_nNormal , 3, 3, m_normalMin , m_normalMax , quantMode); |
35 | 0 | unsigned long numFloatAttributes = GetNumFloatAttributes(); |
36 | 0 | for(unsigned long a = 0; a < numFloatAttributes; ++a) |
37 | 0 | { |
38 | 0 | ComputeVectorMinMax(m_floatAttribute[a], |
39 | 0 | m_nFloatAttribute[a], |
40 | 0 | m_dimFloatAttribute[a], |
41 | 0 | m_dimFloatAttribute[a], // stride |
42 | 0 | m_minFloatAttribute + (a * O3DGC_SC3DMC_MAX_DIM_ATTRIBUTES), |
43 | 0 | m_maxFloatAttribute + (a * O3DGC_SC3DMC_MAX_DIM_ATTRIBUTES), quantMode); |
44 | 0 | } |
45 | 0 | } |
46 | | } |
47 | | #endif // O3DGC_INDEXED_FACE_SET_INL |