Skip to content

Commit

Permalink
Add PointCloud properties, doesnt change visual though
Browse files Browse the repository at this point in the history
  • Loading branch information
kephale committed Jul 22, 2023
1 parent 683525a commit a17d4ee
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/main/kotlin/sc/iview/commands/edit/Properties.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ package sc.iview.commands.edit
import graphics.scenery.*
import graphics.scenery.attribute.material.HasMaterial
import graphics.scenery.primitives.Line
import graphics.scenery.primitives.PointCloud
import graphics.scenery.primitives.TextBoard
import graphics.scenery.volumes.Colormap.Companion.fromColorTable
import graphics.scenery.volumes.SlicingPlane
Expand Down Expand Up @@ -211,6 +212,11 @@ class Properties : InteractiveCommand() {
@Parameter(label = "Edge width", callback = "updateNodeProperties", style = "group:Line")
private var edgeWidth = 0

/* Point cloud properties */

@Parameter(label = "Point size", callback = "updateNodeProperties", style = "group:PointCloud")
private var pointRadius = 0f

private val slicingModeChoices = Volume.SlicingMode.values().toMutableList()

var fieldsUpdating = true
Expand Down Expand Up @@ -485,6 +491,13 @@ class Properties : InteractiveCommand() {
maybeRemoveInput("edgeWidth", java.lang.Integer::class.java)
}

if (node is PointCloud){
pointRadius = node.pointRadius
} else {
maybeRemoveInput("pointSize", java.lang.Float::class.java)
}


name = node.name
fieldsUpdating = false
}
Expand Down Expand Up @@ -594,6 +607,10 @@ class Properties : InteractiveCommand() {
node.edgeWidth = edgeWidth.toFloat()
}

if (node is PointCloud) {
node.pointRadius = pointRadius
}

events.publish(NodeChangedEvent(node))
}

Expand Down

0 comments on commit a17d4ee

Please sign in to comment.