camera3d
Class VcLaserArray

java.lang.Object
  extended bycamera3d.VcObject
      extended bycamera3d.VcHelper
          extended bycamera3d.VcLaser
              extended bycamera3d.VcLaserArray
All Implemented Interfaces:
RotatableObject, ScalableObject, TranslatableObject, camera3d.VcLaserTracer

public class VcLaserArray
extends camera3d.VcLaser
implements camera3d.VcLaserTracer

A laser array for structured lighting simulation.

Version:
1.0
Author:
Carlos da Silva dos Santos

Field Summary
 
Fields inherited from class camera3d.VcObject
transformationMode
 
Constructor Summary
VcLaserArray()
          Creates a LaserArray with the following configuration: 2 beams in X direction 2 beams in Y direction 1.0 meter between beams in X direction 1.0 meter between beams in Y direction
VcLaserArray(int xBeams, int yBeams, double xDelta, double yDelta)
          Constructor
VcLaserArray(int xBeams, int yBeams, double xDelta, double yDelta, camera3d.VcLaserTracer tracer, javax.media.j3d.Shape3D targetGizmo)
          Constructor
 
Method Summary
 double getBlue()
           
 boolean getEnable()
          Returns a flag indicating whether target position is being updated.
 double getGreen()
           
 javax.swing.Icon getIcon()
          Returns the Icon associated with the laser array.
 java.lang.String getInfo()
           
static int getInstanceCounter()
          Returns the number of objects instatiated so far.
 double getMinimumDistance()
          Returns minimum distance allowed between laser beams (both in X and Y directions).
 double getMinimumScale(double minimumSize)
          Returns minimum scale applied to laser beams.
 double getRed()
           
 double getTargetScale()
           
 int getXBeams()
           
 double getXDelta()
           
 int getYBeams()
           
 double getYDelta()
           
 void initialize()
          Method from VcLaser interface.
 void setBranchGroup(javax.media.j3d.BranchGroup bg)
           
 void setColor(javax.vecmath.Color3f color)
          Sets the color of the target gizmo.
 void setColor(double red, double green, double blue)
          Sets the color of the target gizmo.
 void setColor(float red, float green, float blue)
          Sets the color of the target gizmo
 void setEnable(boolean enable)
          Method from VcLaserTracer interface.
 void setGrid(int xBeams, int yBeams, double xDelta, double yDelta)
          Changes the current grid for this laser array.
 void setIcon(javax.swing.Icon arrayIcon)
          Sets the Icon associated with the laser array.
 void setMinimumDistance(double minimumDistance)
          Sets minimum distance allowed between laser beams (both in X and Y directions).
 void setMinimumScale(double minimumScale)
          Sets minimum scale that can be applied to laser beams.
 void setRadius(float radius)
          Sets the radius of the target gizmo.
 void setTargetScale(double scale)
           
 void trace()
          Method from VcLaser interface
 
Methods inherited from class camera3d.VcObject
addChangeListener, addNode, addVcChild, detach, getBoundingBox, getBoundingBoxInVWorld, getBranchGroup, getChildrenList, getLabel, getLocalToVworld, getParentRotScaleTG, getParentTransTG, getTooltipText, getTransforms, getTranslation, getXAngleDeg, getXAngleRad, getXScale, getXTranslation, getYAngleDeg, getYAngleRad, getYScale, getYTranslation, getZAngleDeg, getZAngleRad, getZScale, getZTranslation, hideBoundingBox, isInvalidData, isLive, isSelected, printTransform, removeAllChangeListeners, removeAllNodes, removeBoundingBox, removeChangeListener, removeNode, removeVcChild, removeVcChild, rotateAbsolute, rotateEuler, rotateEulerLocal, rotateEulerLocalX, rotateEulerLocalY, rotateEulerLocalZ, rotateEulerX, rotateEulerY, rotateEulerZ, rotateLocal, scaleRelative, scaleX, scaleXRelative, scaleY, scaleYRelative, scaleZ, scaleZRelative, select, setAbsoluteScale, setGlobalAxisVisible, setLabel, setLocalAxisVisible, setOngoingTransformation, setOngoingTransformationMode, setRelativeScale, setTooltipText, setTransform, setTransformsToIdentity, showBoundingBox, translate, translate, translateLocal, underOngoingTransformation, unselect, updateData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VcLaserArray

public VcLaserArray()
Creates a LaserArray with the following configuration: 2 beams in X direction 2 beams in Y direction 1.0 meter between beams in X direction 1.0 meter between beams in Y direction


