MVE - Multi-View Environment mve-devel
|
Classes | |
class | IsoOctree |
This class computes the implicit function by querying function values at the octree primal vertices of the leaf nodes, called voxels. More... | |
class | IsoSurface |
The surfacing algorithm requires the octree hierarchy and the vector of voxels. More... | |
class | MinAreaTriangulation |
Computes the minimum area triangulation of a polygon. More... | |
class | Octree |
A regular octree data structure (each node has zero or eight child nodes). More... | |
struct | Sample |
Representation of a point sample. More... | |
class | SampleIO |
Reads samples from a PLY file. More... | |
struct | VoxelData |
Stores per voxel data. More... | |
struct | VoxelIndex |
The voxel index is a unique 64 bit ID for each voxel in the octree. More... | |
Typedefs | |
typedef std::vector< Sample > | SampleList |
Representation of a list of samples. | |
Enumerations | |
enum | InterpolationType { INTERPOLATION_LINEAR , INTERPOLATION_SCALING , INTERPOLATION_LSDERIV , INTERPOLATION_CUBIC } |
Functions | |
std::size_t | clean_caps (mve::TriangleMesh::Ptr mesh) |
Cleans caps from the mesh by removing vertices with only three adjacent triangles. | |
std::size_t | clean_mc_mesh (mve::TriangleMesh::Ptr mesh, float needle_ratio_thres=0.4f) |
Removes degenerated triangles from the mesh typical for Marching Cubes. | |
std::size_t | clean_needles (mve::TriangleMesh::Ptr mesh, float needle_ratio_thres) |
Cleans needles from the mesh by collapsing short edges of degenerated triangles. | |
bool | edge_collapse (mve::TriangleMesh::Ptr mesh, mve::MeshInfo &mesh_info, std::size_t v1, std::size_t v2, math::Vec3f const &new_vert, std::vector< std::size_t > const &afaces, float acos_threshold=0.95f) |
void | evaluate (math::Vec3f const &pos, Sample const &sample, double *value, double *weight, math::Vector< double, 3 > *value_deriv, math::Vector< double, 3 > *weight_deriv) |
Rotates the given point in the LCS of the sample, evaluates the basis and weight functions and their derivatives, and rotates the derivatives back to the global coordinate system. | |
double | find_root_cubic (double a0, double a1, double a2, double a3) |
Finds the root of a cubic function f(x) = a0 + a1 * x + a2 * x^2 + a3 * x^3. | |
double | find_root_linear (double a0, double a1) |
Finds the root of a linear function f(x) = a0 + a1(x). | |
double | find_root_square (double a0, double a1, double a2) |
Finds the root of a quadratic function f(x) = a0 + a1 * x + a2 * x^2. | |
template<typename T > | |
T | fssr_basis (T const &scale, math::Vector< T, 3 > const &pos, math::Vector< T, 3 > *deriv=nullptr) |
Evaluates the FSSR basis function and directional derivatives (optional). | |
template<typename T > | |
T | fssr_weight (T const &scale, math::Vector< T, 3 > const &pos, math::Vector< T, 3 > *deriv=nullptr) |
Evaluates the FSSR weight function and directional derivatives (optional). | |
template<typename T > | |
T | gaussian (T const &sigma, math::Vector< T, 3 > const &x) |
The Gaussian function in 3D. | |
template<typename T > | |
T | gaussian_normalized (T const &sigma, math::Vector< T, 3 > const &x) |
The normalized Gaussian function in 3D. | |
double | interpolate_root (double v0, double v1, double d0, double d1, InterpolationType type=INTERPOLATION_CUBIC) |
Interpolates the root of an unknown function f(x) given value and derivative constraints: f(0) = v0, f(1) = v1, f'(0) = d0, f'(1) = d1. | |
VoxelData | interpolate_voxel (VoxelData const &d1, float w1, VoxelData const &d2, float w2) |
Interpolates between two VoxelData objects for Marching Cubes. | |
void | rotation_from_normal (math::Vec2f const &normal, math::Matrix2f *rot) |
Generates a rotation matrix that transforms in the FSSR LCS. | |
void | rotation_from_normal (math::Vec3f const &normal, math::Matrix3f *rot) |
Generates a rotation matrix that transforms in the FSSR LCS. | |
bool | sample_scale_compare (Sample const *s1, Sample const *s2) |
Comparator that orders samples according to scale. | |
math::Vec3f | transform_position (math::Vec3f const &pos, Sample const &sample) |
Transforms 'pos' according to the samples position and normal. | |
typedef std::vector<Sample> fssr::SampleList |
std::size_t fssr::clean_caps | ( | mve::TriangleMesh::Ptr | mesh | ) |
Cleans caps from the mesh by removing vertices with only three adjacent triangles.
The number of successful edge collapses is returned.
Definition at line 205 of file mesh_clean.cc.
std::size_t fssr::clean_mc_mesh | ( | mve::TriangleMesh::Ptr | mesh, |
float | needle_ratio_thres = 0.4f |
||
) |
Removes degenerated triangles from the mesh typical for Marching Cubes.
The routine first cleans needles, then caps, then remaining needles.
Definition at line 245 of file mesh_clean.cc.
std::size_t fssr::clean_needles | ( | mve::TriangleMesh::Ptr | mesh, |
float | needle_ratio_thres | ||
) |
Cleans needles from the mesh by collapsing short edges of degenerated triangles.
The number of successful edge collapses is returned.
Definition at line 151 of file mesh_clean.cc.
bool fssr::edge_collapse | ( | mve::TriangleMesh::Ptr | mesh, |
mve::MeshInfo & | mesh_info, | ||
std::size_t | v1, | ||
std::size_t | v2, | ||
math::Vec3f const & | new_vert, | ||
std::vector< std::size_t > const & | afaces, | ||
float | acos_threshold = 0.95f |
||
) |
Definition at line 19 of file mesh_clean.cc.
void fssr::evaluate | ( | math::Vec3f const & | pos, |
Sample const & | sample, | ||
double * | value, | ||
double * | weight, | ||
math::Vector< double, 3 > * | value_deriv, | ||
math::Vector< double, 3 > * | weight_deriv | ||
) |
Rotates the given point in the LCS of the sample, evaluates the basis and weight functions and their derivatives, and rotates the derivatives back to the global coordinate system.
Definition at line 21 of file basis_function.cc.
double fssr::find_root_cubic | ( | double | a0, |
double | a1, | ||
double | a2, | ||
double | a3 | ||
) |
Finds the root of a cubic function f(x) = a0 + a1 * x + a2 * x^2 + a3 * x^3.
The code assumes a single root in [0, 1]. If [0, 1] contains more than one root, linear interpolation is used. In the case with two distinct roots (one single, one double root), the double root is ignored.
Definition at line 55 of file hermite.cc.
double fssr::find_root_linear | ( | double | a0, |
double | a1 | ||
) |
Finds the root of a linear function f(x) = a0 + a1(x).
The method produces unstable results if a1 ~ 0.
Definition at line 22 of file hermite.cc.
double fssr::find_root_square | ( | double | a0, |
double | a1, | ||
double | a2 | ||
) |
Finds the root of a quadratic function f(x) = a0 + a1 * x + a2 * x^2.
The code assumes a root in [0, 1] and the root closer to 0.5 is returned.
Definition at line 28 of file hermite.cc.
|
inline |
Evaluates the FSSR basis function and directional derivatives (optional).
The basis function is a Gaussian derivative in the direction of the normal and a regular Gaussian orthogonal to the normal. Here, the normal direction is defined to be the positive x-axis, thus 'pos' must be translated and rotated into the sample's LCS. The function takes positive values in front and negative values behind the sample.
Definition at line 111 of file basis_function.h.
T fssr::fssr_weight | ( | T const & | scale, |
math::Vector< T, 3 > const & | pos, | ||
math::Vector< T, 3 > * | deriv = nullptr |
||
) |
Evaluates the FSSR weight function and directional derivatives (optional).
The weight function is composed of polynomials up to the forth degree. The function is one in the center, and falls of to zero at 3 * scale. Similar to fssr_basis(), it expects 'pos' to be in the sample's LCS.
Definition at line 135 of file basis_function.h.
|
inline |
The Gaussian function in 3D.
Definition at line 95 of file basis_function.h.
|
inline |
The normalized Gaussian function in 3D.
Definition at line 102 of file basis_function.h.
double fssr::interpolate_root | ( | double | v0, |
double | v1, | ||
double | d0, | ||
double | d1, | ||
InterpolationType | type = INTERPOLATION_CUBIC |
||
) |
Interpolates the root of an unknown function f(x) given value and derivative constraints: f(0) = v0, f(1) = v1, f'(0) = d0, f'(1) = d1.
First, a polynomial function is fit to the constraints, then the root in the interval [0, 1] is determined.
Definition at line 145 of file hermite.cc.
void fssr::rotation_from_normal | ( | math::Vec2f const & | normal, |
math::Matrix2f * | rot | ||
) |
Generates a rotation matrix that transforms in the FSSR LCS.
Definition at line 82 of file basis_function.cc.
void fssr::rotation_from_normal | ( | math::Vec3f const & | normal, |
math::Matrix3f * | rot | ||
) |
Generates a rotation matrix that transforms in the FSSR LCS.
Definition at line 50 of file basis_function.cc.
|
inline |
Transforms 'pos' according to the samples position and normal.
Definition at line 252 of file basis_function.h.