|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsyn3d.base.ActiveNode
examples.syn3d.plugin.java3d.XYZResultNode
examples.syn3d.plugin.java3d.XYZResultNodeJava3D
public class XYZResultNodeJava3D
This specialisation of XYZResult node creates 3D objects corresponding to the file content, using Java3D. It also handles picking, as an example how to do this very useful feature with Java3D.
XYZResultNode,
Serialized Form| Field Summary | |
|---|---|
protected int |
currentVariable
The file may contain multiple variables per point (temperature, voltage...), but only one can be displayed at a given time. |
protected java.lang.String |
fileName
Used internally, the file name is displayed in the tree |
protected TransformGroup |
transformGroup
This node creates a tranform group so as to easily center and scale the shape |
| Fields inherited from class syn3d.base.ActiveNode |
|---|
children, name, parent |
| Constructor Summary | |
|---|---|
XYZResultNodeJava3D(ActiveNode parent)
This specialisation of XYZResultNode creates a Java3D tranform group to hold the shape defined by the data in the file. |
|
| Method Summary | |
|---|---|
void |
doAction(java.lang.Object action)
Do a previously declared action |
java.lang.Object |
get3DObject()
Returns the 3D object that this node refers to. |
java.util.List |
getActions()
Let's declare an action to load a file |
protected java.awt.Color |
getColorForValue(double value)
|
protected java.awt.Color |
getColorForValue(double value,
float saturation)
|
void |
highlight(boolean on,
java.lang.Object parameter)
Highlights this node some way. |
protected void |
load(java.io.File file)
Called from doAction => Load a file with the correct file format This Method should overriden by subclasses, so as to create 3D objects according to the data in the file. |
void |
remove()
Removes this node from the parent list. |
void |
showResult(int num)
Shows the given result from the data file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected TransformGroup transformGroup
protected java.lang.String fileName
protected int currentVariable
| Constructor Detail |
|---|
public XYZResultNodeJava3D(ActiveNode parent)
| Method Detail |
|---|
public java.lang.Object get3DObject()
ActiveNode
get3DObject in class ActiveNodepublic void remove()
ActiveNode
remove in class ActiveNodepublic java.util.List getActions()
XYZResultNode
getActions in class XYZResultNodepublic void doAction(java.lang.Object action)
XYZResultNode
doAction in class XYZResultNodeaction - An action previously declared by the getActions method.
protected void load(java.io.File file)
throws java.io.IOException
XYZResultNode
load in class XYZResultNodejava.io.IOExceptionpublic void showResult(int num)
XYZResultNode
showResult in class XYZResultNode
public void highlight(boolean on,
java.lang.Object parameter)
ActiveNode
highlight in class ActiveNodeon - true indicates to highlight this node, false to revert it back to normalparameter - A parameter set from the 3D underlying model in case of a picking operation,
or the node's 3D object in case of a user selection in the Scene Treeprotected java.awt.Color getColorForValue(double value)
protected java.awt.Color getColorForValue(double value,
float saturation)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||