|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsyn3d.base.ActiveNode
syn3d.nodes.GroupNode
syn3d.nodes.SceneNode
syn3d.nodes.java3d.SceneNodeJava3D
public class SceneNodeJava3D
Nested Class Summary |
---|
Nested classes/interfaces inherited from class syn3d.nodes.SceneNode |
---|
SceneNode.SceneTimerTask |
Field Summary | |
---|---|
protected BranchGroup |
axisGroup
|
protected BranchGroup |
branchgroup
|
protected Canvas3D |
canvas3D
|
protected int |
detachKey
|
protected Frame3DJava3D |
frame
|
protected int |
lightRotationMode
|
protected DirectionalLight[] |
lights
|
protected Shape3D |
lightVector
|
protected Switch |
mainSwitch
|
protected PluginManager |
pluginManager
A reference to the pluginManager scene |
protected BranchGroup |
rootGroup
|
protected SimpleUniverse |
universe
|
Fields inherited from class syn3d.nodes.SceneNode |
---|
anonymousSceneNumber, dirtyNodes, fileName, FLY_BY_MODE, icon, listeners, REFRESH_PERIOD, refreshPeriod, refreshPeriodChanged, ROTATION_MODE, timer, viewingMode |
Fields inherited from class syn3d.base.ActiveNode |
---|
children, name, parent |
Constructor Summary | |
---|---|
SceneNodeJava3D(ActiveNode parent,
PluginManager pm)
|
Method Summary | |
---|---|
static void |
addChildToParentGroup(Group j3dGroup,
Node j3dChild)
Helper to add a child to a group at run-time. |
void |
attach()
Allow the scene to be displayed by attaching the main branchgroup |
static void |
attach(ActiveNode node)
Allow the scene to be displayed by attaching the main branchgroup |
static void |
attach(ActiveNode node,
int key)
Allow the scene to be displayed by attaching the main branchgroup |
void |
attach(int key)
Allow the scene to be displayed by attaching the main branchgroup |
void |
autoZoom()
Auto zooms the scene out of all objects |
void |
changeProjection()
Turns perspective on an off |
void |
detach()
Allow modifications to the scene by detaching the main branchgroup |
static void |
detach(ActiveNode node)
Allow modifications to the scene by detaching the main branchgroup |
static void |
detach(ActiveNode node,
int key)
Allow modifications to the scene by detaching the main branchgroup |
void |
detach(int key)
Allow modifications to the scene by detaching the main branchgroup Attaching will be accepted only with the given key => this allows a code to detach once for all, and call functions that do attach/detach with other or no keys => the higher level detach/attach is the only one taken in account Tip: use Object.hashCode() to get a unique ID. |
void |
doAction(java.lang.Object action)
When the user has selected an action in the list return by getActions(), this method is called. |
java.lang.Object |
get3DObject()
Returns the 3D object that this node refers to. |
java.util.List |
getActions()
Returns a list of possible actions on this node. |
BranchGroup |
getBranchgroup()
|
Canvas3D |
getCanvas3D()
|
int |
getLightRotationMode()
|
DirectionalLight[] |
getLights()
|
SimpleUniverse |
getUniverse()
|
void |
init2DPosition(int posX,
int posY)
Initialize 2D rotation algorithm with the current position as origin. |
boolean |
isVisible()
|
ActiveNode |
pick(int posX,
int posY)
Selects a single pick at the given position. |
void |
remove()
Removes this node from the parent list. |
static void |
removeChildFromParentGroup(Node j3dChild)
Helper to remove a child from a group at run-time. |
void |
removeSceneJ3D()
|
void |
reset()
Reset all values to default |
void |
restoreScene(PluginManager pm)
Restore scene : subclasses can restore the scene once all ActiveNOde have been initialised |
void |
rotate2D(int newX,
int newY)
Does a rotation of the scene according to moves in a 2D coordinate system. |
boolean |
saveSceneJava3D(java.io.File f)
|
void |
sceneChanged(SceneNode scene)
|
void |
setVisible(boolean status)
|
void |
showLightVector(float x,
float y,
float z)
|
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.nodes.SceneNode |
---|
addDirtyNode, addListener, getIcon, getRefreshPeriod, getScene, getViewingMode, notificationEnd, notifyChange, notifyListeners, propagateHighlightEvent, propagateInternalChangeEvent, removeDirtyNode, removeListener, restoreReferences, saveChildren, setRefreshPeriod, setViewingMode |
Methods inherited from class syn3d.nodes.GroupNode |
---|
getScene |
Methods inherited from class syn3d.base.ActiveNode |
---|
addChild, findDescendantOfType, findDescendantOfType, getChildren, getName, getParent, highlight, notifyInternalChange, notifyStructuralChange, propagateAddChildEvent, propagateChangeNameEvent, propagateRemoveChildEvent, propagateStructuralChangeEvent, removeChild, removeNodeTree, removeNodeTreeFrom, setName, setParent, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient SimpleUniverse universe
protected transient BranchGroup rootGroup
protected transient BranchGroup branchgroup
protected transient Canvas3D canvas3D
protected transient Frame3DJava3D frame
protected transient DirectionalLight[] lights
protected int lightRotationMode
protected transient Shape3D lightVector
protected int detachKey
protected transient Switch mainSwitch
protected transient BranchGroup axisGroup
protected transient PluginManager pluginManager
Constructor Detail |
---|
public SceneNodeJava3D(ActiveNode parent, PluginManager pm)
Method Detail |
---|
public java.util.List getActions()
ActiveNode
getActions
in class SceneNode
public void doAction(java.lang.Object action)
ActiveNode
doAction
in class SceneNode
action
- An action previously declared by the getActions method.public void remove()
SceneNode
remove
in class SceneNode
public java.lang.Object get3DObject()
ActiveNode
get3DObject
in class ActiveNode
public boolean isVisible()
isVisible
in class SceneNode
public void setVisible(boolean status)
setVisible
in class SceneNode
public void restoreScene(PluginManager pm)
restoreScene
in class SceneNode
pm
- public Canvas3D getCanvas3D()
public SimpleUniverse getUniverse()
public DirectionalLight[] getLights()
public int getLightRotationMode()
public BranchGroup getBranchgroup()
public void detach()
public void attach()
public static void detach(ActiveNode node)
public static void attach(ActiveNode node)
public void detach(int key)
public void attach(int key)
public static void detach(ActiveNode node, int key)
public static void attach(ActiveNode node, int key)
public static void addChildToParentGroup(Group j3dGroup, Node j3dChild)
public static void removeChildFromParentGroup(Node j3dChild)
public void sceneChanged(SceneNode scene)
sceneChanged
in interface SceneChangeListener
public void showLightVector(float x, float y, float z)
public void init2DPosition(int posX, int posY)
SceneNode
init2DPosition
in class SceneNode
public void rotate2D(int newX, int newY)
SceneNode
rotate2D
in class SceneNode
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)
SceneNode
translate2D
in class SceneNode
newX
- The new X position in 2D, typically a mouse positionnewY
- The new Y position in 2D, typically a mouse positionpublic void zoom(int zoomIncrement)
SceneNode
zoom
in class SceneNode
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)
SceneNode
zoom2D
in class SceneNode
newX
- The new X position in 2D, typically a mouse positionnewY
- The new Y position in 2D, typically a mouse positionpublic void changeProjection()
SceneNode
changeProjection
in class SceneNode
public void reset()
SceneNode
reset
in class SceneNode
public void autoZoom()
SceneNode
autoZoom
in class SceneNode
public java.util.ArrayList toggleSinglePick(int posX, int posY)
SceneNode
toggleSinglePick
in class SceneNode
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)
SceneNode
toggleAllPicks
in class SceneNode
posX
- the 2D X 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)
SceneNode
pick
in class SceneNode
posX
- the 2D X position where to do the pickingposY
- the 2D Y position where to do the picking
ActiveNode.higlight(boolean,Object)
public boolean saveSceneJava3D(java.io.File f)
public void removeSceneJ3D()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |