Description
The IsDirty
property of the PolygonMesh
class indicates whether there have been changes to the mesh that require it to be rebuilt. This is a boolean property that returns true
if the mesh has been modified and needs to be updated, and false
otherwise.
Usage
Use the IsDirty
property to check if the mesh has been altered and requires a rebuild. This can be useful in scenarios where you want to optimize performance by only rebuilding the mesh when necessary.
Example
// Example of checking if a PolygonMesh needs rebuilding
PolygonMesh mesh = new PolygonMesh();
// Perform some operations on the mesh
// ...
// Check if the mesh is dirty
if (mesh.IsDirty)
{
// Rebuild the mesh
mesh.Rebuild();
}