![]() | [using it] | Interface Manipulation Package v4.0 (2008-06-25) | ![]() | ©copyright | ![]() |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
imp.gui.IComponent
imp.gui.VolumesViewer
public class VolumesViewer
Defines an interface with Java3D in order to provide a 3D scene viewer.
Mouse interaction | ![]() |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.BaselineResizeBehavior |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary | |
---|---|
static Image |
getImage(BranchGroup scene,
int width,
int height,
boolean light,
Transform3D transform)
Returns a 2D view of the scene 3D. |
BranchGroup |
getScene()
Gets the scene shown in the viewer if any or null. |
static BranchGroup |
getScene(Point3f[] points,
int size,
String pointColor,
Point3f[] lines,
String lineColor)
Returns a scene built out of points and lines. |
Transform3D |
getTransform()
Returns the transform applied to the scene in the present view. |
VolumesViewer |
setScene(BranchGroup scene,
boolean animate,
boolean light)
Sets the given Java3D scene and returns this. |
Methods inherited from class imp.gui.IComponent |
---|
getBgcolor, getColor, getTextFont, getTitle, getTooltip, grab, refresh, setBgcolor, setColor, setHeight, setTextFont, setTitle, setTooltip, setWidth |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static Image getImage(BranchGroup scene, int width, int height, boolean light, Transform3D transform)
scene
- A Java3D scene tree.
Caution: This scene must NOT be already attached to a parent or be part of live or compiled scene graph. Objects must be cloned before viewing them when getting their image.width
- viewer width (default size is 600,400).height
- viewer height (default size is 600,400).light
- validate the object lighting (default is true).transform
- the scene -> view 3D transformation (default is identity e.g. when null).public BranchGroup getScene()
public static BranchGroup getScene(Point3f[] points, int size, String pointColor, Point3f[] lines, String lineColor)
points
- Points array, null if no point.size
- [optional, default is 11] Point size.pointColor
- [optional, default is white] Point color.lines
- [optional, default is null] Lines array, null if no line.lineColor
- [optional, default is white] Lines color.public Transform3D getTransform()
public VolumesViewer setScene(BranchGroup scene, boolean animate, boolean light)
scene
- A Java3D scene tree. animate
- [optional, default is true] validate the user interaction option.light
- [optional, default is true] validate the object lighting.