Class DefaultProbe
- java.lang.Object
-
- gov.nih.mipav.view.renderer.J3D.surfaceview.rfaview.DefaultProbe
-
public class DefaultProbe extends java.lang.Object
Title: DefaultPorbe
Description: The default probe is the cyan probe. This class builds the default probe. It also defines the geometry shape of the default probe.
- Author:
- Ruida Cheng
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.vecmath.Color3f
ambientColor
Ambient, emissive, sepcualar, diffuse color is used for the attenuation lighting.private com.sun.j3d.utils.geometry.Cone
coneDefault
Cone shape part of the probe.private com.sun.j3d.utils.geometry.Cone
coneIndicator
Indicator probe cone shape.private javax.media.j3d.TransformGroup
coneIndicatorTG
Transform group of the indicator cone shape.private javax.media.j3d.TransformGroup
coneTG
Transform group of the cone shape.protected javax.vecmath.Color3f
cyan
Define the cyan color.private com.sun.j3d.utils.geometry.Cylinder
cylinderDefault
Cylinder shape part of the probe.private com.sun.j3d.utils.geometry.Cylinder
cylinderIndicator
Indicator is used by the default probe to switch color between cyan and green.private javax.media.j3d.TransformGroup
cylinderIndicatorTG
Transform group of the indicator cylinder shape.private javax.media.j3d.TransformGroup
cylinderTG
Transform group of the cylinder shape.private javax.media.j3d.TransformGroup
defaultProbe
The root of the default probe.private javax.media.j3d.BranchGroup
defaultProbeBG
The root branch group of the cyan default robe.protected javax.vecmath.Color3f
diffuseColor
DOCUMENT ME!protected javax.vecmath.Color3f
emissiveColor
DOCUMENT ME!protected javax.vecmath.Color3f
green
Define the green color.private javax.media.j3d.BranchGroup
indicatorProbeBG
The root branch group of the green indicator probe.protected com.sun.j3d.utils.picking.PickCanvas
pickCanvas
Agent to set the probe pickable.protected javax.vecmath.Color3f
sepcualarColor
DOCUMENT ME!private javax.media.j3d.Switch
switchGroup
Switch group used to switch between cyan and green probes.private float
yOrigin
Y original coordinate value.
-
Constructor Summary
Constructors Constructor Description DefaultProbe()
Constructor, initialize the probe shapes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enableEntryPointRotation(boolean flag)
Enable the probe to rotate around the entry point.protected boolean
findProbe(javax.media.j3d.Shape3D pickedShape)
Check whether the probe being picked or not.protected javax.media.j3d.TransformGroup
getProbe()
Get the root of the default probe.protected void
init()
Initialize the probe geometry shapes.protected void
setProbeCoordinate(float value)
Set the probe translation in the local coordinate system.protected void
setProbeGreenColor(boolean flag)
Switch the default probe between color cyan and color green.
-
-
-
Field Detail
-
ambientColor
protected javax.vecmath.Color3f ambientColor
Ambient, emissive, sepcualar, diffuse color is used for the attenuation lighting.
-
cyan
protected javax.vecmath.Color3f cyan
Define the cyan color.
-
diffuseColor
protected javax.vecmath.Color3f diffuseColor
DOCUMENT ME!
-
emissiveColor
protected javax.vecmath.Color3f emissiveColor
DOCUMENT ME!
-
green
protected javax.vecmath.Color3f green
Define the green color.
-
pickCanvas
protected com.sun.j3d.utils.picking.PickCanvas pickCanvas
Agent to set the probe pickable.
-
sepcualarColor
protected javax.vecmath.Color3f sepcualarColor
DOCUMENT ME!
-
coneDefault
private com.sun.j3d.utils.geometry.Cone coneDefault
Cone shape part of the probe.
-
coneIndicator
private com.sun.j3d.utils.geometry.Cone coneIndicator
Indicator probe cone shape.
-
coneIndicatorTG
private javax.media.j3d.TransformGroup coneIndicatorTG
Transform group of the indicator cone shape.
-
coneTG
private javax.media.j3d.TransformGroup coneTG
Transform group of the cone shape.
-
cylinderDefault
private com.sun.j3d.utils.geometry.Cylinder cylinderDefault
Cylinder shape part of the probe.
-
cylinderIndicator
private com.sun.j3d.utils.geometry.Cylinder cylinderIndicator
Indicator is used by the default probe to switch color between cyan and green. Indicator is the green color probe. I prefer switching the branch group rather than changing the java3d geometry appearance because the appearance changes waste time and memory. /** Indicator probe cylinder shape.
-
cylinderIndicatorTG
private javax.media.j3d.TransformGroup cylinderIndicatorTG
Transform group of the indicator cylinder shape.
-
cylinderTG
private javax.media.j3d.TransformGroup cylinderTG
Transform group of the cylinder shape.
-
defaultProbe
private javax.media.j3d.TransformGroup defaultProbe
The root of the default probe.
-
defaultProbeBG
private javax.media.j3d.BranchGroup defaultProbeBG
The root branch group of the cyan default robe.
-
indicatorProbeBG
private javax.media.j3d.BranchGroup indicatorProbeBG
The root branch group of the green indicator probe.
-
switchGroup
private javax.media.j3d.Switch switchGroup
Switch group used to switch between cyan and green probes.
-
yOrigin
private float yOrigin
Y original coordinate value.
-
-
Method Detail
-
enableEntryPointRotation
public void enableEntryPointRotation(boolean flag)
Enable the probe to rotate around the entry point.- Parameters:
flag
- booleantrue
means around the entry point,false
around the origin.
-
findProbe
protected boolean findProbe(javax.media.j3d.Shape3D pickedShape)
Check whether the probe being picked or not.- Parameters:
pickedShape
- picked geometry shape.- Returns:
- boolean
true
probe picked,false
probe not picked.
-
getProbe
protected javax.media.j3d.TransformGroup getProbe()
Get the root of the default probe.- Returns:
- TransformGroup The root transform group of the probe.
-
init
protected void init()
Initialize the probe geometry shapes.
-
setProbeCoordinate
protected void setProbeCoordinate(float value)
Set the probe translation in the local coordinate system.- Parameters:
value
- y coordinate value of the local coordinate system.
-
setProbeGreenColor
protected void setProbeGreenColor(boolean flag)
Switch the default probe between color cyan and color green.- Parameters:
flag
- booleantrue
green color,false
cyan color.
-
-