In many cases applications will need to filter 3D nodes by some custom data source or mechanism. This
is done by extending the
NodeCollection-class. This class generates an
provides notification when the set has changed. Implementations should
be non-blocking - slow operations should be executed async and the set should
be incrementally updated to avoid blocking the viewer.
Simple, static node collection
Details about IndexSet
IndexSet is a specialized implementation of
that is optimized for storing ranges of numbers. This is a common case for nodes as typically a
subtree will have the same styling applied.
IndexSet supports adding and removing individual elements using
remove(), the best
performance is achieved by using
removeRange() whenever possible.
Also note that changes to the underlying
IndexSet held by a
NodeCollection isn't automatically propagated
to be visible in the rendered result. In order to trigger an update after changing the underlying
NodeCollection.notifyChanged() (protected function). Note that this function should not be triggered too often
as it might take some time to apply the changes.