MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
iso_octree.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015, Simon Fuhrmann
3 * TU Darmstadt - Graphics, Capture and Massively Parallel Computing
4 * All rights reserved.
5 *
6 * This software may be modified and distributed under the terms
7 * of the BSD 3-Clause license. See the LICENSE.txt file for details.
8 */
9
10#ifndef FSSR_ISO_OCTREE_HEADER
11#define FSSR_ISO_OCTREE_HEADER
12
13#include <vector>
14
15#include "fssr/defines.h"
16#include "fssr/voxel.h"
17#include "fssr/octree.h"
18
20
25class IsoOctree : public Octree
26{
27public:
28 typedef std::vector<std::pair<VoxelIndex, VoxelData> > VoxelVector;
29
30public:
31 IsoOctree (void);
32
34 void clear (void);
35
37 void clear_voxel_data (void);
38
40 void compute_voxels (void);
41
43 VoxelVector const& get_voxels (void) const;
44
45private:
46 void compute_all_voxels (void);
47 VoxelData sample_ifn (math::Vec3d const& voxel_pos);
48 void print_progress (std::size_t voxels_done, std::size_t voxels_total);
49
50private:
51 VoxelVector voxels;
52};
53
55
56/* ------------------------- Implementation ---------------------------- */
57
59
60inline
61IsoOctree::IsoOctree (void)
62{
63}
64
65inline void
66IsoOctree::clear (void)
67{
68 this->clear_voxel_data();
69 this->Octree::clear();
70}
71
72inline void
73IsoOctree::clear_voxel_data (void)
74{
75 this->voxels.clear();
76}
77
78inline IsoOctree::VoxelVector const&
79IsoOctree::get_voxels (void) const
80{
81 return this->voxels;
82}
83
85
86#endif /* FSSR_ISO_OCTREE_HEADER */
This class computes the implicit function by querying function values at the octree primal vertices o...
Definition iso_octree.h:26
std::vector< std::pair< VoxelIndex, VoxelData > > VoxelVector
Definition iso_octree.h:28
A regular octree data structure (each node has zero or eight child nodes).
Definition octree.h:30
#define FSSR_NAMESPACE_END
Definition defines.h:14
#define FSSR_NAMESPACE_BEGIN
Definition defines.h:13
Stores per voxel data.
Definition voxel.h:61