visual.entity
Class Link3d

java.lang.Object
  extended by visual.entity.Entity3d
      extended by visual.entity.Link3d

public class Link3d
extends Entity3d

Created by IntelliJ IDEA. User: andy Date: Apr 6, 2010 Creates a 3d line that links 2 experiment Nodes. It is the visual 3d representation of a Link. It also contains the line's transform group.


Nested Class Summary
 
Nested classes/interfaces inherited from class visual.entity.Entity3d
Entity3d.SCALE
 
Field Summary
 
Fields inherited from class visual.entity.Entity3d
entity, factor, TG
 
Constructor Summary
Link3d(Link link)
          Default Constructor.
 
Method Summary
 void changeColor(java.lang.String value)
          Changes the color of this line object.
 javax.media.j3d.Appearance createAppearance()
          Define the appearance of the 3d Link.
 com.sun.j3d.utils.geometry.Cylinder createCylinder(javax.vecmath.Vector3d source, javax.vecmath.Vector3d target, javax.media.j3d.Transform3D translate)
          Draw a cylinder instead of a line.
 void hide()
          If an entity has been constructed during experiment visualization, then in case of seeking or stop, when the rewire() method is called, it may be that even though the entity3d is displayed, it has not yet been constracted.
 void move(Position p)
          Move the 3d Entity to a new Position.
 void reden()
          Makes the 3d entity object flash red.
 void resetColor()
          Resets the color of this line3d to darkblue.
 void scale(Entity3d.SCALE mode)
          Either enlarges or shrinks the 3d link.
 void show()
          If during experiment visualization a new Entity is added and the corresponding Entity3d is hidden, show the Entity3d.
 void updateStatus()
          Makes a 3d Entity appear as enabled or disabled.
 void updateStatus(boolean state)
          Overrides the default updateStatus().
 
Methods inherited from class visual.entity.Entity3d
get, getEntity, getTG, normalize, rewire, setFactor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Link3d

public Link3d(Link link)
Default Constructor. Creates the line that connects two nodes.

Parameters:
link - the corresponding experiment.Link.
Method Detail

changeColor

public void changeColor(java.lang.String value)
Changes the color of this line object.

Parameters:
value - the LinkDisplayCapability.

createAppearance

public javax.media.j3d.Appearance createAppearance()
Define the appearance of the 3d Link.

Specified by:
createAppearance in class Entity3d
Returns:
an Appearance object.

createCylinder

public com.sun.j3d.utils.geometry.Cylinder createCylinder(javax.vecmath.Vector3d source,
                                                          javax.vecmath.Vector3d target,
                                                          javax.media.j3d.Transform3D translate)
Draw a cylinder instead of a line. Not in use. Rotations don't work.

Parameters:
source - the source Node position.
target - the target Node position.
translate - the used Transform3D.
Returns:
the Cylinder Primitive.

hide

public void hide()
If an entity has been constructed during experiment visualization, then in case of seeking or stop, when the rewire() method is called, it may be that even though the entity3d is displayed, it has not yet been constracted. In this case the entity3d is hidden until the entity is reconstructed.

Specified by:
hide in class Entity3d

move

public void move(Position p)
Move the 3d Entity to a new Position.

Specified by:
move in class Entity3d
Parameters:
p - is the new experiment.entity.Position where the 3d Entity is going to be moved.

reden

public void reden()
Makes the 3d entity object flash red.

Specified by:
reden in class Entity3d

resetColor

public void resetColor()
Resets the color of this line3d to darkblue.


scale

public void scale(Entity3d.SCALE mode)
Either enlarges or shrinks the 3d link. It is used with picking and is called by FrontEnd when the monitored entity changes.

Specified by:
scale in class Entity3d
Parameters:
mode - enlarge or shrink?

show

public void show()
If during experiment visualization a new Entity is added and the corresponding Entity3d is hidden, show the Entity3d.

Specified by:
show in class Entity3d

updateStatus

public void updateStatus()
Makes a 3d Entity appear as enabled or disabled. If the Link is disabled, the line appears dashed. NOT TESTED!

Specified by:
updateStatus in class Entity3d

updateStatus

public void updateStatus(boolean state)
Overrides the default updateStatus(). It is used to make the links of a disabled node also appear disabled. NOT TESTED!

Parameters:
state - false to make this link3d appear disabled. True does nothing.