Class Honeycomb
java.lang.Object
|
+--javax.media.j3d.SceneGraphObject
|
+--javax.media.j3d.Node
|
+--javax.media.j3d.Group
|
+--javax.media.j3d.BranchGroup
|
+--Honeycomb
- All Implemented Interfaces:
- ClickableShape3D
- public class Honeycomb
- extends javax.media.j3d.BranchGroup
- implements ClickableShape3D
Title: Honeycomb
Description: a honeycomb to view in virtual universe
- Author:
- Dimitri Missoh & Daniel Schlosser
Fields inherited from class javax.media.j3d.BranchGroup |
ALLOW_DETACH |
Fields inherited from class javax.media.j3d.Group |
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE |
Fields inherited from class javax.media.j3d.Node |
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING, visited |
Fields inherited from class javax.media.j3d.SceneGraphObject |
capabilities, compiled, live, liveOrCompiled, nodeHashtable, retained, userData |
Constructor Summary |
Honeycomb(int x,
int y,
int z,
ModellViewer mv)
Constructor using 3d coordinate and the Modellviewer to setup correctly |
Method Summary |
void |
changeColor(java.awt.Color col)
This will change the color of the honeycomb |
void |
ClickActionAppeared(java.awt.event.MouseEvent event)
This function is called when someone clicks on a honeycomb |
Koord3D |
getpos()
You can use this to get information about the position of this honeycomb |
boolean |
isMarked()
returns if the honeycomb is marked |
boolean |
isSelected()
|
void |
setMarked(boolean b,
java.awt.Color col)
A honeycomb can be marked by clicking it with the mouse and selected by
using the Mark and View Dialog |
void |
setSelected(boolean b)
Use this to (de)select a honeycomb |
void |
toLines(boolean t)
You can select how polygons are drawn |
Methods inherited from class javax.media.j3d.BranchGroup |
cloneNode, compile, createRetained, detach, pickAll, pickAllSorted, pickAny, pickClosest |
Methods inherited from class javax.media.j3d.Group |
addChild, cloneTree, duplicateAttributes, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, insertChild, moveTo, numChildren, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds |
Methods inherited from class javax.media.j3d.Node |
checkDuplicateNode, checkForCycle, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
checkForLiveOrCompiled, clearCapability, clearLive, duplicateSceneGraphObject, getCapability, getNodeComponent, getUserData, isCompiled, isLive, isLiveOrCompiled, setCapability, setCompiled, setLive, setUserData, updateNodeReferences |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
marked
private boolean marked
selected
private boolean selected
x
private int x
y
private int y
z
private int z
trans
private javax.media.j3d.Transform3D trans
translation
private javax.media.j3d.TransformGroup translation
cell
private HoneycombShape3D cell
viewport
private ModellViewer viewport
Honeycomb
public Honeycomb(int x,
int y,
int z,
ModellViewer mv)
- Constructor using 3d coordinate and the Modellviewer to setup correctly
- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinatemv
- the ModellViewer to call if clicked
getpos
public Koord3D getpos()
- You can use this to get information about the position of this honeycomb
- Returns:
- coordinate of this honeycomb
changeColor
public void changeColor(java.awt.Color col)
- This will change the color of the honeycomb
- Parameters:
col
- The color the honeycomb will be displayed
toLines
public void toLines(boolean t)
- You can select how polygons are drawn
- Parameters:
t
- true = only Lines / false = real polygons
isMarked
public boolean isMarked()
- returns if the honeycomb is marked
- Returns:
- true if marked
setMarked
public void setMarked(boolean b,
java.awt.Color col)
- A honeycomb can be marked by clicking it with the mouse and selected by
using the Mark and View Dialog
- Parameters:
b
- marked or notcol
- the color the honeycomb gets marked with
isSelected
public boolean isSelected()
- Returns:
- If honeycomb is selected
setSelected
public void setSelected(boolean b)
- Use this to (de)select a honeycomb
- Parameters:
b
- selected yes or no
ClickActionAppeared
public void ClickActionAppeared(java.awt.event.MouseEvent event)
- This function is called when someone clicks on a honeycomb
- Specified by:
ClickActionAppeared
in interface ClickableShape3D
- Parameters:
event
- A mouse event