37#ifndef vtkSphereRepresentation_h 
   38#define vtkSphereRepresentation_h 
   40#include "vtkInteractionWidgetsModule.h"  
   44VTK_ABI_NAMESPACE_BEGIN
 
   63#define VTK_SPHERE_OFF 0 
   64#define VTK_SPHERE_WIREFRAME 1 
   65#define VTK_SPHERE_SURFACE 2 
   99  vtkGetMacro(Representation, 
int);
 
  132  void GetCenter(
double xyz[3]) { this->SphereSource->GetCenter(xyz); }
 
  139  double GetRadius() { 
return this->SphereSource->GetRadius(); }
 
  165    this->SetHandlePosition(p);
 
  167  vtkGetVector3Macro(HandlePosition, 
double);
 
  183    this->SetHandleDirection(d);
 
  185  vtkGetVector3Macro(HandleDirection, 
double);
 
  216  vtkSetMacro(CenterCursor, 
bool);
 
  217  vtkGetMacro(CenterCursor, 
bool);
 
  218  vtkBooleanMacro(CenterCursor, 
bool);
 
  304  virtual void PlaceWidget(
double center[3], 
double handlePosition[3]);
 
  333  vtkGetMacro(TranslationAxis, 
int);
 
  334  vtkSetClampMacro(TranslationAxis, 
int, -1, 2);
 
  359  double LastEventPosition[3];
 
  375  double LastPickPosition[3];
 
  379  void Scale(
const double* p1, 
const double* p2, 
int X, 
int Y);
 
  401  double HandleDirection[3];
 
  402  double HandlePosition[3];
 
a actor that draws 2D data
 
represents an object (geometry & properties) in a rendered scene
 
ray-cast cell picker for all kinds of Prop3Ds
 
generate a 3D cursor representation
 
dynamic, self-adjusting array of double
 
a simple class to control print indentation
 
create a line defined by two end points
 
represent and manipulate 4x4 transformation matrices
 
represent and manipulate 3D points
 
Superclass for algorithms that produce only polydata as output.
 
map vtkPolyData to graphics primitives
 
concrete dataset represents vertices, lines, polygons, and triangle strips
 
represent surface properties of a geometric object
 
a class defining the representation for the vtkSphereWidget2
 
void SetHandleDirection(double dx, double dy, double dz)
Set/Get the direction vector of the handle relative to the center of the sphere.
 
void SetPhiResolution(int r)
Set/Get the resolution of the sphere in the phi direction.
 
void SetRepresentationToWireframe()
Set the representation (i.e., appearance) of the sphere.
 
vtkProperty * SphereProperty
 
vtkProperty * RadialLineProperty
 
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
 
void GetPolyData(vtkPolyData *pd)
Grab the polydata (including points) that defines the sphere.
 
vtkSphereSource * SphereSource
 
vtkPolyDataMapper * HandleMapper
 
void SetXTranslationAxisOn()
Toggles constraint translation axis on/off.
 
void CreateDefaultProperties()
 
vtkActor * RadialLineActor
 
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and to print out the contents of the class.
 
void SetForegroundColor(double, double, double)
Set the interaction color of sphere and handle.
 
vtkPolyDataMapper * CenterMapper
 
void SetHandleDirection(double dir[3])
Set/Get the direction vector of the handle relative to the center of the sphere.
 
bool IsTranslationConstrained()
Returns true if ConstrainedAxis.
 
void SetZTranslationAxisOn()
Toggles constraint translation axis on/off.
 
void SetCenter(double x, double y, double z)
 
void HighlightHandle(int)
 
int ComputeInteractionState(int X, int Y, int modify=0) override
These are methods that satisfy vtkWidgetRepresentation's API.
 
static vtkSphereRepresentation * New()
Instantiate the class.
 
double * GetBounds() override
These are methods that satisfy vtkWidgetRepresentation's API.
 
void SetTranslationAxisOff()
Toggles constraint translation axis on/off.
 
void SetForegroundColor(double c[3])
Set the interaction color of sphere and handle.
 
vtkLineSource * RadialLineSource
 
void SetHandleColor(double, double, double)
Set the interaction color of sphere and handle.
 
void SetInteractionColor(double c[3])
Set the interaction color of sphere and handle.
 
void SetRepresentationToOff()
Set the representation (i.e., appearance) of the sphere.
 
virtual void PlaceWidget(double center[3], double handlePosition[3])
These are methods that satisfy vtkWidgetRepresentation's API.
 
void SetCenter(double c[3])
Set/Get the center position of the sphere.
 
void PlaceHandle(const double *center, double radius)
 
vtkPolyDataMapper * RadialLineMapper
 
int RenderOpaqueGeometry(vtkViewport *) override
Methods supporting, and required by, the rendering process.
 
void SetThetaResolution(int r)
Set/Get the resolution of the sphere in the theta direction.
 
void SetHandleColor(double c[3])
Set the interaction color of sphere and handle.
 
void SetInteractionState(int state)
The interaction state may be set from a widget (e.g., vtkSphereWidget2) or other object.
 
vtkSphereSource * HandleSource
 
void SetInteractionColor(double, double, double)
Set the interaction color of sphere and handle.
 
void GetSphere(vtkSphere *sphere)
Get the spherical implicit function defined by this widget.
 
vtkTextProperty * HandleTextProperty
 
vtkTextMapper * HandleTextMapper
 
void GetCenter(double xyz[3])
 
vtkCursor3D * CenterCursorSource
 
vtkTypeBool HandleVisibility
 
vtkSphereRepresentation()
 
vtkProperty * HandleProperty
 
void HighlightSphere(int highlight)
 
vtkProperty * SelectedSphereProperty
 
void SetRadius(double r)
Set/Get the radius of sphere.
 
void PlaceWidget(double bounds[6]) override
These are methods that satisfy vtkWidgetRepresentation's API.
 
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Methods supporting, and required by, the rendering process.
 
void SetYTranslationAxisOn()
Toggles constraint translation axis on/off.
 
void WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
 
~vtkSphereRepresentation() override
 
void SetHandlePosition(double x, double y, double z)
Set/Get the position of the handle.
 
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
 
vtkPolyDataMapper * SphereMapper
 
int RenderOverlay(vtkViewport *) override
Methods supporting, and required by, the rendering process.
 
void SetRepresentationToSurface()
Set the representation (i.e., appearance) of the sphere.
 
void SetHandlePosition(double handle[3])
Set/Get the position of the handle.
 
virtual void SizeHandles()
 
vtkCellPicker * SpherePicker
 
vtkProperty * SelectedHandleProperty
 
vtkActor2D * HandleTextActor
 
void ReleaseGraphicsResources(vtkWindow *) override
Methods supporting, and required by, the rendering process.
 
void Scale(const double *p1, const double *p2, int X, int Y)
 
vtkCellPicker * HandlePicker
 
void StartWidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
 
virtual void AdaptCenterCursorBounds()
 
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods supporting, and required by, the rendering process.
 
void Translate(const double *p1, const double *p2)
 
create a polygonal sphere centered at the origin
 
implicit function for a sphere
 
represent text properties.
 
abstract specification for Viewports
 
window superclass for vtkRenderWindow
 
#define VTK_SPHERE_SURFACE
 
#define VTK_SPHERE_WIREFRAME
 
#define VTK_SIZEHINT(...)