PolyVox  0.2.1
Open source voxel management library
BaseVolume.inl
Go to the documentation of this file.
1 /*******************************************************************************
2 Copyright (c) 2005-2009 David Williams
3 
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7 
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11 
12  1. The origin of this software must not be misrepresented; you must not
13  claim that you wrote the original software. If you use this software
14  in a product, an acknowledgment in the product documentation would be
15  appreciated but is not required.
16 
17  2. Altered source versions must be plainly marked as such, and must not be
18  misrepresented as being the original software.
19 
20  3. This notice may not be removed or altered from any source
21  distribution.
22 *******************************************************************************/
23 
24 namespace PolyVox
25 {
31  template <typename VoxelType>
33  :m_regValidRegion(regValid)
34  {
35  }
36 
44  template <typename VoxelType>
46  {
47  assert(false); // See function comment above.
48  }
49 
53  template <typename VoxelType>
55  {
56  }
57 
65  template <typename VoxelType>
67  {
68  assert(false); // See function comment above.
69  }
70 
76  template <typename VoxelType>
78  {
79  assert(false);
80  return VoxelType();
81  }
82 
86  template <typename VoxelType>
88  {
89  return m_regValidRegion;
90  }
91 
96  template <typename VoxelType>
98  {
99  return m_regValidRegion.getUpperCorner().getX() - m_regValidRegion.getLowerCorner().getX() + 1;
100  }
101 
106  template <typename VoxelType>
108  {
109  return m_regValidRegion.getUpperCorner().getY() - m_regValidRegion.getLowerCorner().getY() + 1;
110  }
111 
116  template <typename VoxelType>
118  {
119  return m_regValidRegion.getUpperCorner().getZ() - m_regValidRegion.getLowerCorner().getZ() + 1;
120  }
121 
127  template <typename VoxelType>
129  {
130  return m_uShortestSideLength;
131  }
132 
138  template <typename VoxelType>
140  {
141  return m_uLongestSideLength;
142  }
143 
150  template <typename VoxelType>
152  {
153  return m_fDiagonalLength;
154  }
155 
162  template <typename VoxelType>
163  VoxelType BaseVolume<VoxelType>::getVoxelAt(int32_t /*uXPos*/, int32_t /*uYPos*/, int32_t /*uZPos*/) const
164  {
165  assert(false);
166  return VoxelType();
167  }
168 
173  template <typename VoxelType>
175  {
176  assert(false);
177  return VoxelType();
178  }
179 
183  template <typename VoxelType>
185  {
186  assert(false);
187  }
188 
196  template <typename VoxelType>
197  bool BaseVolume<VoxelType>::setVoxelAt(int32_t /*uXPos*/, int32_t /*uYPos*/, int32_t /*uZPos*/, VoxelType /*tValue*/)
198  {
199  assert(false);
200  return false;
201  }
202 
208  template <typename VoxelType>
209  bool BaseVolume<VoxelType>::setVoxelAt(const Vector3DInt32& /*v3dPos*/, VoxelType /*tValue*/)
210  {
211  assert(false);
212  return false;
213  }
214 
218  template <typename VoxelType>
220  {
221  return getWidth() * getHeight() * getDepth() * sizeof(VoxelType);
222  }
223 }
224