Section: Visualization Toolkit Widget Classes
To create this widget, you click to place the first two points. The third point is mirrored with the fourth point; when you place the third point (which is orthogonal to the lined defined by the first two points), the fourth point is dropped as well. After definition, the four points can be moved (in constrained fashion, preserving orthogonality). Further, the entire widget can be translated by grabbing the center point of the widget; each line can be moved along the other line; and the entire widget can be rotated around its center point.
To create an instance of class vtkBiDimensionalRepresentation2D, simply invoke its constructor as follows
obj = vtkBiDimensionalRepresentation2D
obj
is an instance of the vtkBiDimensionalRepresentation2D class.
string = obj.GetClassName ()
- Standard VTK methods.
int = obj.IsA (string name)
- Standard VTK methods.
vtkBiDimensionalRepresentation2D = obj.NewInstance ()
- Standard VTK methods.
vtkBiDimensionalRepresentation2D = obj.SafeDownCast (vtkObject o)
- Standard VTK methods.
obj.SetPoint1WorldPosition (double pos[3])
- Methods to Set/Get the coordinates of the four 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 four points defining
this representation. Note that methods are available for both
display and world coordinates.
obj.SetPoint3WorldPosition (double pos[3])
- Methods to Set/Get the coordinates of the four points defining
this representation. Note that methods are available for both
display and world coordinates.
obj.SetPoint4WorldPosition (double pos[3])
- Methods to Set/Get the coordinates of the four points defining
this representation. Note that methods are available for both
display and world coordinates.
obj.GetPoint1WorldPosition (double pos[3])
- Methods to Set/Get the coordinates of the four 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 four points defining
this representation. Note that methods are available for both
display and world coordinates.
obj.GetPoint3WorldPosition (double pos[3])
- Methods to Set/Get the coordinates of the four points defining
this representation. Note that methods are available for both
display and world coordinates.
obj.GetPoint4WorldPosition (double pos[3])
- Methods to Set/Get the coordinates of the four 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 four 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 four points defining
this representation. Note that methods are available for both
display and world coordinates.
obj.SetPoint3DisplayPosition (double pos[3])
- Methods to Set/Get the coordinates of the four points defining
this representation. Note that methods are available for both
display and world coordinates.
obj.SetPoint4DisplayPosition (double pos[3])
- Methods to Set/Get the coordinates of the four 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 four 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 four points defining
this representation. Note that methods are available for both
display and world coordinates.
obj.GetPoint3DisplayPosition (double pos[3])
- Methods to Set/Get the coordinates of the four points defining
this representation. Note that methods are available for both
display and world coordinates.
obj.GetPoint4DisplayPosition (double pos[3])
- Methods to Set/Get the coordinates of the four points defining
this representation. Note that methods are available for both
display and world coordinates.
obj.SetLine1Visibility (int )
- Special methods for turning off the lines that define the bi-dimensional
measure. Generally these methods are used by the vtkBiDimensionalWidget to
control the appearance of the widget. Note: turning off Line1 actually turns
off Line1 and Line2.
int = obj.GetLine1Visibility ()
- Special methods for turning off the lines that define the bi-dimensional
measure. Generally these methods are used by the vtkBiDimensionalWidget to
control the appearance of the widget. Note: turning off Line1 actually turns
off Line1 and Line2.
obj.Line1VisibilityOn ()
- Special methods for turning off the lines that define the bi-dimensional
measure. Generally these methods are used by the vtkBiDimensionalWidget to
control the appearance of the widget. Note: turning off Line1 actually turns
off Line1 and Line2.
obj.Line1VisibilityOff ()
- Special methods for turning off the lines that define the bi-dimensional
measure. Generally these methods are used by the vtkBiDimensionalWidget to
control the appearance of the widget. Note: turning off Line1 actually turns
off Line1 and Line2.
obj.SetLine2Visibility (int )
- Special methods for turning off the lines that define the bi-dimensional
measure. Generally these methods are used by the vtkBiDimensionalWidget to
control the appearance of the widget. Note: turning off Line1 actually turns
off Line1 and Line2.
int = obj.GetLine2Visibility ()
- Special methods for turning off the lines that define the bi-dimensional
measure. Generally these methods are used by the vtkBiDimensionalWidget to
control the appearance of the widget. Note: turning off Line1 actually turns
off Line1 and Line2.
obj.Line2VisibilityOn ()
- Special methods for turning off the lines that define the bi-dimensional
measure. Generally these methods are used by the vtkBiDimensionalWidget to
control the appearance of the widget. Note: turning off Line1 actually turns
off Line1 and Line2.
obj.Line2VisibilityOff ()
- Special methods for turning off the lines that define the bi-dimensional
measure. Generally these methods are used by the vtkBiDimensionalWidget to
control the appearance of the widget. Note: turning off Line1 actually turns
off Line1 and Line2.
obj.SetHandleRepresentation (vtkHandleRepresentation handle)
- This method is used to specify the type of handle representation to use
for the four internal vtkHandleRepresentations within
vtkBiDimensionalRepresentation2D. To use this method, create a dummy
vtkHandleRepresentation (or subclass), and then invoke this method with
this dummy. Then the vtkBiDimensionalRepresentation2D uses this dummy to
clone four vtkHandleRepresentations of the same type. Make sure you set the
handle representation before the widget is enabled. (The method
InstantiateHandleRepresentation() is invoked by the vtkBiDimensionalWidget
for the purposes of cloning.)
obj.InstantiateHandleRepresentation ()
- This method is used to specify the type of handle representation to use
for the four internal vtkHandleRepresentations within
vtkBiDimensionalRepresentation2D. To use this method, create a dummy
vtkHandleRepresentation (or subclass), and then invoke this method with
this dummy. Then the vtkBiDimensionalRepresentation2D uses this dummy to
clone four vtkHandleRepresentations of the same type. Make sure you set the
handle representation before the widget is enabled. (The method
InstantiateHandleRepresentation() is invoked by the vtkBiDimensionalWidget
for the purposes of cloning.)
vtkHandleRepresentation = obj.GetPoint1Representation ()
- Set/Get the handle representations used within the
vtkBiDimensionalRepresentation2D. (Note: properties can be set by
grabbing these representations and setting the properties
appropriately.)
vtkHandleRepresentation = obj.GetPoint2Representation ()
- Set/Get the handle representations used within the
vtkBiDimensionalRepresentation2D. (Note: properties can be set by
grabbing these representations and setting the properties
appropriately.)
vtkHandleRepresentation = obj.GetPoint3Representation ()
- Set/Get the handle representations used within the
vtkBiDimensionalRepresentation2D. (Note: properties can be set by
grabbing these representations and setting the properties
appropriately.)
vtkHandleRepresentation = obj.GetPoint4Representation ()
- Set/Get the handle representations used within the
vtkBiDimensionalRepresentation2D. (Note: properties can be set by
grabbing these representations and setting the properties
appropriately.)
vtkProperty2D = obj.GetLineProperty ()
- Retrieve the property used to control the appearance of the two
orthogonal lines.
vtkProperty2D = obj.GetSelectedLineProperty ()
- Retrieve the property used to control the appearance of the two
orthogonal lines.
vtkTextProperty = obj.GetTextProperty ()
- Retrieve the property used to control the appearance of the text
labels.
obj.SetTolerance (int )
- The tolerance representing the distance to the representation (in
pixels) in which the cursor is considered near enough to the
representation to be active.
int = obj.GetToleranceMinValue ()
- The tolerance representing the distance to the representation (in
pixels) in which the cursor is considered near enough to the
representation to be active.
int = obj.GetToleranceMaxValue ()
- The tolerance representing the distance to the representation (in
pixels) in which the cursor is considered near enough to the
representation to be active.
int = obj.GetTolerance ()
- The tolerance representing the distance to the representation (in
pixels) in which the cursor is considered near enough to the
representation to be active.
double = obj.GetLength1 ()
- Return the length of the line defined by (Point1,Point2). This is the
distance in the world coordinate system.
double = obj.GetLength2 ()
- Return the length of the line defined by (Point3,Point4). This is the
distance in the world coordinate system.
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.StartWidgetDefinition (double e[2])
- These are methods that satisfy vtkWidgetRepresentation's API.
obj.Point2WidgetInteraction (double e[2])
- These are methods that satisfy vtkWidgetRepresentation's API.
obj.Point3WidgetInteraction (double e[2])
- These are methods that satisfy vtkWidgetRepresentation's API.
obj.StartWidgetManipulation (double e[2])
- These are methods that satisfy vtkWidgetRepresentation's API.
obj.WidgetInteraction (double e[2])
- These are methods that satisfy vtkWidgetRepresentation's API.
obj.Highlight (int highlightOn)
- These are methods that satisfy vtkWidgetRepresentation's API.
obj.ReleaseGraphicsResources (vtkWindow w)
- Methods required by vtkProp superclass.
int = obj.RenderOverlay (vtkViewport viewport)
- Methods required by vtkProp superclass.
obj.SetShowLabelAboveWidget (int )
- Toggle whether to display the label above or below the widget.
Defaults to 1.
int = obj.GetShowLabelAboveWidget ()
- Toggle whether to display the label above or below the widget.
Defaults to 1.
obj.ShowLabelAboveWidgetOn ()
- Toggle whether to display the label above or below the widget.
Defaults to 1.
obj.ShowLabelAboveWidgetOff ()
- Toggle whether to display the label above or below the widget.
Defaults to 1.
obj.SetID (long id)
- Set/get the id to display in the label.
long = obj.GetID ()
- Set/get the id to display in the label.
string = obj.GetLabelText ()
- Get the text shown in the widget's label.
obj.GetLabelPosition (double pos[3])
- Get the position of the widget's label in display coordinates.
obj.GetWorldLabelPosition (double pos[3])
- Get the position of the widget's label in display coordinates.