|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsyn3d.ui.Transformator
syn3d.ui.Frame3DBase
syn3d.ui.java3d.Frame3DJava3D
public class Frame3DJava3D
Class description ...
Field Summary | |
---|---|
protected int |
accumulator
|
protected Canvas3D |
canvas
|
protected javax.swing.JFrame |
frame
|
protected int |
lastMouseX
|
protected int |
lastMouseY
|
protected java.util.ArrayList |
lastPickSelection
|
protected SceneNodeJava3D |
scene
|
protected Transform3D |
tempTransform
|
protected Transform3D |
transform
|
protected View |
view
|
protected Viewer |
viewer
|
protected ViewingPlatform |
viewingPlatform
|
protected java.util.Timer |
zoomAccumulator
|
Fields inherited from class syn3d.ui.Frame3DBase |
---|
height, peerComponent, peerWindow, pluginManager, popup, screenSize, title, width, x, y |
Fields inherited from class syn3d.ui.Transformator |
---|
drotX, drotY, eyeDistance, perspective, pos2DX, pos2DY, rot, scaleFactor, trans, transFactorX, transFactorY, vtrans, wsize, zoom, zoomFactor |
Constructor Summary | |
---|---|
Frame3DJava3D(SceneNodeJava3D scene,
java.lang.String t,
int x,
int y,
int width,
int height,
PluginManager pm)
|
Method Summary | |
---|---|
void |
applyTransform()
Hook for subclasses, to apply the current transformation to a relevant object This method is called internally when a change occurs. |
protected void |
createPeer(java.lang.Object owner)
|
SceneNode |
getScene()
|
protected float |
getSceneSize()
Used for auto-zooming to englobe the scene |
View |
getView()
|
Viewer |
getViewer()
|
static void |
main(java.lang.String[] args)
Main function to test navigation |
ActiveNode |
pick(int posX,
int posY)
Selects a single pick at the given position. |
void |
rotate2D(int newX,
int newY,
boolean inverse)
Does a rotation of the scene according to moves in a 2D coordinate system. |
void |
setPerspective(boolean p)
|
java.util.ArrayList |
toggleAllPicks(int posX,
int posY)
Adds or removes all picks between the given position and the last position, to the selected objects. |
java.util.ArrayList |
toggleSinglePick(int posX,
int posY)
Adds or removes a single pick at the given position to the selected objects. |
void |
translate2D(int newX,
int newY)
Does a translation of the scene according to moves in a 2D coordinate system. |
void |
zoom(int zoomIncrement)
Zooms in or out of the scene according to the increment. |
void |
zoom2D(int newX,
int newY)
Uses the 2D increments in position to compute a zoom factor, then zooms the scene accordingly. |
Methods inherited from class syn3d.ui.Frame3DBase |
---|
autoZoom, getPeerWindow, getPopup, getTitle, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setPopup, setTitle |
Methods inherited from class syn3d.ui.Transformator |
---|
changeProjection, getEyeDistance, getPos2DX, getPos2DY, getRot, getScaleFactor, getTrans, getTransFactorX, getTranslationFactorY, getWSize, getZoom, getZoomFactor, init2DPosition, isPerspective, reset, rotate2D, setEyeDistance, setPos2DX, setPos2DY, setRot, setScaleFactor, setTrans, setTransFactorX, setTranslationFactorY, setWSize, setZoom, setZoomFactor, updateTranslateMatrix, updateZoomMatrix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.swing.JFrame frame
protected View view
protected Viewer viewer
protected ViewingPlatform viewingPlatform
protected Canvas3D canvas
protected SceneNodeJava3D scene
protected java.util.ArrayList lastPickSelection
protected int lastMouseX
protected int lastMouseY
protected Transform3D transform
protected Transform3D tempTransform
protected java.util.Timer zoomAccumulator
protected int accumulator
Constructor Detail |
---|
public Frame3DJava3D(SceneNodeJava3D scene, java.lang.String t, int x, int y, int width, int height, PluginManager pm)
owner
- x
- y
- width
- height
- Method Detail |
---|
public SceneNode getScene()
getScene
in class Frame3DBase
public Viewer getViewer()
public View getView()
protected void createPeer(java.lang.Object owner)
createPeer
in class Frame3DBase
public void setPerspective(boolean p)
setPerspective
in class Transformator
public void rotate2D(int newX, int newY, boolean inverse)
Transformator
rotate2D
in class Transformator
newX
- The new X position in 2D, typically a mouse positionnewY
- The new Y position in 2D, typically a mouse positioninverse
- Inverse the direction of the rotation if true.
This is used ROTATION_MODE viewing mode for the scene, in which case the scene
rotates according to the mouse => in fact, the camera rotates in the opposite direction.
=> default is truepublic void zoom(int zoomIncrement)
Transformator
zoom
in class Transformator
zoomIncrement
- A value typically 1 or -1, but which can be greater for fast zooms.
Positive values zoom in, negative values zoom out.public void zoom2D(int newX, int newY)
Transformator
zoom2D
in class Transformator
newX
- The new X position in 2D, typically a mouse positionnewY
- The new Y position in 2D, typically a mouse positionpublic void translate2D(int newX, int newY)
Transformator
translate2D
in class Transformator
newX
- The new X position in 2D, typically a mouse positionnewY
- The new Y position in 2D, typically a mouse positionpublic void applyTransform()
Transformator
applyTransform
in class Transformator
public java.util.ArrayList toggleSinglePick(int posX, int posY)
posX
- the 2D X position where to do the pickingposY
- the 2D Y position where to do the picking
ActiveNode.higlight(boolean,Object)
public java.util.ArrayList toggleAllPicks(int posX, int posY)
posX
- the 2D X position defining a region with the last position. All objects in this region should be picked.posX
- the 2D Y position defining a region with the last position. All objects in this region should be picked.
ActiveNode.higlight(boolean,Object)
public ActiveNode pick(int posX, int posY)
posX
- the 2D X position where to do the pickingposY
- the 2D Y position where to do the picking
ActiveNode.higlight(boolean,Object)
protected float getSceneSize()
Frame3DBase
getSceneSize
in class Frame3DBase
public static void main(java.lang.String[] args)
args
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |