Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SubScene

[14:7] extends: Node

Wraps JavaFX SubScene, a Node that hosts its own scene graph branch with an independent camera and optional depth buffer. The standard way to embed a 3D viewport inside a normal 2D Scene: build the 3D content as a Group, place that Group as the SubScene root, set a PerspectiveCamera, then add the SubScene to any 2D layout.

Methods

  • SubScene (object Root, double Width, double Height, bool DepthBuffer = true, string Antialiasing = "DISABLED")

    Creates a new SubScene with the given root, size, and depth buffer setting. The root is typically a Group containing the 3D scene. Antialiasing defaults to DISABLED; pass "BALANCED" for anti aliased rendering.

    • @p Root is a Parent wrapper (typically a Group) holding the SubScene contents.
    • @p Width is a double with the SubScene width.
    • @p Height is a double with the SubScene height.
    • @p DepthBuffer is a bool selecting depth buffering (recommended true for 3D).
    • @p Antialiasing is an optional string: "DISABLED" or "BALANCED".
  • setCamera (object CameraObj)

    Sets the camera used to render this SubScene.

    • @p CameraObj is a Camera wrapper (PerspectiveCamera or ParallelCamera).
    • @r this object
  • setFill (object PaintObj)

    Sets the SubScene background fill paint.

    • @p PaintObj is a paint wrapper (typically a Color).
    • @r this object
  • getWidth ()

    Returns the SubScene width.

    • @r A double with the width.
  • getHeight ()

    Returns the SubScene height.

    • @r A double with the height.
  • setWidth (double W)

    Sets the SubScene width.

    • @p W is a double with the new width.
    • @r this object
  • setHeight (double H)

    Sets the SubScene height.

    • @p H is a double with the new height.
    • @r this object
  • getAntiAliasing ()

    Returns the SceneAntialiasing setting used for this SubScene.

    • @r An AJO wrapping javafx.scene.SceneAntialiasing (DISABLED or BALANCED).
  • isDepthBuffer ()

    Returns whether this SubScene uses a depth buffer for 3D rendering.

    • @r A bool that is true when depth buffering is enabled.
  • setRoot (object Root)

    Sets the root node of this SubScene.

    • @p Root is a Parent wrapper (typically a Group) for the SubScene contents.
    • @r this object for chaining
  • getRoot ()

    Returns the root node of this SubScene.

    • @r An AJO wrapping the javafx.scene.Parent root node.
  • rootProperty ()

    Returns the root property of this SubScene.

    • @r An AJO wrapping an ObjectProperty.
  • getCamera ()

    Returns the camera used to render this SubScene.

    • @r An AJO wrapping the javafx.scene.Camera, or null if none is set.
  • cameraProperty ()

    Returns the camera property of this SubScene.

    • @r An AJO wrapping an ObjectProperty.
  • widthProperty ()

    Returns the width property of this SubScene.

    • @r An AJO wrapping a DoubleProperty.
  • heightProperty ()

    Returns the height property of this SubScene.

    • @r An AJO wrapping a DoubleProperty.
  • getFill ()

    Returns the current background fill paint of this SubScene.

    • @r An AJO wrapping the javafx.scene.paint.Paint used as the fill, or null.
  • fillProperty ()

    Returns the fill property of this SubScene.

    • @r An AJO wrapping an ObjectProperty.
  • userAgentStylesheetProperty ()

    Returns the user agent stylesheet property for this SubScene.

    • @r An AJO wrapping a StringProperty.
  • getUserAgentStylesheet ()

    Returns the URL of the user agent stylesheet applied to this SubScene.

    • @r A string with the stylesheet URL, or null when none is set.
  • setUserAgentStylesheet (string Url)

    Sets the user agent stylesheet URL applied to this SubScene.

    • @p Url is a string with the stylesheet URL.
    • @r this object for chaining