From 9bcafe8b42ea99b9eef6d33b1b896bfb4ed44bad Mon Sep 17 00:00:00 2001 From: Samuel Pantze <83579186+smlpt@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:41:20 +0200 Subject: [PATCH] Add names to scene objects to make it easier to find and remove them again --- .../sc/iview/commands/demo/advanced/EyeTrackingDemo.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/sc/iview/commands/demo/advanced/EyeTrackingDemo.kt b/src/main/kotlin/sc/iview/commands/demo/advanced/EyeTrackingDemo.kt index 5fa3c44e..65985b84 100644 --- a/src/main/kotlin/sc/iview/commands/demo/advanced/EyeTrackingDemo.kt +++ b/src/main/kotlin/sc/iview/commands/demo/advanced/EyeTrackingDemo.kt @@ -55,8 +55,6 @@ class EyeTrackingDemo: Command, CellTrackingBase() { @Parameter override var mastodonUpdateGraph: (() -> Unit)? = null - - val pupilTracker = PupilEyeTracker(calibrationType = PupilEyeTracker.CalibrationType.WorldSpace, port = System.getProperty("PupilPort", "50020").toInt()) val calibrationTarget = Icosphere(0.02f, 2) @@ -80,6 +78,7 @@ class EyeTrackingDemo: Command, CellTrackingBase() { metallic = 0.0f diffuse = Vector3f(0.8f, 0.8f, 0.8f) } + referenceTarget.name = "Reference Target" sciview.camera?.addChild(referenceTarget) calibrationTarget.visible = false @@ -87,6 +86,7 @@ class EyeTrackingDemo: Command, CellTrackingBase() { roughness = 1.0f metallic = 0.0f diffuse = Vector3f(1.0f, 1.0f, 1.0f)} + calibrationTarget.name = "Calibration Target" sciview.camera?.addChild(calibrationTarget) laser.visible = false @@ -100,6 +100,7 @@ class EyeTrackingDemo: Command, CellTrackingBase() { diffuse = Vector3f(0.4f, 0.4f, 0.4f) } shell.spatial().position = Vector3f(0.0f, 0.0f, 0.0f) + shell.name = "Shell" sciview.addNode(shell) val volnodes = sciview.findNodes { node -> Volume::class.java.isAssignableFrom(node.javaClass) } @@ -239,7 +240,7 @@ class EyeTrackingDemo: Command, CellTrackingBase() { hmd.addKeyBinding("toggle_tracking", keybindingTracking) volume.visible = true - volume.runRecursive { it.visible = true } +// volume.runRecursive { it.visible = true } playing = true }