|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SurfaceController
SurfaceController is used to access the surface data as well as setting surface window controls.
Field Summary | |
---|---|
static float |
TRANSPARENCY_LEVEL
|
Method Summary | |
---|---|
void |
addedShapeAddSurfaceOverlay(SurfaceShape shape,
SurfaceOverlay so)
This will add a SurfaceOverlay to this shape. |
void |
addedShapeOverlayChanged(SurfaceShape shape,
Object overlay)
If registered with a ScreenImage, this method notifies an added shape when the overlay range has been changed. |
void |
addedShapeOverlayRemoved(SurfaceShape shape,
Object image)
If registered with an image, this method notifies the shape when the overlay has been removed from the viewer. |
void |
addedShapeRemoveAllSurfaceOverlays(SurfaceShape shape)
This will remove all SurfaceOverlays from this shape. |
void |
addedShapeRemoveSurfaceOverlay(SurfaceShape shape,
SurfaceOverlay so)
This will remove a SurfaceOverlay from this shape. |
void |
addShape(J3DBuffer points,
J3DBuffer normals,
int[] triangles,
String name,
float[] color,
boolean asIndices)
Adds a shape from data (such as read from file). |
void |
addShape(SurfaceShape shape)
Adds a shape from a SurfaceShape |
void |
addSurfaceOverlay(SurfaceOverlay so)
This will add a SurfaceOverlay to the surface. |
void |
doClickMenuItem(String name)
Used to programmatically click a surface menu item. |
SurfaceShape |
getAddedShape(String name)
Returns an added shape by name. |
SurfaceShape[] |
getAllAddedShapes()
Returns an array of added shapes or null if there are none. |
float |
getAmbient()
Returns the ambient level (0.0 - 1.0). |
float[] |
getAngleState()
Deprecated. use getCurrentRotation() |
Color3f |
getColor()
Returns the color. |
float[] |
getCurrentRotation()
Returns a copy of the current rotation transform. |
float[] |
getCurrentTranslation()
Returns a copy of the current translate transform. |
float[] |
getCurrentZoom()
Returns a copy of the current zoom transform. |
float[] |
getCurrentZoomScroll()
Returns a copy of the current zoom scroll transform. |
float |
getDiffuse()
Returns the diffuse level (0.0 - 1.0). |
float |
getEmissive()
Returns the emissive level (0.0 - 1.0). |
OverlayListener |
getOverlayListener()
Returns the OverlayListener associated with the base surface. |
int |
getPolygonType()
Returns the polygon type (fill, line, or point). |
float[] |
getSavedRotation()
Returns a copy of the saved rotation transform. |
float[] |
getSavedTranslation()
Returns a copy of the saved translate transform. |
float[] |
getSavedZoom()
Returns a copy of the saved zoom transform. |
float[] |
getSavedZoomScroll()
Returns a copy of the saved zoom scroll transform. |
float |
getShininess()
Returns the shininess (specular scattering exponent) level (0.0 - 128.0). |
float |
getSpecular()
Returns the specular (highlights) level (0.0 - 1.0). |
SurfaceData |
getSurfaceData()
Returns the SurfaceData. |
Vector<SurfaceOverlay> |
getSurfaceOverlays()
Returns the SurfaceOverlay collection. |
BasicController |
getViewerController()
Returns the viewer controller associated with this surface. |
void |
gotoAngleState()
Deprecated. use gotoSavedPosition(); |
void |
gotoSavedPosition()
Moves the rendering to the last saved position (see savePosition()). |
boolean |
isIgnoringVertexColors()
Returns true if this shape is not using vertex colors. |
boolean |
isOrientationVisible()
Returns true if the orientation markers are visible. |
boolean |
isShowingAllPlanes()
Returns true if all viewer slice planes are shown. |
boolean |
isShowingCutPlanes()
Returns true if only the viewer slice planes that are also cut planes are being shown. |
boolean |
isShowingMainPlane()
Returns true if only the viewer's main slice plane is shown. |
boolean |
isShowingShapes()
Returns true if added shapes are being shown. |
boolean |
isShowingSurface()
Returns true if the surface is being shown. |
boolean |
isSmoothShading()
Returns true if using Gouraud (smooth) shading or false if using flat shading. |
boolean |
isUsingAxialCutPlane()
Returns true if the axial cut plane is being used. |
boolean |
isUsingCoronalCutPlane()
Returns true if the coronal cut plane is being used. |
boolean |
isUsingSagittalCutPlane()
Returns true if the sagittal cut plane is being used. |
boolean |
isUsingTransparency()
Returns true if the surface is using transparency. |
void |
overlayChanged(Object overlay)
If registered with a ScreenImage, this method notifies the shape when the overlay has been changed. |
void |
overlayRemoved(Object overlay)
If registered with a ScreenImage, this method notifies the shape when the overlay has been removed from the viewer. |
void |
rebuildSurface(SurfaceBuildParameters params)
Build a surface. |
void |
rememberAngleState()
Deprecated. use savePosition() |
void |
removeShape(String name)
Removes an added shape by name. |
void |
removeSurfaceOverlay(SurfaceOverlay so)
This will remove a SurfaceOverlay from the surface. |
void |
savePosition()
Internally saves the current position. |
void |
setColor(Color3f col)
Sets the color. |
void |
setIgnoreVertexColors(boolean bool)
Set to true to ignore vertex colors and render shape with solid color. |
void |
setLightingParameters(float ambientVal,
float diffuseVal,
float emissiveVal,
float specularVal,
float shininessVal)
Sets the lighting parameters (ambient, diffuse, emissive, specular, shininess). |
void |
setOrientationVisible(boolean show)
Set to true to show the orientation markers or false to hide them. |
void |
setPolygonType(int type)
Sets the polygon type (fill, line, or point). |
void |
setShowingAllPlanes(boolean show)
Set to true to show all viewer slice planes. |
void |
setShowingCutPlanes(boolean show)
Set to true to show only the viewer slice planes that are also cut planes. |
void |
setShowingMainPlane(boolean show)
Set to true to show only the viewer's main slice plane. |
void |
setShowingShapes(boolean show)
Set to true to show added shapes or false to hide them. |
void |
setShowingSurface(boolean show)
Set to true to show the surface or false to hide it. |
void |
setTransparency(boolean useTrans)
Sets whether the surface uses transparency or not. |
void |
setUseSmoothShading(boolean useSmooth)
Sets the smooth shading state. |
void |
setUsingAxialCutPlane(boolean use)
Set to true to use the axial cut plane. |
void |
setUsingCoronalCutPlane(boolean use)
Set to true to use the coronal cut plane. |
void |
setUsingSagittalCutPlane(boolean use)
Set to true to use the sagittal cut plane. |
void |
updateSurfaceView()
Updates the surface. |
Field Detail |
---|
static final float TRANSPARENCY_LEVEL
Method Detail |
---|
void rebuildSurface(SurfaceBuildParameters params)
params
- SurfaceData getSurfaceData()
boolean isShowingShapes()
void setShowingShapes(boolean show)
show
- true to show added shapes or false to hide themboolean isShowingSurface()
void setShowingSurface(boolean show)
show
- true to show the surface or false to hide itboolean isOrientationVisible()
void setOrientationVisible(boolean show)
show
- true to show the orientation markers or false to hide themboolean isShowingAllPlanes()
void setShowingAllPlanes(boolean show)
show
- true to show all viewer slice planesboolean isShowingMainPlane()
void setShowingMainPlane(boolean show)
show
- true to show only the viewer's main slice plane.boolean isShowingCutPlanes()
void setShowingCutPlanes(boolean show)
show
- true to show only the viewer slice planes that are also cut planesboolean isUsingAxialCutPlane()
void setUsingAxialCutPlane(boolean use)
use
- true to use the axial cut planeboolean isUsingCoronalCutPlane()
void setUsingCoronalCutPlane(boolean use)
use
- true to use the coronal cut planeboolean isUsingSagittalCutPlane()
void setUsingSagittalCutPlane(boolean use)
use
- true to use the sagittal cut planevoid savePosition()
void gotoSavedPosition()
void rememberAngleState()
void gotoAngleState()
float[] getAngleState()
float[] getSavedRotation()
float[] getSavedZoom()
float[] getSavedZoomScroll()
float[] getSavedTranslation()
float[] getCurrentRotation()
float[] getCurrentZoom()
float[] getCurrentZoomScroll()
float[] getCurrentTranslation()
void setLightingParameters(float ambientVal, float diffuseVal, float emissiveVal, float specularVal, float shininessVal)
ambientVal
- the ambient level (0.0 - 1.0)diffuseVal
- the diffuse level (0.0 - 1.0)emissiveVal
- the emissive level (0.0 - 1.0)specularVal
- the specular level (0.0 - 1.0)shininessVal
- the shininess level (0.0 - 128.0)void setTransparency(boolean useTrans)
useTrans
- true if the surface should use transparency, false otherwiseboolean isUsingTransparency()
Color3f getColor()
void setColor(Color3f col)
col
- the colorfloat getAmbient()
float getDiffuse()
float getSpecular()
float getShininess()
float getEmissive()
boolean isSmoothShading()
void setUseSmoothShading(boolean useSmooth)
useSmooth
- set to true to use Gouraud (smooth) shading or false to use flat shadingint getPolygonType()
void setPolygonType(int type)
type
- the polygon typeSurfaceShape[] getAllAddedShapes()
void addShape(SurfaceShape shape)
shape
- the shape to be addedvoid addShape(J3DBuffer points, J3DBuffer normals, int[] triangles, String name, float[] color, boolean asIndices)
points
- a J3DBuffer containing a java.nio.FloatBuffer of pointsnormals
- a J3DBuffer containing a java.nio.FloatBuffer of normalstriangles
- triangle data arraycolor
- a three float array containing RGB valuesasIndices
- true if the triangle array contains point indices describing triangles, false if it contains strip countsvoid removeShape(String name)
name
- the name of the shape to be removedSurfaceShape getAddedShape(String name)
name
- the name of the shape to fetch.void doClickMenuItem(String name)
name
- menu item namevoid updateSurfaceView()
boolean isIgnoringVertexColors()
void setIgnoreVertexColors(boolean bool)
bool
- true to ignore vertex colors, false to use vertex colorsOverlayListener getOverlayListener()
void addedShapeOverlayChanged(SurfaceShape shape, Object overlay)
shape
- the shapeoverlay
- the overlayvoid addedShapeOverlayRemoved(SurfaceShape shape, Object image)
shape
- the shapeimage
- the overlayvoid addedShapeAddSurfaceOverlay(SurfaceShape shape, SurfaceOverlay so)
shape
- the shapeso
- the SurfaceOverlay to addvoid addedShapeRemoveSurfaceOverlay(SurfaceShape shape, SurfaceOverlay so)
shape
- the shapeso
- the SurfaceOverlay to removevoid addedShapeRemoveAllSurfaceOverlays(SurfaceShape shape)
shape
- the shapevoid overlayChanged(Object overlay)
overlay
- the overlayvoid overlayRemoved(Object overlay)
overlay
- the overlayvoid addSurfaceOverlay(SurfaceOverlay so)
so
- the SurfaceOverlay to addvoid removeSurfaceOverlay(SurfaceOverlay so)
so
- the SurfaceOverlay to removeVector<SurfaceOverlay> getSurfaceOverlays()
BasicController getViewerController()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |