Section: Visualization Toolkit Widget Classes
To use this representation, you normally use the PlaceWidget() method to position the widget at a specified region in space. It is also possible to set the center of the sphere, a radius, and/or a handle position.
To create an instance of class vtkSphereRepresentation, simply invoke its constructor as follows
obj = vtkSphereRepresentation
obj
is an instance of the vtkSphereRepresentation class.
string = obj.GetClassName ()
- Standard methods for type information and to print out the contents of the class.
int = obj.IsA (string name)
- Standard methods for type information and to print out the contents of the class.
vtkSphereRepresentation = obj.NewInstance ()
- Standard methods for type information and to print out the contents of the class.
vtkSphereRepresentation = obj.SafeDownCast (vtkObject o)
- Standard methods for type information and to print out the contents of the class.
obj.SetRepresentation (int )
- Set the representation (i.e., appearance) of the sphere. Different
representations are useful depending on the application.
int = obj.GetRepresentationMinValue ()
- Set the representation (i.e., appearance) of the sphere. Different
representations are useful depending on the application.
int = obj.GetRepresentationMaxValue ()
- Set the representation (i.e., appearance) of the sphere. Different
representations are useful depending on the application.
int = obj.GetRepresentation ()
- Set the representation (i.e., appearance) of the sphere. Different
representations are useful depending on the application.
obj.SetRepresentationToOff ()
- Set the representation (i.e., appearance) of the sphere. Different
representations are useful depending on the application.
obj.SetRepresentationToWireframe ()
- Set the representation (i.e., appearance) of the sphere. Different
representations are useful depending on the application.
obj.SetRepresentationToSurface ()
- Set/Get the resolution of the sphere in the theta direction.
obj.SetThetaResolution (int r)
- Set/Get the resolution of the sphere in the theta direction.
int = obj.GetThetaResolution ()
- Set/Get the resolution of the sphere in the phi direction.
obj.SetPhiResolution (int r)
- Set/Get the resolution of the sphere in the phi direction.
int = obj.GetPhiResolution ()
- Set/Get the center position of the sphere. Note that this may
adjust the direction from the handle to the center, as well as
the radius of the sphere.
obj.SetCenter (double c[3])
- Set/Get the center position of the sphere. Note that this may
adjust the direction from the handle to the center, as well as
the radius of the sphere.
obj.SetCenter (double x, double y, double z)
- Set/Get the center position of the sphere. Note that this may
adjust the direction from the handle to the center, as well as
the radius of the sphere.
double = obj.GetCenter ()
- Set/Get the center position of the sphere. Note that this may
adjust the direction from the handle to the center, as well as
the radius of the sphere.
obj.GetCenter (double xyz[3])
- Set/Get the radius of sphere. Default is 0.5. Note that this may
modify the position of the handle based on the handle direction.
obj.SetRadius (double r)
- Set/Get the radius of sphere. Default is 0.5. Note that this may
modify the position of the handle based on the handle direction.
double = obj.GetRadius ()
- The handle sits on the surface of the sphere and may be moved around
the surface by picking (left mouse) and then moving. The position
of the handle can be retrieved, this is useful for positioning cameras
and lights. By default, the handle is turned off.
obj.SetHandleVisibility (int )
- The handle sits on the surface of the sphere and may be moved around
the surface by picking (left mouse) and then moving. The position
of the handle can be retrieved, this is useful for positioning cameras
and lights. By default, the handle is turned off.
int = obj.GetHandleVisibility ()
- The handle sits on the surface of the sphere and may be moved around
the surface by picking (left mouse) and then moving. The position
of the handle can be retrieved, this is useful for positioning cameras
and lights. By default, the handle is turned off.
obj.HandleVisibilityOn ()
- The handle sits on the surface of the sphere and may be moved around
the surface by picking (left mouse) and then moving. The position
of the handle can be retrieved, this is useful for positioning cameras
and lights. By default, the handle is turned off.
obj.HandleVisibilityOff ()
- The handle sits on the surface of the sphere and may be moved around
the surface by picking (left mouse) and then moving. The position
of the handle can be retrieved, this is useful for positioning cameras
and lights. By default, the handle is turned off.
obj.SetHandlePosition (double handle[3])
- Set/Get the position of the handle. Note that this may adjust the radius
of the sphere and the handle direction.
obj.SetHandlePosition (double x, double y, double z)
- Set/Get the position of the handle. Note that this may adjust the radius
of the sphere and the handle direction.
double = obj. GetHandlePosition ()
- Set/Get the position of the handle. Note that this may adjust the radius
of the sphere and the handle direction.
obj.SetHandleDirection (double dir[3])
- Set/Get the direction vector of the handle relative to the center of
the sphere. This may affect the position of the handle and the radius
of the sphere.
obj.SetHandleDirection (double dx, double dy, double dz)
- Set/Get the direction vector of the handle relative to the center of
the sphere. This may affect the position of the handle and the radius
of the sphere.
double = obj. GetHandleDirection ()
- Set/Get the direction vector of the handle relative to the center of
the sphere. This may affect the position of the handle and the radius
of the sphere.
obj.SetHandleText (int )
- Enable/disable a label that displays the location of the handle in
spherical coordinates (radius,theta,phi). The two angles, theta and
phi, are displayed in degrees. Note that phi is measured from the
north pole down towards the equator; and theta is the angle around
the north/south axis.
int = obj.GetHandleText ()
- Enable/disable a label that displays the location of the handle in
spherical coordinates (radius,theta,phi). The two angles, theta and
phi, are displayed in degrees. Note that phi is measured from the
north pole down towards the equator; and theta is the angle around
the north/south axis.
obj.HandleTextOn ()
- Enable/disable a label that displays the location of the handle in
spherical coordinates (radius,theta,phi). The two angles, theta and
phi, are displayed in degrees. Note that phi is measured from the
north pole down towards the equator; and theta is the angle around
the north/south axis.
obj.HandleTextOff ()
- Enable/disable a label that displays the location of the handle in
spherical coordinates (radius,theta,phi). The two angles, theta and
phi, are displayed in degrees. Note that phi is measured from the
north pole down towards the equator; and theta is the angle around
the north/south axis.
obj.SetRadialLine (int )
- Enable/disable a radial line segment that joins the center of the
outer sphere and the handle.
int = obj.GetRadialLine ()
- Enable/disable a radial line segment that joins the center of the
outer sphere and the handle.
obj.RadialLineOn ()
- Enable/disable a radial line segment that joins the center of the
outer sphere and the handle.
obj.RadialLineOff ()
- Enable/disable a radial line segment that joins the center of the
outer sphere and the handle.
obj.GetPolyData (vtkPolyData pd)
- Grab the polydata (including points) that defines the sphere. The
polydata consists of n+1 points, where n is the resolution of the
sphere. These point values are guaranteed to be up-to-date when either the
InteractionEvent or EndInteraction events are invoked. The user provides
the vtkPolyData and the points and polysphere are added to it.
obj.GetSphere (vtkSphere sphere)
- Get the spherical implicit function defined by this widget. Note that
vtkSphere is a subclass of vtkImplicitFunction, meaning that it can be
used by a variety of filters to perform clipping, cutting, and selection
of data.
vtkProperty = obj.GetSphereProperty ()
- Get the sphere properties. The properties of the sphere when selected
and unselected can be manipulated.
vtkProperty = obj.GetSelectedSphereProperty ()
- Get the sphere properties. The properties of the sphere when selected
and unselected can be manipulated.
vtkProperty = obj.GetHandleProperty ()
- Get the handle properties (the little ball on the sphere is the
handle). The properties of the handle when selected and unselected
can be manipulated.
vtkProperty = obj.GetSelectedHandleProperty ()
- Get the handle properties (the little ball on the sphere is the
handle). The properties of the handle when selected and unselected
can be manipulated.
vtkTextProperty = obj.GetHandleTextProperty ()
- Get the handle text property. This can be used to control the appearance
of the handle text.
vtkProperty = obj.GetRadialLineProperty ()
- Get the property of the radial line. This can be used to control the
appearance of the optional line connecting the center to the handle.
obj.SetInteractionState (int state)
- The interaction state may be set from a widget (e.g., vtkSphereWidget2) 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.PlaceWidget (double bounds[6])
- These are methods that satisfy vtkWidgetRepresentation's API. Note that a
version of place widget is available where the center and handle position
are specified.
obj.PlaceWidget (double center[3], double handlePosition[3])
- These are methods that satisfy vtkWidgetRepresentation's API. Note that a
version of place widget is available where the center and handle position
are specified.
obj.BuildRepresentation ()
- These are methods that satisfy vtkWidgetRepresentation's API. Note that a
version of place widget is available where the center and handle position
are specified.
int = obj.ComputeInteractionState (int X, int Y, int modify)
- These are methods that satisfy vtkWidgetRepresentation's API. Note that a
version of place widget is available where the center and handle position
are specified.
obj.StartWidgetInteraction (double e[2])
- These are methods that satisfy vtkWidgetRepresentation's API. Note that a
version of place widget is available where the center and handle position
are specified.
obj.WidgetInteraction (double e[2])
- These are methods that satisfy vtkWidgetRepresentation's API. Note that a
version of place widget is available where the center and handle position
are specified.
obj.ReleaseGraphicsResources (vtkWindow )
- Methods supporting, and required by, the rendering process.
int = obj.RenderOpaqueGeometry (vtkViewport )
- Methods supporting, and required by, the rendering process.
int = obj.RenderTranslucentPolygonalGeometry (vtkViewport )
- Methods supporting, and required by, the rendering process.
int = obj.RenderOverlay (vtkViewport )
- Methods supporting, and required by, the rendering process.
int = obj.HasTranslucentPolygonalGeometry ()
- Methods supporting, and required by, the rendering process.