A class capable of producing a sphere-skeleton from a trimesh through more granular operations.
More...
#include <SphereMeshSkeletonisation.h>
A class capable of producing a sphere-skeleton from a trimesh through more granular operations.
Definition at line 184 of file SphereMeshSkeletonisation.h.
◆ UpscalingMethod
◆ SphereSkeletoniser()
Initialise a skeletoniser which will work on a given mesh.
- Parameters
-
vertices | The vertices of the mesh |
indices | The indices of the mesh (always 3 per triangle, see agxCollide/Trimesh.h) |
◆ addJoint()
Shorthand for upscaling a by a single joint.
- Parameters
-
method | The means of upscaling. Can be per joint, per edge, or a combination of both. |
◆ applyAverageRadius()
Applies the average radius of the remaining vertices to all the vertices.
◆ applyRadius()
Applies the radius
as the radius of the remaining vertices.
- Parameters
-
radius | The radius to apply |
◆ collapseNext()
Collapses the next optimal choice of edge.
- Returns
- True if an edge could be collapsed
◆ collapseUntilSkeleton()
Collapses the mesh until a skeletal structure is reached.
◆ consolidateSkeleton()
Performs a pass over the nodes in the skeleton in the skeletoniser's current structure and attempts to collapse any nodes which sit below the given threshold in distance.
- Parameters
-
skeleton | The skeleton who's joints will be consolidated in the skeletoniser |
radiusFactor | Factor by which to multiply the average radius between two nodes considered to produce the distance threshhold. |
◆ currentSkeletonResolution()
- Returns
- The current resolution (joints per length) of the meso-skeleton contained in the skeletoniser
◆ getSkeleton()
Constructs a sphere-skeleton from the current "meso-skeleton".
Will ignore any faces/triangles present in the meso-skeleton to guarantee a skeletal structure.
- Returns
- A SphereSkeleton object containing the joints of the skeleton with adjacency data
◆ getSurfacePoints()
Returns a new vector containing all of the original vertices associated with the skeletoniser vertex with id id
.
- Parameters
-
id | The id of the skeletoniser vertex |
- Returns
- A vector of points.
◆ isUpscalePossible() [1/2]
Checks if upscaling is possible on the given vertex.
- Parameters
-
splitVertex | The vertex at which to check |
- Returns
- True or false
◆ isUpscalePossible() [2/2]
Checks if upscaling is possible on the given edge.
- Parameters
-
v0 | Start of edge to check |
v1 | End of edge to check |
- Returns
- True or false
◆ remainingEdges()
- Returns
- The remaining edges on the possibly non-manifold "meso-skeleton" contained in the skeletoniser
◆ remainingTriangles()
- Returns
- The remaining triangles/faces on the possibly non-manifold "meso-skeleton" contained in the skeletoniser
◆ remainingVertices()
- Returns
- The remaining vertices on the possibly non-manifold "meso-skeleton" contained in the skeletoniser
◆ removeVertex()
Removes the joint with the given index from the skeletoniser.
Removes data and does not merge faces or regions. Collapsing or upscaling after a removal will negatively affect the results of the skeletonisation in regards to the mesh.
- Parameters
-
indexToRemove | The index in the joint vector at which to remove a joint.
|
cut | True if the edges from the joint should be deleted. True if the edges should be assigned to the closest neighbour. |
◆ setFaceDevalueFactor()
Sets the measure of much the skeletoniser prioritises collapsing faces.
Higher values means a more aggressive skeletonisation but can lead to faulty joints in complex models. Lower prioritises simplifying the original shape of the mesh which can lead to loss of quality in the resulting skeleton.
- Parameters
-
devalueFactor | The factor to devalue collapses which do not lead to a strictly skeletal structure with. Default = 10. |
◆ upscaleEdge()
Create a new vertex in the meso-skeleton from the combined regions of an edge.
- Parameters
-
v0 | The id of the first vertex in the edge |
v1 | The id of the second vertex in the edge |
- Precondition
- The meso-skeleton contained is a full skeleton with no faces left.
◆ upscaleJoint()
- Parameters
-
splitVertex | The id of the vertex which will have its region split into two vertices |
- Precondition
- The meso-skeleton contained is a full skeleton with no faces left.
◆ upscaleSkeleton()
Performs a pass over all edges in the current structure and attempts to upscale each edge.
- Parameters
-
targetNumJoints | The target number of nodes in the skeleton. |
method | The means of upscaling. Can be per joint, per edge, or a combination of both. |
skeletonFilter | Optional parameter for filtering which vertices are considered. Only edges and vertices present in skeletonFilter will be upscaled. |
- Precondition
- The meso-skeleton contained is a full skeleton with no faces left.
The documentation for this class was generated from the following file: