33 #ifndef __H__REMESHING__SIMPLE_GRID__
34 #define __H__REMESHING__SIMPLE_GRID__
80 template <
class TPosAcc,
class TIntAcc,
class TNormAcc>
83 TPosAcc& aaPos, TNormAcc& aaNorm,
103 template <
class TPosAcc,
class TIntAcc,
class TNormAcc>
105 Edge* e,
size_t size,
106 TPosAcc& aaPos, TNormAcc& aaNorm,
Base-class for edges.
Definition: grid_base_objects.h:397
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
Definition: simple_grid.h:45
std::vector< vector3 > vertices
Definition: simple_grid.h:48
std::vector< int > triangles
Definition: simple_grid.h:50
std::vector< vector3 > triangleNormals
Definition: simple_grid.h:51
std::vector< vector3 > vertexNormals
Definition: simple_grid.h:49
void clear()
Definition: simple_grid.cpp:42
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
Edge * SwapEdge(Grid &grid, Edge *e)
swaps e and thus reconnects its two adjacent triangles.
Definition: edge_util.cpp:793
TVertex * SplitEdge(Grid &grid, Edge *e, bool bConservative=false)
inserts new triangles and one new vertex by splitting the specified edge.
Definition: edge_util_impl.hpp:89
bool CollapseEdge(Grid &grid, Edge *e, Vertex *newVrt)
Collapses the specified edge performs local grid restructuring.
Definition: edge_util.cpp:403
double number
Definition: types.h:124
number GeometricApproximationDegree(vector_t &n1, vector_t &n2, vector_t &n3, vector_t &tn)
the returned degree lies between 0 and 1. The closer to 1 the better.
Definition: math_util_impl.hpp:932
void CalculateTriangleNormal(vector_t &vOut, const vector_t &v1, const vector_t &v2, const vector_t &v3)
Calculates a triangle-normal in 3d (output has length 1).
Definition: math_vector_functions_common_impl.hpp:528
void CalculateTriangleNormals(SimpleGrid &sg)
resizes sg.triangleNormals and calculates them
Definition: simple_grid.cpp:90
bool ObtainSimpleGrid_CollapseEdge(SimpleGrid &sgOut, Grid &grid, Edge *e, size_t size, TPosAcc &aaPos, TNormAcc &aaNorm, TIntAcc &aaInt)
returns a neighbourhood of the edge e after e has been collapsed.
Definition: simple_grid_impl.hpp:168
bool ObtainSimpleGrid(SimpleGrid &sgOut, Grid &grid, Vertex *vrt1, Vertex *vrt2, size_t size, TPosAcc &aaPos, TNormAcc &aaNorm, TIntAcc &aaInt)
returns a neighbourhood of the edge defined by vrt1 and vrt2 in a SimpleGrid.
Definition: simple_grid_impl.hpp:45
void PrintSimpleGrid(SimpleGrid &sg)
Definition: simple_grid.cpp:50
number ShapeQualityDegree(SimpleGrid &sg, int triIndex)
compares the area of the triangle to the length of its edges.
Definition: simple_grid.cpp:125