FreeMat: vtkDistanceRepresentation

FreeMat

- Main Page
- Related Pages

vtkDistanceRepresentation

Section: Visualization Toolkit Widget Classes

# Usage

The vtkDistanceRepresentation is a superclass for various types of representations for the vtkDistanceWidget. Logically subclasses consist of an axis and two handles for placing/manipulating the end points.

To create an instance of class vtkDistanceRepresentation, simply invoke its constructor as follows

      obj = vtkDistanceRepresentation

# Methods

The class vtkDistanceRepresentation has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkDistanceRepresentation class.

- `string = obj.GetClassName ()` - Standard VTK methods.
- `int = obj.IsA (string name)` - Standard VTK methods.
- `vtkDistanceRepresentation = obj.NewInstance ()` - Standard VTK methods.
- `vtkDistanceRepresentation = obj.SafeDownCast (vtkObject o)` - Standard VTK methods.
- `double = obj.GetDistance ()` - This representation and all subclasses must keep a distance consistent with the state of the widget.
- `obj.GetPoint1WorldPosition (double pos[3])` - Methods to Set/Get the coordinates of the two points defining this representation. Note that methods are available for both display and world coordinates.
- `obj.GetPoint2WorldPosition (double pos[3])` - Methods to Set/Get the coordinates of the two points defining this representation. Note that methods are available for both display and world coordinates.
- `double = obj.GetPoint1WorldPosition ()` - Methods to Set/Get the coordinates of the two points defining this representation. Note that methods are available for both display and world coordinates.
- `double = obj.GetPoint2WorldPosition ()` - Methods to Set/Get the coordinates of the two points defining this representation. Note that methods are available for both display and world coordinates.
- `obj.SetPoint1DisplayPosition (double pos[3])` - Methods to Set/Get the coordinates of the two points defining this representation. Note that methods are available for both display and world coordinates.
- `obj.SetPoint2DisplayPosition (double pos[3])` - Methods to Set/Get the coordinates of the two points defining this representation. Note that methods are available for both display and world coordinates.
- `obj.GetPoint1DisplayPosition (double pos[3])` - Methods to Set/Get the coordinates of the two points defining this representation. Note that methods are available for both display and world coordinates.
- `obj.GetPoint2DisplayPosition (double pos[3])` - Methods to Set/Get the coordinates of the two points defining this representation. Note that methods are available for both display and world coordinates.
- `obj.SetPoint1WorldPosition (double pos[3])` - Methods to Set/Get the coordinates of the two points defining this representation. Note that methods are available for both display and world coordinates.
- `obj.SetPoint2WorldPosition (double pos[3])` - Methods to Set/Get the coordinates of the two points defining this representation. Note that methods are available for both display and world coordinates.
- `obj.SetHandleRepresentation (vtkHandleRepresentation handle)` - This method is used to specify the type of handle representation to use for the two internal vtkHandleWidgets within vtkDistanceWidget. To use this method, create a dummy vtkHandleWidget (or subclass), and then invoke this method with this dummy. Then the vtkDistanceRepresentation uses this dummy to clone two vtkHandleWidgets of the same type. Make sure you set the handle representation before the widget is enabled. (The method InstantiateHandleRepresentation() is invoked by the vtkDistance widget.)
- `obj.InstantiateHandleRepresentation ()` - This method is used to specify the type of handle representation to use for the two internal vtkHandleWidgets within vtkDistanceWidget. To use this method, create a dummy vtkHandleWidget (or subclass), and then invoke this method with this dummy. Then the vtkDistanceRepresentation uses this dummy to clone two vtkHandleWidgets of the same type. Make sure you set the handle representation before the widget is enabled. (The method InstantiateHandleRepresentation() is invoked by the vtkDistance widget.)
- `vtkHandleRepresentation = obj.GetPoint1Representation ()` - Set/Get the two handle representations used for the vtkDistanceWidget. (Note: properties can be set by grabbing these representations and setting the properties appropriately.)
- `vtkHandleRepresentation = obj.GetPoint2Representation ()` - Set/Get the two handle representations used for the vtkDistanceWidget. (Note: properties can be set by grabbing these representations and setting the properties appropriately.)
- `obj.SetTolerance (int )` - The tolerance representing the distance to the widget (in pixels) in which the cursor is considered near enough to the end points of the widget to be active.
- `int = obj.GetToleranceMinValue ()` - The tolerance representing the distance to the widget (in pixels) in which the cursor is considered near enough to the end points of the widget to be active.
- `int = obj.GetToleranceMaxValue ()` - The tolerance representing the distance to the widget (in pixels) in which the cursor is considered near enough to the end points of the widget to be active.
- `int = obj.GetTolerance ()` - The tolerance representing the distance to the widget (in pixels) in which the cursor is considered near enough to the end points of the widget to be active.
- `obj.SetLabelFormat (string )` - Specify the format to use for labelling the distance. Note that an empty string results in no label, or a format string without a "%" character will not print the distance value.
- `string = obj.GetLabelFormat ()` - Specify the format to use for labelling the distance. Note that an empty string results in no label, or a format string without a "%" character will not print the distance value.
- `obj.BuildRepresentation ()` - These are methods that satisfy vtkWidgetRepresentation's API.
- `int = obj.ComputeInteractionState (int X, int Y, int modify)` - These are methods that satisfy vtkWidgetRepresentation's API.
- `obj.StartWidgetInteraction (double e[2])` - These are methods that satisfy vtkWidgetRepresentation's API.
- `obj.WidgetInteraction (double e[2])` - These are methods that satisfy vtkWidgetRepresentation's API.