Interface OctreeVisitor

All Known Subinterfaces:
AvgMeshVisitor, RayIntersectionVisitor
All Known Implementing Classes:
AvgMeshVisitorNN, AvgMeshVisitorRC, AvgMeshVisitorRCGPU, MaskProjector, RayIntersectionVisitorImpl
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface OctreeVisitor
When instantiated, the object can be gradually applied to multiple octrees. It inspects the state of the tree one by one, and (cumulatively) computes results.

Implement this interface whenever you want to define new algorithm over a octree.

If the visitor is thread-safe, then a single instance of the visitor can visit concurrently (and asynchronously) multiple octrees. Otherwise, the parallel inspection is still possible, but a new instance of the visitor has to be used for each octree.

  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns true if the implementation is thread-safe and then a single visitor instance can be applied to multiple octrees simultaneously.
    void
    The main inspection method to be implemented by specific visitors.
  • Method Details

    • isThreadSafe

      default boolean isThreadSafe()
      Returns true if the implementation is thread-safe and then a single visitor instance can be applied to multiple octrees simultaneously.

      Thread-safe implementation means that any read or write from/to the visitor's state is protected by synchronized.

      Returns:
      true if the implementation is thread-safe.
    • visitOctree

      void visitOctree(Octree octree)
      The main inspection method to be implemented by specific visitors.
      Parameters:
      octree - octree to be visited