public class SceneGraphViewer
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, javax.swing.event.ChangeListener
Modifier and Type | Field and Description |
---|---|
(package private) javax.media.j3d.AmbientLight |
ambientLight |
(package private) javax.media.j3d.BranchGroup |
baseGroup |
(package private) float |
brightness |
(package private) int |
button |
(package private) javax.media.j3d.Canvas3D |
canvas |
(package private) javax.media.j3d.TransformGroup |
decTransformGroup |
(package private) javax.media.j3d.DirectionalLight |
directionalLight |
(package private) float |
downscale |
(package private) javax.media.j3d.Transform3D |
downTransform |
(package private) boolean |
dragging |
(package private) javax.media.j3d.Transform3D |
fcTrans |
(package private) javax.media.j3d.Transform3D |
fwrcTrans |
(package private) javax.media.j3d.Transform3D |
fwTrans |
static int |
HIDE |
(package private) javax.media.j3d.PickInfo[] |
lastPickInfos |
static int |
LEFT |
(package private) javax.media.j3d.BranchGroup |
lights |
(package private) javax.media.j3d.Locale |
locale |
(package private) int |
mode |
static int |
NONE |
(package private) int |
nshowing |
static int |
PAN |
(package private) javax.swing.JPanel |
panel |
static int |
RIGHT |
static int |
ROLL |
(package private) javax.media.j3d.Transform3D |
rootTransform |
(package private) javax.media.j3d.TransformGroup |
rootTransformGroup |
(package private) float |
scale |
(package private) java.util.HashMap<java.lang.String,SceneItem> |
sceneItemHM |
(package private) java.util.ArrayList<javax.media.j3d.Shape3D> |
shapes |
(package private) javax.media.j3d.Transform3D |
tcTrans |
(package private) javax.media.j3d.Transform3D |
twrcTrans |
(package private) javax.media.j3d.Transform3D |
twTrans |
(package private) javax.media.j3d.VirtualUniverse |
universe |
(package private) javax.media.j3d.View |
view |
(package private) javax.vecmath.Point3d |
wcdown |
(package private) int |
xdown |
(package private) int |
ydown |
static int |
ZOOM |
Constructor and Description |
---|
SceneGraphViewer() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
private void |
applyBrightness(double br) |
private javax.media.j3d.BranchGroup |
createDummySceneGraph() |
private javax.media.j3d.BranchGroup |
createLightGraph(double br) |
void |
deltaLights(double d) |
double[] |
getFourMatrix() |
javax.swing.JPanel |
getPanel() |
private javax.media.j3d.Transform3D |
getPickTransform(int xpos,
int ypos) |
static java.awt.GraphicsConfiguration |
getPreferredConfiguration() |
(package private) boolean |
hideShape(javax.media.j3d.Shape3D s) |
void |
intPan(int dx,
int dy,
javax.vecmath.Point3d cpos) |
private void |
intRoll(int dx,
int dy) |
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
removeAllDecoration() |
void |
removeUnlistedDecoration(java.util.HashSet<java.lang.String> keepHS) |
void |
setAA(boolean b) |
void |
setBrightness(double br) |
void |
setDecoration(java.lang.String id,
javax.media.j3d.BranchGroup root,
boolean b) |
void |
setDecorationVisibility(java.lang.String s,
boolean b) |
void |
setFourMatrix(double[] fmo) |
void |
setLightsPercent(int p) |
void |
setSceneGraph(javax.media.j3d.BranchGroup bg,
java.util.ArrayList<javax.media.j3d.Shape3D> sha) |
private void |
setTransform(javax.media.j3d.Transform3D t3d) |
(package private) void |
showAll() |
(package private) void |
showFraction(double f) |
(package private) void |
showShape(javax.media.j3d.Shape3D s) |
void |
stateChanged(javax.swing.event.ChangeEvent e) |
private void |
toggleHide() |
private void |
toggleHideShape(javax.media.j3d.Shape3D s3d) |
private void |
zoomBy(double d) |
private void |
zoomTo(double d) |
javax.swing.JPanel panel
javax.media.j3d.Canvas3D canvas
javax.media.j3d.VirtualUniverse universe
javax.media.j3d.Locale locale
javax.media.j3d.View view
int xdown
int ydown
boolean dragging
public static final int PAN
public static final int ZOOM
public static final int ROLL
public static final int HIDE
int mode
public static final int NONE
public static final int LEFT
public static final int RIGHT
int button
javax.media.j3d.Transform3D rootTransform
javax.media.j3d.TransformGroup rootTransformGroup
javax.media.j3d.TransformGroup decTransformGroup
javax.media.j3d.PickInfo[] lastPickInfos
javax.media.j3d.BranchGroup baseGroup
java.util.ArrayList<javax.media.j3d.Shape3D> shapes
java.util.HashMap<java.lang.String,SceneItem> sceneItemHM
float scale
javax.media.j3d.Transform3D downTransform
javax.vecmath.Point3d wcdown
javax.media.j3d.Transform3D fcTrans
javax.media.j3d.Transform3D tcTrans
javax.media.j3d.Transform3D fwTrans
javax.media.j3d.Transform3D twTrans
javax.media.j3d.Transform3D fwrcTrans
javax.media.j3d.Transform3D twrcTrans
float downscale
float brightness
javax.media.j3d.BranchGroup lights
javax.media.j3d.DirectionalLight directionalLight
javax.media.j3d.AmbientLight ambientLight
int nshowing
public void deltaLights(double d)
public void setBrightness(double br)
private void applyBrightness(double br)
public javax.swing.JPanel getPanel()
public void setSceneGraph(javax.media.j3d.BranchGroup bg, java.util.ArrayList<javax.media.j3d.Shape3D> sha)
private javax.media.j3d.BranchGroup createDummySceneGraph()
private javax.media.j3d.BranchGroup createLightGraph(double br)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
void showFraction(double f)
void showAll()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
private void toggleHide()
private void toggleHideShape(javax.media.j3d.Shape3D s3d)
boolean hideShape(javax.media.j3d.Shape3D s)
void showShape(javax.media.j3d.Shape3D s)
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
private void zoomBy(double d)
private void zoomTo(double d)
private void setTransform(javax.media.j3d.Transform3D t3d)
public void intPan(int dx, int dy, javax.vecmath.Point3d cpos)
private void intRoll(int dx, int dy)
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
private javax.media.j3d.Transform3D getPickTransform(int xpos, int ypos)
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public static java.awt.GraphicsConfiguration getPreferredConfiguration()
public void setDecoration(java.lang.String id, javax.media.j3d.BranchGroup root, boolean b)
public void removeUnlistedDecoration(java.util.HashSet<java.lang.String> keepHS)
public void removeAllDecoration()
public void setDecorationVisibility(java.lang.String s, boolean b)
public void setAA(boolean b)
public void setLightsPercent(int p)
public void setFourMatrix(double[] fmo)
public double[] getFourMatrix()
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
Copyright © 2013. All Rights Reserved.