|
void | Define (ea::span< const Vector3 > positions) |
| Define mesh from vertices.
|
|
void | CollectEdges (ea::vector< ea::pair< unsigned, unsigned > > &edges) |
| Collect all edges in the mesh, e.g. for debug rendering.
|
|
HighPrecisionSphere | GetTetrahedronCircumsphere (unsigned tetIndex) const |
| Calculate circumsphere of given tetrahedron.
|
|
Vector4 | GetInnerBarycentricCoords (unsigned tetIndex, const Vector3 &position) const |
| Calculate barycentric coordinates for inner tetrahedron.
|
|
Vector4 | GetOuterBarycentricCoords (unsigned tetIndex, const Vector3 &position) const |
| Calculate barycentric coordinates for outer tetrahedron.
|
|
Vector4 | GetBarycentricCoords (unsigned tetIndex, const Vector3 &position) const |
| Calculate barycentric coordinates for tetrahedron.
|
|
Vector4 | GetInterpolationFactors (const Vector3 &position, unsigned &tetIndexHint) const |
| Find tetrahedron containing given position and calculate barycentric coordinates within this tetrahedron.
|
|
template<class Container > |
auto | Sample (const Container &container, const Vector3 &position, unsigned &tetIndexHint) const |
| Sample value at given position from the arbitrary container of per-vertex data.
|
|
|
unsigned | FindTetrahedron (const Vector3 &position, ea::vector< bool > &removed) const |
| Find tetrahedron for given position. Ignore removed tetrahedrons. Return invalid index if cannot find.
|
|
void | InitializeSuperMesh (const BoundingBox &boundingBox) |
| Create super-mesh for Delaunay triangulation.
|
|
void | BuildTetrahedrons (ea::span< const Vector3 > positions) |
| Build tetrahedrons for given positions.
|
|
bool | IsAdjacencyValid (bool fullyConnected) const |
| Return whether the adjacency is valid.
|
|
void | DisconnectTetrahedron (unsigned tetIndex) |
| Disconnect tetrahedron from mesh.
|
|
bool | FindAndRemoveIntersected (DelaunayContext &ctx, const Vector3 &position, TetrahedralMeshSurface &holeSurface, ea::vector< unsigned > &removedTetrahedrons, bool dumpErrors=false) const |
|
void | DisconnectRemovedTetrahedrons (const ea::vector< unsigned > &removedTetrahedrons) |
| Disconnect removed tetrahedrons from the rest.
|
|
void | FillStarShapedHole (DelaunayContext &ctx, const ea::vector< unsigned > &outputTetrahedrons, const TetrahedralMeshSurface &holeSurface, unsigned centerIndex) |
|
void | DisconnectSuperMeshTetrahedrons (ea::vector< bool > &removed) |
| Mark super-mesh tetrahedrons in the to-be-removed array and disconnect all related adjacency.
|
|
void | EnsureMeshConnectivity (ea::vector< bool > &removed) |
| Ensure mesh connectivity, remove disconnected parts.
|
|
void | FilterMeshSurface (ea::vector< bool > &removed) |
| Collect surface tetrahedrons and ensure that the surface doesn't have edge connections.
|
|
void | RemoveMarkedTetrahedrons (const ea::vector< bool > &removed) |
| Remove marked tetrahedrons from array.
|
|
void | RemoveSuperMeshVertices () |
| Remove super-mesh vertices.
|
|
void | UpdateIgnoredVertices () |
| Update array of ignored vertices.
|
|
void | BuildHullSurface (TetrahedralMeshSurface &hullSurface) |
| Build hull surface.
|
|
void | CalculateHullNormals (const TetrahedralMeshSurface &hullSurface) |
| Calculate hull normals.
|
|
void | BuildOuterTetrahedrons (const TetrahedralMeshSurface &hullSurface) |
| Build outer tetrahedrons.
|
|
void | CalculateOuterMatrices () |
| Calculate matrices for outer tetrahedrons.
|
|
|
static int | SolveCubicEquation (double result[], double a, double b, double c, double eps) |
| Solve cubic equation x^3 + a*x^2 + b*x + c = 0.
|
|
static float | SolveCubic (const Vector3 &abc) |
| Calculate most positive root of cubic equation x^3 + a*x^2 + b*x + c = 0.
|
|
static float | SolveQuadratic (const Vector3 &abc) |
| Calculate most positive root of quadratic or linear equation a*x^2 + b*x + c = 0.
|
|
static double | GetSmallestPositiveRoot (const double roots[], int count) |
| Pick smallest positive root.
|
|
static Vector3 | GetTriangleBarycentricCoords (const Vector3 &position, const Vector3 &p1, const Vector3 &p2, const Vector3 &p3) |
| Calculate barycentric coordinates on triangle.
|
|