Description
The CalculateSelectionVertices
method is a public instance method of the BaseMeshTool
class within the Editor.MeshEditor
namespace. This method is responsible for calculating the vertices that are currently selected in the mesh editor. It updates the VertexSelection
property of the BaseMeshTool
class, which is a HashSet
of MeshVertex
objects representing the selected vertices.
Usage
To use the CalculateSelectionVertices
method, ensure that you have an instance of a class derived from BaseMeshTool
. This method does not take any parameters and does not return a value. It is typically called when the selection changes or needs to be recalculated, such as after a user interaction in the mesh editor.
Example
// Assuming 'meshTool' is an instance of a class derived from BaseMeshTool
meshTool.CalculateSelectionVertices();
// After calling this method, you can access the selected vertices via:
var selectedVertices = meshTool.VertexSelection;
foreach (var vertex in selectedVertices)
{
// Process each selected vertex
}