FreeMat
vtkLineRepresentation

Section: Visualization Toolkit Widget Classes

Usage

This class is a concrete representation for the vtkLineWidget2. It represents a straight line with three handles: one at the beginning and ending of the line, and one used to translate the line. Through interaction with the widget, the line representation can be arbitrarily placed in the 3D space.

To use this representation, you normally specify the position of the two end points (either in world or display coordinates). The PlaceWidget() method is also used to intially position the representation.

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

  obj = vtkLineRepresentation

Methods

The class vtkLineRepresentation 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 vtkLineRepresentation class.

  • string = obj.GetClassName () - Standard methods for the class.
  • int = obj.IsA (string name) - Standard methods for the class.
  • vtkLineRepresentation = obj.NewInstance () - Standard methods for the class.
  • vtkLineRepresentation = obj.SafeDownCast (vtkObject o) - Standard methods for the class.
  • 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.
  • 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.
  • 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.
  • double = obj.GetPoint1DisplayPosition () - 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.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.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.
  • double = obj.GetPoint2DisplayPosition () - 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.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.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.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.SetHandleRepresentation (vtkPointHandleRepresentation3D handle) - This method is used to specify the type of handle representation to use for the three internal vtkHandleWidgets within vtkLineWidget2. To use this method, create a dummy vtkHandleWidget (or subclass), and then invoke this method with this dummy. Then the vtkLineRepresentation uses this dummy to clone three vtkHandleWidgets of the same type. Make sure you set the handle representation before the widget is enabled. (The method InstantiateHandleRepresentation() is invoked by the vtkLineWidget2.)
  • obj.InstantiateHandleRepresentation () - This method is used to specify the type of handle representation to use for the three internal vtkHandleWidgets within vtkLineWidget2. To use this method, create a dummy vtkHandleWidget (or subclass), and then invoke this method with this dummy. Then the vtkLineRepresentation uses this dummy to clone three vtkHandleWidgets of the same type. Make sure you set the handle representation before the widget is enabled. (The method InstantiateHandleRepresentation() is invoked by the vtkLineWidget2.)
  • vtkPointHandleRepresentation3D = obj.GetPoint1Representation () - Get the three handle representations used for the vtkLineWidget2.
  • vtkPointHandleRepresentation3D = obj.GetPoint2Representation () - Get the three handle representations used for the vtkLineWidget2.
  • vtkPointHandleRepresentation3D = obj.GetLineHandleRepresentation () - Get the three handle representations used for the vtkLineWidget2.
  • vtkProperty = obj.GetEndPointProperty () - Get the end-point (sphere) properties. The properties of the end-points when selected and unselected can be manipulated.
  • vtkProperty = obj.GetSelectedEndPointProperty () - Get the end-point (sphere) properties. The properties of the end-points when selected and unselected can be manipulated.
  • vtkProperty = obj.GetEndPoint2Property () - Get the end-point (sphere) properties. The properties of the end-points when selected and unselected can be manipulated.
  • vtkProperty = obj.GetSelectedEndPoint2Property () - Get the end-point (sphere) properties. The properties of the end-points when selected and unselected can be manipulated.
  • vtkProperty = obj.GetLineProperty () - Get the line properties. The properties of the line when selected and unselected can be manipulated.
  • vtkProperty = obj.GetSelectedLineProperty () - Get the line properties. The properties of the line when selected and unselected can be manipulated.
  • obj.SetTolerance (int ) - The tolerance representing the distance to the widget (in pixels) in which the cursor is considered near enough to the line or end point 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 line or end point 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 line or end point 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 line or end point to be active.
  • obj.SetResolution (int res) - Set/Get the resolution (number of subdivisions) of the line. A line with resolution greater than one is useful when points along the line are desired; e.g., generating a rake of streamlines.
  • int = obj.GetResolution () - Set/Get the resolution (number of subdivisions) of the line. A line with resolution greater than one is useful when points along the line are desired; e.g., generating a rake of streamlines.
  • obj.GetPolyData (vtkPolyData pd) - Retrieve the polydata (including points) that defines the line. The polydata consists of n+1 points, where n is the resolution of the line. These point values are guaranteed to be up-to-date whenever any one of the three handles are moved. To use this method, the user provides the vtkPolyData as an input argument, and the points and polyline are copied into it.
  • obj.PlaceWidget (double bounds[6]) - These are methods that satisfy vtkWidgetRepresentation's API.
  • 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.
  • double = obj.GetBounds () - These are methods that satisfy vtkWidgetRepresentation's API.
  • obj.GetActors (vtkPropCollection pc) - Methods supporting the rendering process.
  • obj.ReleaseGraphicsResources (vtkWindow ) - Methods supporting the rendering process.
  • int = obj.RenderOpaqueGeometry (vtkViewport ) - Methods supporting the rendering process.
  • int = obj.RenderTranslucentPolygonalGeometry (vtkViewport ) - Methods supporting the rendering process.
  • int = obj.HasTranslucentPolygonalGeometry () - Methods supporting the rendering process.
  • obj.SetInteractionState (int ) - The interaction state may be set from a widget (e.g., vtkLineWidget2) or other object. This controls how the interaction with the widget proceeds. Normally this method is used as part of a handshaking process with the widget: First ComputeInteractionState() is invoked that returns a state based on geometric considerations (i.e., cursor near a widget feature), then based on events, the widget may modify this further.
  • int = obj.GetInteractionStateMinValue () - The interaction state may be set from a widget (e.g., vtkLineWidget2) or other object. This controls how the interaction with the widget proceeds. Normally this method is used as part of a handshaking process with the widget: First ComputeInteractionState() is invoked that returns a state based on geometric considerations (i.e., cursor near a widget feature), then based on events, the widget may modify this further.
  • int = obj.GetInteractionStateMaxValue () - The interaction state may be set from a widget (e.g., vtkLineWidget2) or other object. This controls how the interaction with the widget proceeds. Normally this method is used as part of a handshaking process with the widget: First ComputeInteractionState() is invoked that returns a state based on geometric considerations (i.e., cursor near a widget feature), then based on events, the widget may modify this further.
  • obj.SetRepresentationState (int ) - Sets the visual appearance of the representation based on the state it is in. This state is usually the same as InteractionState.
  • int = obj.GetRepresentationState () - Sets the visual appearance of the representation based on the state it is in. This state is usually the same as InteractionState.
  • long = obj.GetMTime () - Overload the superclasses' GetMTime() because internal classes are used to keep the state of the representation.
  • obj.SetRenderer (vtkRenderer ren) - Overridden to set the rendererer on the internal representations.
  • obj.SetDistanceAnnotationVisibility (int ) - Show the distance between the points
  • int = obj.GetDistanceAnnotationVisibility () - Show the distance between the points
  • obj.DistanceAnnotationVisibilityOn () - Show the distance between the points
  • obj.DistanceAnnotationVisibilityOff () - Show the distance between the points
  • obj.SetDistanceAnnotationFormat (string ) - Specify the format to use for labelling the angle. Note that an empty string results in no label, or a format string without a "%" character will not print the angle value.
  • string = obj.GetDistanceAnnotationFormat () - Specify the format to use for labelling the angle. Note that an empty string results in no label, or a format string without a "%" character will not print the angle value.
  • obj.SetDistanceAnnotationScale (double scale[3]) - Scale text (font size along each dimension).
  • double = obj.GetDistance () - Get the distance between the points.
  • obj.SetLineColor (double r, double g, double b) - Convenience method to set the line color. Ideally one should use GetLineProperty()->SetColor().
  • vtkProperty = obj.GetDistanceAnnotationProperty () - Get the distance annotation property
  • vtkFollower = obj.GetTextActor () - Get the text actor