public static interface TetMesh.TetListener
extends java.util.EventListener
Classes that maintain references to tets in a tet mesh should implement this interface. Those references are almost certainly invalid (and may prevent garbage collection) after tets are removed from the mesh. This is especially important because tets removed may be reused, and given entirely different state, as tets are added to the mesh.
Tet listeners may be costly. Typically, for each node added to a tet mesh, roughly 18 tets are removed and 24 tets are added. Therefore, tet listeners should be added just prior to making a small number of incremental changes to the mesh, and removed after such changes are completed.
Modifier and Type | Method and Description |
---|---|
void |
tetAdded(TetMesh mesh,
TetMesh.Tet tet)
Called after the specified tet has been added to the mesh.
|
void |
tetRemoved(TetMesh mesh,
TetMesh.Tet tet)
Called after the specified tet has been removed from the mesh.
|
void tetAdded(TetMesh mesh, TetMesh.Tet tet)
mesh
- this mesh.tet
- the tet added.void tetRemoved(TetMesh mesh, TetMesh.Tet tet)
mesh
- this mesh.tet
- the tet removed.