public class FXGeometryCanvas extends FXVizCanvas implements IPlantView
Constructor and Description |
---|
FXGeometryCanvas(Geometry source)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.widgets.Composite |
createComposite(org.eclipse.swt.widgets.Composite parent)
Creates a new SWT
Composite with this object's associated Plant
View embedded within it. |
void |
dispose()
Dispose the plant view and its resources.
|
void |
exportImage()
Exports the view to an image file.
|
void |
pitchCamera(float radians)
Changes the pitch of the camera (rotates up and down).
|
void |
raiseCamera(float distance)
Moves the camera up or down.
|
void |
resetCamera()
Resets the plant view's camera to its default position and orientation.
|
void |
rollCamera(float radians)
Rotates (rolls) the camera right or left.
|
void |
setDefaultCameraXByY()
Sets the camera to face the origin with the X axis horizontal and the Y
axis vertical.
|
void |
setDefaultCameraYByZ()
Sets the camera to face the origin with the Y axis horizontal and the Z
axis vertical.
|
void |
setDefaultCameraZByX()
Sets the camera to face the origin with the Z axis horizontal and the X
axis vertical.
|
void |
setPlant(IPlantData plant)
Set the IPlantData object from which the view will render.
|
void |
setWireframe(boolean wireframe)
Sets all rendered plant components to be viewed as wireframes or as solid
objects.
|
void |
strafeCamera(float distance)
Moves the camera right or left.
|
void |
thrustCamera(float distance)
Moves the camera forward or backward.
|
void |
yawCamera(float radians)
Changes the yaw of the camera right or left.
|
addRoot, draw, getDataSource, getNumberOfAxes, getProperties, getRenderElementHolder, getSourceHost, getViewer, isSourceRemote, redraw, removeRoot, setProperties
public FXGeometryCanvas(Geometry source)
source
- The geometry to be displayed in the canvas.public org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent)
IPlantView
Composite
with this object's associated Plant
View embedded within it.createComposite
in interface IPlantView
parent
- The parent Composite
.Composite
that has an embedded visualization
managed by this PlantState
. This
Composite
's layout should be set by the caller.
This Composite
should be disposed when it is no
longer required.public void exportImage()
IPlantView
exportImage
in interface IPlantView
public void resetCamera()
IPlantView
resetCamera
in interface IPlantView
#setDefaultCameraPosition(Vector3f)
,
#setDefaultCameraOrientation(Vector3f, Vector3f)
public void setWireframe(boolean wireframe)
IPlantView
setWireframe
in interface IPlantView
wireframe
- If true, plant components will be rendered with wireframes. If
false, they will be rendered solid.public void thrustCamera(float distance)
IPlantView
thrustCamera
in interface IPlantView
distance
- If positive, the camera moves forward. If negative, the camera
moves backward.public void strafeCamera(float distance)
IPlantView
strafeCamera
in interface IPlantView
distance
- If positive, the camera moves right. If negative, the camera
moves left.public void raiseCamera(float distance)
IPlantView
raiseCamera
in interface IPlantView
distance
- If positive, the camera moves up. If negative, the camera
moves down.public void rollCamera(float radians)
IPlantView
rollCamera
in interface IPlantView
radians
- If positive, the camera rolls right. If negative, the camera
rolls left.public void pitchCamera(float radians)
IPlantView
pitchCamera
in interface IPlantView
radians
- If positive, the camera pitches up. If negative, the camera
pitches down.public void yawCamera(float radians)
IPlantView
yawCamera
in interface IPlantView
radians
- If positive, the camera rotates right. If negative, the camera
rotates left.public void setDefaultCameraYByZ()
IPlantView
setDefaultCameraYByZ
in interface IPlantView
public void setDefaultCameraXByY()
IPlantView
setDefaultCameraXByY
in interface IPlantView
public void setDefaultCameraZByX()
IPlantView
setDefaultCameraZByX
in interface IPlantView
public void dispose()
IPlantView
dispose
in interface IPlantView
public void setPlant(IPlantData plant)
IPlantView
setPlant
in interface IPlantView
plant
- The new data source for the view.