public class FXViewer extends BasicViewer
JavaFX implementation of GeometryViewer.
Constructor and Description |
---|
FXViewer(org.eclipse.swt.widgets.Composite parent)
Creates a JavaFX GeometryViewer.
|
Modifier and Type | Method and Description |
---|---|
ICameraController |
getCameraController() |
FXContentProvider |
getContentProvider() |
org.eclipse.swt.widgets.Control |
getControl() |
javafx.scene.Camera |
getDefaultCamera() |
javafx.embed.swt.FXCanvas |
getFxCanvas() |
javafx.scene.Group |
getRoot()
Gets the topmost node in the scene graph.
|
javafx.scene.Scene |
getScene() |
void |
pitchCamera(double radians)
Change the camera's pitch, its rotation about the axis perpendicular to
its heading to the right, controlling how it is pointed in an up/down
direction.
|
void |
raiseCamera(double distance)
Move the camera to the up or down, orthogonal to the direction it is
pointing.
|
void |
refresh() |
void |
resetCamera()
Reset the camera to its default position.
|
void |
rollCamera(double radians)
Change the camera's roll, it's rotation about the axis it is pointing.
|
void |
setContentProvider(FXContentProvider contentProvider) |
void |
setDefaultCameraXByY()
Set the camera's default position to view the scene with the X axis
horizontal and the Y vertical.
|
void |
setDefaultCameraYByZ()
Set the camera's default position to view the scene with the Y axis
horizontal and the Z vertical.
|
void |
setDefaultCameraZByX()
Set the camera's default position to view the scene with the Z axis
horizontal and the Y vertical.
|
void |
strafeCamera(double distance)
Move the camera to the left or right, orthogonal to the direction it is
pointing.
|
void |
thrustCamera(double distance)
Move the camera forward or backwards in the direction it is pointing.
|
void |
yawCamera(double radians)
Change the camera's yaw, its rotation about the axis perpendicular to its
heading in to the above, controlling how it is pointed in a left/right
direction.
|
getCamera, getCanvas, getInput, getRenderer, getSelection, setCamera, setInput, setSelection
public FXViewer(org.eclipse.swt.widgets.Composite parent)
Creates a JavaFX GeometryViewer.
parent
- public org.eclipse.swt.widgets.Control getControl()
getControl
in class org.eclipse.jface.viewers.Viewer
Object.getClass()
public void refresh()
refresh
in class org.eclipse.jface.viewers.Viewer
Viewer.refresh()
public javafx.embed.swt.FXCanvas getFxCanvas()
public javafx.scene.Group getRoot()
BasicViewer
getRoot
in class BasicViewer
public javafx.scene.Scene getScene()
public FXContentProvider getContentProvider()
public void setContentProvider(FXContentProvider contentProvider)
contentProvider
- public ICameraController getCameraController()
public javafx.scene.Camera getDefaultCamera()
public void resetCamera()
public void pitchCamera(double radians)
radians
- The number of radians by which to rotate the camera.public void rollCamera(double radians)
radians
- The number of radians by which to rotate the camera.public void raiseCamera(double distance)
distance
- The amount of space to move the camera. Positive distances
move the camera up, negative distances move it down.public void strafeCamera(double distance)
distance
- The amount of space to move the camera. Positive distances
move the camera right, negative distances move it left.public void thrustCamera(double distance)
distance
- The amount of space to move the camera. Positive distances
move the camera forward, negative distances move it backwards.public void yawCamera(double radians)
radians
- The number of radians by which to rotate the camera.public void setDefaultCameraYByZ()
public void setDefaultCameraXByY()
public void setDefaultCameraZByX()