anl.aida.viz3d
Class LabeledShape

java.lang.Object
  extended by anl.aida.viz3d.VSpatial
      extended by anl.aida.viz3d.LabeledShape

public class LabeledShape
extends VSpatial


Field Summary
private  VLabel label
           
private  VSpatial node
           
private  float[] offset
           
 
Fields inherited from class anl.aida.viz3d.VSpatial
appearence, boundingSphere, clientMap, dirty, id, localRotation, localScale, localTrans, parent, visible, worldRotation, worldScale, worldTrans
 
Constructor Summary
LabeledShape(VSpatial node, java.lang.String label, float[] offset)
           
 
Method Summary
protected  void doDraw(javax.media.opengl.GL gl)
          Does the actual drawing.
protected  BoundingSphere doGetBoundingSphere()
          Gets the actual bounding sphere.
 javax.vecmath.Color4f getLabelColor()
          Gets the color of this LabeledNode's label.
 MaterialAppearence getMaterialAppearence()
          Gets the MaterialAppearence of this VSpatial.
 BoundingSphere getNodeBoundingSphere()
          Gets the node (non-label) bounding Sphere.
 void intersects(javax.vecmath.Point3f rayOrigin, javax.vecmath.Vector3f rayDirection, Accumulator accumulator)
          Performs an intersection these on this VSpatial with the specified ray.
 boolean isLabelVisible()
          Gets whether or not this LabeledNode's label.
 boolean isNodeVisible()
          Gets whether or not this LabeledNode's node is visible.
protected  void markAsDirty()
           
private  void resetLabelLocation()
           
 void scaleNode(float scale)
          Scales the node part of this node label, leaving the label as is.
 void setLabelColor(java.awt.Color color)
          Sets the color of this LabeledNode's label.
 void setLabelVisible(boolean visible)
          Sets the visibility of this LabeledNode's label.
 void setMaterialAppearence(MaterialAppearence app)
          Sets the MaterialAppearence of this VSpatial.
 void setNodeMaterialAppearence(MaterialAppearence app)
           
 void setNodeVisible(boolean visible)
          Sets the visibility of this LabeledNode's node.
 void updateWorldTransformation()
           
 
Methods inherited from class anl.aida.viz3d.VSpatial
draw, getBoundingSphere, getLocalBoundingSphere, getParent, getProperty, getTranslation, getWorldToLocalTransform, isVisible, percolateDirtyUp, putProperty, rotate, rotate, scale, setParent, setVisible, transform, translate, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

private VSpatial node

label

private VLabel label

offset

private float[] offset
Constructor Detail

LabeledShape

public LabeledShape(VSpatial node,
                    java.lang.String label,
                    float[] offset)
Method Detail

markAsDirty

protected void markAsDirty()
Overrides:
markAsDirty in class VSpatial

updateWorldTransformation

public void updateWorldTransformation()
Overrides:
updateWorldTransformation in class VSpatial

scaleNode

public void scaleNode(float scale)
Scales the node part of this node label, leaving the label as is.

Parameters:
scale - the amount to scale

setNodeMaterialAppearence

public void setNodeMaterialAppearence(MaterialAppearence app)

getMaterialAppearence

public MaterialAppearence getMaterialAppearence()
Description copied from class: VSpatial
Gets the MaterialAppearence of this VSpatial.

Overrides:
getMaterialAppearence in class VSpatial
Returns:
the MaterialAppearence of this VSpatial.

setMaterialAppearence

public void setMaterialAppearence(MaterialAppearence app)
Description copied from class: VSpatial
Sets the MaterialAppearence of this VSpatial.

Overrides:
setMaterialAppearence in class VSpatial
Parameters:
app - the new appearence

setLabelColor

public void setLabelColor(java.awt.Color color)
Sets the color of this LabeledNode's label.

Parameters:
color - the new color

getLabelColor

public javax.vecmath.Color4f getLabelColor()
Gets the color of this LabeledNode's label.

Returns:
the color of this LabeledNode's label.

setNodeVisible

public void setNodeVisible(boolean visible)
Sets the visibility of this LabeledNode's node.

Parameters:
visible - the new visibility property

isNodeVisible

public boolean isNodeVisible()
Gets whether or not this LabeledNode's node is visible.

Returns:
true if this LabeledNode's node is visible, otherwise false.

setLabelVisible

public void setLabelVisible(boolean visible)
Sets the visibility of this LabeledNode's label.

Parameters:
visible - the new visibility property

isLabelVisible

public boolean isLabelVisible()
Gets whether or not this LabeledNode's label. is visible.

Returns:
true if this LabeledNode's label.is visible, otherwise false.

doDraw

protected void doDraw(javax.media.opengl.GL gl)
Description copied from class: VSpatial
Does the actual drawing.

Specified by:
doDraw in class VSpatial

getNodeBoundingSphere

public BoundingSphere getNodeBoundingSphere()
Gets the node (non-label) bounding Sphere.

Returns:
the node bounding sphere

doGetBoundingSphere

protected BoundingSphere doGetBoundingSphere()
Description copied from class: VSpatial
Gets the actual bounding sphere. This is called by getBoundingSphere once the worldTransforms have been updated.

Overrides:
doGetBoundingSphere in class VSpatial
Returns:
this VSpatial's BoundingSphere.

intersects

public void intersects(javax.vecmath.Point3f rayOrigin,
                       javax.vecmath.Vector3f rayDirection,
                       Accumulator accumulator)
Description copied from class: VSpatial
Performs an intersection these on this VSpatial with the specified ray. If the intersection passes, this VSpatial should be added to the Accumulator.

Specified by:
intersects in class VSpatial
Parameters:
rayOrigin - the ray's origin
rayDirection - the ray's direction
accumulator - the accumulator to add the VSpatial to

resetLabelLocation

private void resetLabelLocation()