Skip to content

Commit

Permalink
Roll Visitable -> Node
Browse files Browse the repository at this point in the history
  • Loading branch information
ultraq committed Jun 22, 2024
1 parent 93e3997 commit 2589bb8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import java.util.concurrent.CopyOnWriteArrayList
*
* @author Emanuel Rabina
*/
class Node<T extends Node> implements SceneEvents, Scriptable<T>, Visitable {
class Node<T extends Node> implements SceneEvents, Scriptable<T> {

final Matrix4f transform = new Matrix4f()
final Rectanglef bounds = new Rectanglef()
Expand All @@ -50,7 +50,13 @@ class Node<T extends Node> implements SceneEvents, Scriptable<T>, Visitable {
private final Vector3f globalScale = new Vector3f(1, 1, 1)
private final Rectanglef globalBounds = new Rectanglef()

@Override
/**
* Accept any scene visitor.
* <p>
* The behaviour of a visitable element is slightly different from standard
* iteration in that the visitor can specify if it wishes to visit each of a
* node's children or not, based on the return value from the visit.
*/
void accept(SceneVisitor visitor) {

if (visitor.visit(this)) {
Expand Down

This file was deleted.

0 comments on commit 2589bb8

Please sign in to comment.