Class VoyagerSceneBuilder

java.lang.Object
io.goobi.viewer.model.media.voyager.VoyagerSceneBuilder

public class VoyagerSceneBuilder extends Object
Builder that constructs a Smithsonian Voyager scene document (JSON) for one or more 3D model assets, including asset metadata, scene nodes, and derivative descriptions.
  • Constructor Details

    • VoyagerSceneBuilder

      public VoyagerSceneBuilder(String name)
  • Method Details

    • setUnit

      public VoyagerSceneBuilder setUnit(String unit)
    • setTranslation

      public VoyagerSceneBuilder setTranslation(double x, double y, double z)
      Sets the model-level translation stored in the SVX models[i].translation field, expressed as [x, y, z] in the scene's native units.

      Voyager uses this field (together with model.boundingBox) to compute the orbit pivot. Pass the negated world-space bounding-box centre so that the pivot lands at the scene origin and Voyager orbits around the object's true geometric centre.

      Parameters:
      x - translation along the X axis
      y - translation along the Y axis
      z - translation along the Z axis
      Returns:
      this builder
    • setBounds

      public VoyagerSceneBuilder setBounds(double[] min, double[] max)
      Sets the axis-aligned bounding box of the model in its local coordinate space, as read from the GLTF accessor min/max values. Used to embed a boundingBox in the SVX model entry so Voyager can correctly position the orbit pivot, and to compute a reasonable initial camera distance.
      Parameters:
      min - lower corner [x, y, z]
      max - upper corner [x, y, z]
      Returns:
      this builder
    • addModel

      public VoyagerSceneBuilder addModel(URI url, Path file)
    • build

      public String build()