|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vtk.vtkObjectBase vtk.vtkObject vtk.vtkInteractorObserver vtk.vtk3DWidget vtk.vtkLineWidget
vtkLineWidget - 3D widget for manipulating a line. This 3D widget defines a line that can be interactively placed in a scene. The line has two handles (at its endpoints), plus the line can be picked to translate it in the scene. A nice feature of the object is that the vtkLineWidget, like any 3D widget, will work with the current interactor style and any other widgets present in the scene. That is, if vtkLineWidget does not handle an event, then all other registered observers (including the interactor style) have an opportunity to process the event. Otherwise, the vtkLineWidget will terminate the processing of the event that it handles. To use this object, just invoke SetInteractor() with the argument of the method a vtkRenderWindowInteractor. You may also wish to invoke "PlaceWidget()" to initially position the widget. The interactor will act normally until the "i" key (for "interactor") is pressed, at which point the vtkLineWidget will appear. (See superclass documentation for information about changing this behavior.) By grabbing one of the two end point handles (use the left mouse button), the line can be oriented and stretched (the other end point remains fixed). By grabbing the line itself, or using the middle mouse button, the entire line can be translated. Scaling (about the center of the line) is achieved by using the right mouse button. By moving the mouse "up" the render window the line will be made bigger; by moving "down" the render window the widget will be made smaller. Turn off the widget by pressing the "i" key again (or invoke the Off() method). (Note: picking the line or either one of the two end point handles causes a vtkPointWidget to appear. This widget has the ability to constrain motion to an axis by pressing the "shift" key while moving the mouse.) The vtkLineWidget has several methods that can be used in conjunction with other VTK objects. The Set/GetResolution() methods control the number of subdivisions of the line; the GetPolyData() method can be used to get the polygonal representation and can be used for things like seeding streamlines. Typical usage of the widget is to make use of the StartInteractionEvent, InteractionEvent, and EndInteractionEvent events. The InteractionEvent is called on mouse motion; the other two events are called on button down and button up (either left or right button). Some additional features of this class include the ability to control the properties of the widget. You can set the properties of the selected and unselected representations of the line. For example, you can set the property for the handles and line. In addition there are methods to constrain the line so that it is aligned along the x-y-z axes. JavaBean wrapper for vtkLineWidget object.
vtk3DWidget
,
vtkBoxWidget
,
Serialized FormField Summary | |
protected java.beans.PropertyChangeSupport |
changes
|
Fields inherited from class vtk.vtkObjectBase |
vtkId |
Constructor Summary | |
|
vtkLineWidget()
|
protected |
vtkLineWidget(int dmy)
|
Method Summary | |
void |
clampToBoundsOff()
Enable/disable clamping of the point end points to the bounding box of the data. |
void |
clampToBoundsOn()
Enable/disable clamping of the point end points to the bounding box of the data. |
int |
getAlign()
Force the line widget to be aligned with one of the x-y-z axes. |
int |
getAlignMaxValue()
Force the line widget to be aligned with one of the x-y-z axes. |
int |
getAlignMinValue()
Force the line widget to be aligned with one of the x-y-z axes. |
int |
getClampToBounds()
Enable/disable clamping of the point end points to the bounding box of the data. |
java.lang.String |
getClassName()
Return the class name as a string. |
vtkProperty |
getHandleProperty()
Get the handle properties (the little balls are the handles). |
vtkProperty |
getLineProperty()
Get the line properties. |
double[] |
getPoint1()
Set/Get the position of first end point. |
void |
getPoint1(double[] id0)
Set position of other end point. |
double[] |
getPoint2()
Set position of other end point. |
void |
getPoint2(double[] id0)
Force the line widget to be aligned with one of the x-y-z axes. |
void |
getPolyData(vtkPolyData id0)
Grab the polydata (including points) that defines the line. |
int |
getResolution()
Set/Get the position of first end point. |
vtkProperty |
getSelectedHandleProperty()
Get the handle properties (the little balls are the handles). |
vtkProperty |
getSelectedLineProperty()
Get the line properties. |
vtkLineWidget |
getThisLineWidget()
|
int |
isA(java.lang.String id0)
Return 1 if this class is the same type of (or a subclass of) the named class. |
void |
placeWidget()
Methods that satisfy the superclass' API. |
void |
placeWidget(double[] id0)
Methods that satisfy the superclass' API. |
void |
placeWidget(double id0,
double id1,
double id2,
double id3,
double id4,
double id5)
Set/Get the resolution (number of subdivisions) of the line. |
void |
setAlign(int id0)
Force the line widget to be aligned with one of the x-y-z axes. |
void |
setAlignToNone()
Enable/disable clamping of the point end points to the bounding box of the data. |
void |
setAlignToXAxis()
Force the line widget to be aligned with one of the x-y-z axes. |
void |
setAlignToYAxis()
Force the line widget to be aligned with one of the x-y-z axes. |
void |
setAlignToZAxis()
Force the line widget to be aligned with one of the x-y-z axes. |
void |
setClampToBounds(int id0)
Enable/disable clamping of the point end points to the bounding box of the data. |
void |
setEnabled(int id0)
Methods that satisfy the superclass' API. |
void |
setPoint1(double[] id0)
Set/Get the position of first end point. |
void |
setPoint1(double id0,
double id1,
double id2)
Set/Get the position of first end point. |
void |
setPoint2(double[] id0)
Set position of other end point. |
void |
setPoint2(double id0,
double id1,
double id2)
Set position of other end point. |
void |
setResolution(int id0)
Set/Get the resolution (number of subdivisions) of the line. |
protected void |
VTKCastInit()
|
void |
VTKInit()
|
Methods inherited from class vtk.vtk3DWidget |
getHandleSize, getHandleSizeMaxValue, getHandleSizeMinValue, getInput, getPlaceFactor, getPlaceFactorMaxValue, getPlaceFactorMinValue, getProp3D, getThis3DWidget, setHandleSize, setInput, setPlaceFactor, setProp3D |
Methods inherited from class vtk.vtkObject |
AddObserver, breakOnError, debugOff, debugOn, getDebug, getGlobalWarningDisplay, getMTime, getThisObject, globalWarningDisplayOff, globalWarningDisplayOn, hasObserver, hasObserver, invokeEvent, invokeEvent, modified, Print, PrintRevisions, register, removeObserver, removeObservers, removeObservers, setDebug, setGlobalWarningDisplay, unRegister |
Methods inherited from class vtk.vtkObjectBase |
addPropertyChangeListener, finalize, getReferenceCount, getThisObjectBase, isTypeOf, removePropertyChangeListener, setReferenceCount, VTKDelete |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.beans.PropertyChangeSupport changes
Constructor Detail |
public vtkLineWidget()
protected vtkLineWidget(int dmy)
Method Detail |
public vtkLineWidget getThisLineWidget()
public java.lang.String getClassName()
vtkObjectBase
getClassName
in class vtk3DWidget
public int isA(java.lang.String id0)
vtkObjectBase
isA
in class vtk3DWidget
public void setEnabled(int id0)
setEnabled
in class vtkInteractorObserver
public void placeWidget(double[] id0)
placeWidget
in class vtk3DWidget
public void placeWidget()
placeWidget
in class vtk3DWidget
public void placeWidget(double id0, double id1, double id2, double id3, double id4, double id5)
placeWidget
in class vtk3DWidget
public void setResolution(int id0)
public int getResolution()
public void setPoint1(double id0, double id1, double id2)
public void setPoint1(double[] id0)
public double[] getPoint1()
public void getPoint1(double[] id0)
public void setPoint2(double id0, double id1, double id2)
public void setPoint2(double[] id0)
public double[] getPoint2()
public void getPoint2(double[] id0)
public void setAlign(int id0)
public int getAlignMinValue()
public int getAlignMaxValue()
public int getAlign()
public void setAlignToXAxis()
public void setAlignToYAxis()
public void setAlignToZAxis()
public void setAlignToNone()
public void setClampToBounds(int id0)
public int getClampToBounds()
public void clampToBoundsOn()
public void clampToBoundsOff()
public void getPolyData(vtkPolyData id0)
public vtkProperty getHandleProperty()
public vtkProperty getSelectedHandleProperty()
public vtkProperty getLineProperty()
public vtkProperty getSelectedLineProperty()
public void VTKInit()
VTKInit
in class vtkObject
protected void VTKCastInit()
VTKCastInit
in class vtk3DWidget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |