Interface ThreeD


public interface ThreeD
This interface provides all 3D view related functionality such as reading and modifying the image present.
Since:
9.10.8
  • Method Details

    • get3DSnapshot

      Optional<BufferedImage> get3DSnapshot()
      Returns the image present in the 3D view. If no model is open, or the 3D initialization has failed, empty Optional is returned.
      Returns:
      the image
      Since:
      9.10.8
    • getCamera

      Camera getCamera()
      Returns the camera of the view.
      Returns:
      the camera
      Since:
      9.10.8
    • getVisibleComponents

      Collection<Component> getVisibleComponents()
      Returns the components that are visible in the 3D view. Only those components that have some geometry can be in this collection. A component can be visible even if it cannot currently be seen by the camera. A visible component could be behind another visible components.
      Returns:
      the visible components
      Since:
      9.12.0
    • getHiddenComponents

      Collection<Component> getHiddenComponents()
      Returns the components that are currently hidden from the 3d view. Only those components that have some geometry can be in this collection.
      Returns:
      the hidden components
      Since:
      9.12.0
    • hideComponent

      void hideComponent​(Component component)
      Hides the given component from the 3D view. If the component was already hidden, nothing happens.
      Parameters:
      component - the component
      Since:
      9.12.0
    • showComponent

      void showComponent​(Component component)
      Unhides the given component from the 3D view. If the component was already visible, nothing happens.
      Parameters:
      component - the component
      Since:
      9.12.0
    • setVisualization

      void setVisualization​(Visualization visualization)
      Sets the given Visualization to the 3D view. Sets the component visibilities, section planes and visualization items.
      Parameters:
      visualization - the visualization
      Since:
      9.12.0
    • createVisualization

      Visualization createVisualization()
      Creates a new Visualization that matches the current 3D view. The visualization contains the current components, section planes and visualization items.
      Returns:
      the new visualization
      Since:
      9.12.0
    • setCameraState

      void setCameraState​(CameraState cameraState)
      Sets the given CameraState to the 3D view. Moves and turns the camera to the match the camera state.
      Parameters:
      cameraState - the camera state
      Since:
      9.12.0
    • createCameraState

      CameraState createCameraState()
      Creates a new CameraState that matches the current 3D view camera. The camera state is instance of PerspectiveCameraState or OrthogonalCameraState depending of the camera projection.
      Returns:
      the new camera state
      Since:
      9.12.0