Package com.solibri.smc.api.threed
Interface Camera
public interface Camera
Camera represents the "camera" of the 3D view.
- Since:
- 9.10.8
-
Method Summary
Modifier and TypeMethodDescriptionReturns the direction the camera is targeting.Returns the global location of the 3D camera.Returns the upwards direction of the camera.void
Look at the given target point.void
Sets the camera to look at the given component.void
lookAt(Collection<Component> components)
Sets the camera to look at the given components.void
lookAtComponentsFromPosition(Collection<Component> components, Vector3d cameraLocation)
Moves the camera to look at the given components from the given location.void
setLocation(Vector3d location)
Sets the location of the camera.void
setUpVector(Vector3d upVector)
Sets the upwards vector to the given vector.
-
Method Details
-
getLocation
Vector3d getLocation()Returns the global location of the 3D camera.- Returns:
- the location of the camera
- Since:
- 9.10.8
-
setLocation
Sets the location of the camera.- Parameters:
location
- the new location- Since:
- 9.10.8
-
getDirection
Vector3d getDirection()Returns the direction the camera is targeting. The returned vector is always non-zero.- Returns:
- the direction of the camera
- Since:
- 9.10.8
-
getUpVector
Vector3d getUpVector()Returns the upwards direction of the camera. The returned vector is always non-zero.- Returns:
- the upwards direction of the camera
- Since:
- 9.10.8
-
lookAt
Look at the given target point. If the target point is the camera position, no changes to the camera direction is done. If the given target point is to the same direction from the camera position as the current upvector, the upvector might change to any arbitrary vector, otherwise the upvector will remain the same as previously, but is corrected based on the new direction.- Parameters:
lookTarget
- the target point for the camera position- Since:
- 9.10.8
-
lookAt
Sets the camera to look at the given component. Best effort is used to make sure the camera position and angle would be suitable.- Parameters:
component
- the target component
-
lookAt
Sets the camera to look at the given components. Best effort is used to make sure the camera position and angle would be suitable.- Parameters:
components
- the target components
-
lookAtComponentsFromPosition
Moves the camera to look at the given components from the given location.- Parameters:
components
- the target componentscameraLocation
- the location of the camera
-
setUpVector
Sets the upwards vector to the given vector. The given upvector must be non-zero.- Parameters:
upVector
- the new upVector
-