Package com.solibri.smc.api.threed
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 Summary
Modifier and TypeMethodDescriptionCreates a newCameraState
that matches the current 3D view camera.Creates a newVisualization
that matches the current 3D view.Returns the image present in the 3D view.Returns the camera of the view.Returns the components that are currently hidden from the 3d view.Returns the components that are visible in the 3D view.void
hideComponent
(Component component) Hides the given component from the 3D view.void
setCameraState
(CameraState cameraState) Sets the givenCameraState
to the 3D view.void
setVisualization
(Visualization visualization) Sets the givenVisualization
to the 3D view.void
showComponent
(Component component) Unhides the given component from the 3D view.
-
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
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
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
Sets the givenVisualization
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 newVisualization
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
Sets the givenCameraState
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 newCameraState
that matches the current 3D view camera. The camera state is instance ofPerspectiveCameraState
orOrthogonalCameraState
depending of the camera projection.- Returns:
- the new camera state
- Since:
- 9.12.0
-