Class DefaultProbe
java.lang.Object
gov.nih.mipav.view.renderer.J3D.surfaceview.rfaview.DefaultProbe
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
FieldsModifier and TypeFieldDescriptionprotected javax.vecmath.Color3fAmbient, emissive, sepcualar, diffuse color is used for the attenuation lighting.private com.sun.j3d.utils.geometry.ConeCone shape part of the probe.private com.sun.j3d.utils.geometry.ConeIndicator probe cone shape.private javax.media.j3d.TransformGroupTransform group of the indicator cone shape.private javax.media.j3d.TransformGroupTransform group of the cone shape.protected javax.vecmath.Color3fDefine the cyan color.private com.sun.j3d.utils.geometry.CylinderCylinder shape part of the probe.private com.sun.j3d.utils.geometry.CylinderIndicator is used by the default probe to switch color between cyan and green.private javax.media.j3d.TransformGroupTransform group of the indicator cylinder shape.private javax.media.j3d.TransformGroupTransform group of the cylinder shape.private javax.media.j3d.TransformGroupThe root of the default probe.private javax.media.j3d.BranchGroupThe root branch group of the cyan default robe.protected javax.vecmath.Color3fDOCUMENT ME!protected javax.vecmath.Color3fDOCUMENT ME!protected javax.vecmath.Color3fDefine the green color.private javax.media.j3d.BranchGroupThe root branch group of the green indicator probe.protected com.sun.j3d.utils.picking.PickCanvasAgent to set the probe pickable.protected javax.vecmath.Color3fDOCUMENT ME!private javax.media.j3d.SwitchSwitch group used to switch between cyan and green probes.private floatY original coordinate value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenableEntryPointRotation(boolean flag) Enable the probe to rotate around the entry point.protected booleanfindProbe(javax.media.j3d.Shape3D pickedShape) Check whether the probe being picked or not.protected javax.media.j3d.TransformGroupgetProbe()Get the root of the default probe.protected voidinit()Initialize the probe geometry shapes.protected voidsetProbeCoordinate(float value) Set the probe translation in the local coordinate system.protected voidsetProbeGreenColor(boolean flag) Switch the default probe between color cyan and color green.
-
Field Details
-
ambientColor
protected javax.vecmath.Color3f ambientColorAmbient, emissive, sepcualar, diffuse color is used for the attenuation lighting. -
cyan
protected javax.vecmath.Color3f cyanDefine the cyan color. -
diffuseColor
protected javax.vecmath.Color3f diffuseColorDOCUMENT ME! -
emissiveColor
protected javax.vecmath.Color3f emissiveColorDOCUMENT ME! -
green
protected javax.vecmath.Color3f greenDefine the green color. -
pickCanvas
protected com.sun.j3d.utils.picking.PickCanvas pickCanvasAgent to set the probe pickable. -
sepcualarColor
protected javax.vecmath.Color3f sepcualarColorDOCUMENT ME! -
coneDefault
private com.sun.j3d.utils.geometry.Cone coneDefaultCone shape part of the probe. -
coneIndicator
private com.sun.j3d.utils.geometry.Cone coneIndicatorIndicator probe cone shape. -
coneIndicatorTG
private javax.media.j3d.TransformGroup coneIndicatorTGTransform group of the indicator cone shape. -
coneTG
private javax.media.j3d.TransformGroup coneTGTransform group of the cone shape. -
cylinderDefault
private com.sun.j3d.utils.geometry.Cylinder cylinderDefaultCylinder shape part of the probe. -
cylinderIndicator
private com.sun.j3d.utils.geometry.Cylinder cylinderIndicatorIndicator 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 cylinderIndicatorTGTransform group of the indicator cylinder shape. -
cylinderTG
private javax.media.j3d.TransformGroup cylinderTGTransform group of the cylinder shape. -
defaultProbe
private javax.media.j3d.TransformGroup defaultProbeThe root of the default probe. -
defaultProbeBG
private javax.media.j3d.BranchGroup defaultProbeBGThe root branch group of the cyan default robe. -
indicatorProbeBG
private javax.media.j3d.BranchGroup indicatorProbeBGThe root branch group of the green indicator probe. -
switchGroup
private javax.media.j3d.Switch switchGroupSwitch group used to switch between cyan and green probes. -
yOrigin
private float yOriginY original coordinate value.
-
-
Constructor Details
-
DefaultProbe
public DefaultProbe()Constructor, initialize the probe shapes.
-
-
Method Details
-
enableEntryPointRotation
public void enableEntryPointRotation(boolean flag) Enable the probe to rotate around the entry point.- Parameters:
flag- booleantruemeans around the entry point,falsearound 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
trueprobe picked,falseprobe 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- booleantruegreen color,falsecyan color.
-