VcLaserArray

public VcLaserArray(int xBeams,
                    int yBeams,
                    double xDelta,
                    double yDelta)
Constructor

Parameters:
xBeams - Number of beams in X direction
yBeams - Number of beams in Y direction
xDelta - Distance between beams in X direction
yDelta - Distance between beams in Y direction

VcLaserArray

public VcLaserArray(int xBeams,
                    int yBeams,
                    double xDelta,
                    double yDelta,
                    camera3d.VcLaserTracer tracer,
                    javax.media.j3d.Shape3D targetGizmo)
Constructor

Parameters:
xBeams - Number of beams in X direction
yBeams - Number of beams in Y direction
xDelta - Distance between beams in X direction
yDelta - Distance between beams in Y direction
tracer - Object responsible for updating the position of the beams
targetGizmo - Gizmo to be shown where the beam hits an object
Method Detail

setBranchGroup

public void setBranchGroup(javax.media.j3d.BranchGroup bg)

trace

public void trace()
Method from VcLaser interface


setColor

public void setColor(float red,
                     float green,
                     float blue)
Sets the color of the target gizmo


setColor

public void setColor(double red,
                     double green,
                     double blue)
Sets the color of the target gizmo. It calls notifyChangeListeners() at the end of execution.

Parameters:
red - value of Red component (between 0.0 and 1.0).
green - value of Green component (between 0.0 and 1.0).
blue - value of Blue component (between 0.0 and 1.0).

setColor

public void setColor(javax.vecmath.Color3f color)
Sets the color of the target gizmo. It calls notifyChangeListeners() at the end of execution.

Parameters:
color - new color to be used

setRadius

public void setRadius(float radius)
Sets the radius of the target gizmo. It calls notifyChangeListeners() at the end of execution.


setTargetScale

public void setTargetScale(double scale)

getTargetScale

public double getTargetScale()

getRed

public double getRed()

getGreen

public double getGreen()

getBlue

public double getBlue()

setMinimumDistance

public void setMinimumDistance(double minimumDistance)
Sets minimum distance allowed between laser beams (both in X and Y directions). It does not call notifyChangeListeners().

Parameters:
minimumDistance - new value of parameter

getMinimumDistance

public double getMinimumDistance()
Returns minimum distance allowed between laser beams (both in X and Y directions). It does not call notifyChangeListeners().

Returns:
current value of parameter.

setMinimumScale

public void setMinimumScale(double minimumScale)
Sets minimum scale that can be applied to laser beams. It does not call notifyChangeListeners().

Parameters:
minimumScale - new value of parameter.

getMinimumScale

public double getMinimumScale(double minimumSize)
Returns minimum scale applied to laser beams. It does not call notifyChangeListeners().

Returns:
current value of parameter.

setGrid

public void setGrid(int xBeams,
                    int yBeams,
                    double xDelta,
                    double yDelta)
Changes the current grid for this laser array. It calls notifyChangeListeners().

Parameters:
xBeams - number of beams in X direction.
yBeams - number of beams in Y direction.
xDelta - distance between beams in X direction
yDelta - distance between beams in Y direction

getXBeams

public int getXBeams()

getYBeams

public int getYBeams()

getXDelta

public double getXDelta()

getYDelta

public double getYDelta()

getInstanceCounter

public static int getInstanceCounter()
Returns the number of objects instatiated so far.


getInfo

public java.lang.String getInfo()
Overrides:
getInfo in class VcObject

initialize

public void initialize()
Method from VcLaser interface.


setEnable

public void setEnable(boolean enable)
Method from VcLaserTracer interface. Enables updating of target position. It calls notifyChangeListeners() at end of execution.

Specified by:
setEnable in interface camera3d.VcLaserTracer
Parameters:
enable - true if position should be updated, false otherwise.

getEnable

public boolean getEnable()
Returns a flag indicating whether target position is being updated.

Specified by:
getEnable in interface camera3d.VcLaserTracer
Returns:
true if position is being updated, false otherwise.

getIcon

public javax.swing.Icon getIcon()
Returns the Icon associated with the laser array.

Specified by:
getIcon in class VcObject

setIcon

public void setIcon(javax.swing.Icon arrayIcon)
Sets the Icon associated with the laser array.

Specified by:
setIcon in class VcObject


Copyright © 2001-2003 F.R. Miranda, C.S. Santos, J.E. Kogler Jr.. All Rights Reserved.