-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathLargeVoxelSphere.h
37 lines (29 loc) · 1.13 KB
/
LargeVoxelSphere.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Copyrighted under the MPLv2 and LGPLv3 by Jesse Johnson.
#ifndef __LargeVoxelSphere_h_
#define __LargeVoxelSphere_h_
#include "OgreManualObject.h"
#include "PolyVox/CubicSurfaceExtractor.h"
#include "PolyVox/MarchingCubesSurfaceExtractor.h"
#include "PolyVox/PagedVolume.h"
typedef uint8_t BYTE;
class LargeVoxelSphere : public Ogre::ManualObject
{
public:
LargeVoxelSphere(const Ogre::String& name);
virtual ~LargeVoxelSphere();
virtual void generate(float radius);
virtual void mesh();
private:
PolyVox::LargeVolume<BYTE>* mVolumeData;
//static PolyVox::Vector3DFloat mVolCenter;
//static int mRadius;
class VoxelSpherePager : public PolyVox::PagedVolume<BYTE>::Pager
{
void pageIn(const PolyVox::Region& region, PolyVox::PagedVolume<BYTE>::Chunk* chunk);
void pageOut(const PolyVox::Region& region, PolyVox::PagedVolume<BYTE>::Chunk* chunk);
};
};
#endif // #ifndef __LargeVoxelSphere_h_