camera3d.manipulation
Class TranslationManipulator

java.lang.Object
  extended bycamera3d.manipulation.TransformationManipulator
      extended bycamera3d.manipulation.TranslationManipulator

public class TranslationManipulator
extends TransformationManipulator

Manipulator for performing translation of scene objects with the mouse.

Version:
1.0
Author:
Fábio Roberto de Miranda, Carlos da Silva dos Santos

Constructor Summary
TranslationManipulator()
           
 
Method Summary
 void clearSelection()
          Clears current selection of objects to be translated.
 boolean getCheckClipPlanes()
          Returns flag that indicates if the translated object will be kept in the area between the two clipping planes during translation or if it will be allowed to go astray.
 void setBeginPoint(int x, int y)
          Sets mouse location where manipulation started.
 void setCanvas3D(javax.media.j3d.Canvas3D canvas)
          Sets the Canvas3D from which manipulations are performed.
 void setCheckClipPlanes(boolean checkClipPlanes)
          Sets flag used to determine if the translated object must be kept between the two clipping planes or no check should be performed to assure that condition.
 void setCurrentPoint(int x, int y)
          Sets current mouse location during manipulation.
 void setTranslatableObject(TranslatableObject translatableObject)
           
 
Methods inherited from class camera3d.manipulation.TransformationManipulator
getSelectedScope, setTransformationMode, setTransformationScope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranslationManipulator

public TranslationManipulator()
Method Detail

setTranslatableObject

public void setTranslatableObject(TranslatableObject translatableObject)

setCanvas3D

public void setCanvas3D(javax.media.j3d.Canvas3D canvas)
Sets the Canvas3D from which manipulations are performed.

Overrides:
setCanvas3D in class TransformationManipulator
Parameters:
canvas - Canvas3D object that originates manipulations.

setBeginPoint

public void setBeginPoint(int x,
                          int y)
Sets mouse location where manipulation started.

Overrides:
setBeginPoint in class TransformationManipulator
Parameters:
x - x coordinate of manipulation's initial point.
y - y coordinate of manipulation's initial point.

setCheckClipPlanes

public void setCheckClipPlanes(boolean checkClipPlanes)
Sets flag used to determine if the translated object must be kept between the two clipping planes or no check should be performed to assure that condition.
The checking process will only be performed if the view that is shown by the Canvas3D has both the back and front clip policies set to View.VIRTUAL_EYE

Parameters:
checkClipPlanes - if true, the translated object will be kept in the area between the two clipping planes; if false that condition is not assured.

getCheckClipPlanes

public boolean getCheckClipPlanes()
Returns flag that indicates if the translated object will be kept in the area between the two clipping planes during translation or if it will be allowed to go astray.


clearSelection

public void clearSelection()
Clears current selection of objects to be translated.

Specified by:
clearSelection in class TransformationManipulator

setCurrentPoint

public void setCurrentPoint(int x,
                            int y)
Sets current mouse location during manipulation.

Overrides:
setCurrentPoint in class TransformationManipulator
Parameters:
x - x coordinate of current manipulation point.
y - y coordinate of current manipulation point.


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