49#ifndef vtkSphereRepresentation_h
50#define vtkSphereRepresentation_h
52#include "vtkInteractionWidgetsModule.h"
74#define VTK_SPHERE_OFF 0
75#define VTK_SPHERE_WIREFRAME 1
76#define VTK_SPHERE_SURFACE 2
103 vtkGetMacro(Representation,
int);
116 { this->SphereSource->SetThetaResolution(r); }
118 {
return this->SphereSource->GetThetaResolution(); }
124 { this->SphereSource->SetPhiResolution(r); }
126 {
return this->SphereSource->GetPhiResolution(); }
135 {
double c[3]; c[0]=x; c[1]=y; c[2]=z; this->SetCenter(c);}
137 {
return this->SphereSource->GetCenter();}
139 {this->SphereSource->GetCenter(xyz);}
147 {
return this->SphereSource->GetRadius(); }
157 vtkGetMacro(HandleVisibility,
int);
168 {
double p[3]; p[0]=x; p[1]=y; p[2]=z; this->SetHandlePosition(p);}
169 vtkGetVector3Macro(HandlePosition,
double);
180 {
double d[3]; d[0]=dx; d[1]=dy; d[2]=dz; this->SetHandleDirection(d);}
181 vtkGetVector3Macro(HandleDirection,
double);
193 vtkGetMacro(HandleText,
int);
203 vtkGetMacro(RadialLine,
int);
213 vtkGetMacro(CenterCursor,
bool);
311 double LastEventPosition[3];
325 double LastPickPosition[3];
332 void Scale(
double *p1,
double *p2,
int X,
int Y);
354 double HandleDirection[3];
355 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)
void SetPhiResolution(int r)
Set/Get the resolution of the sphere in the phi direction.
void SetRepresentationToWireframe()
vtkProperty * SphereProperty
vtkProperty * RadialLineProperty
void GetPolyData(vtkPolyData *pd)
Grab the polydata (including points) that defines the sphere.
vtkSphereSource * SphereSource
vtkPolyDataMapper * HandleMapper
void CreateDefaultProperties()
vtkActor * RadialLineActor
virtual double * GetBounds()
Methods to make this class behave as a vtkProp.
virtual void StartWidgetInteraction(double e[2])
vtkPolyDataMapper * CenterMapper
void SetHandleDirection(double dir[3])
Set/Get the direction vector of the handle relative to the center of the sphere.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
void SetCenter(double x, double y, double z)
void HighlightHandle(int)
static vtkSphereRepresentation * New()
Instantiate the class.
vtkLineSource * RadialLineSource
void SetRepresentationToOff()
virtual void PlaceWidget(double center[3], double handlePosition[3])
virtual void WidgetInteraction(double e[2])
void SetCenter(double c[3])
Set/Get the center position of the sphere.
vtkPolyDataMapper * RadialLineMapper
void SetThetaResolution(int r)
Set/Get the resolution of the sphere in the theta direction.
void SetInteractionState(int state)
The interaction state may be set from a widget (e.g., vtkSphereWidget2) or other object.
vtkSphereSource * HandleSource
virtual void ReleaseGraphicsResources(vtkWindow *)
Methods supporting, and required by, the rendering process.
void GetSphere(vtkSphere *sphere)
Get the spherical implicit function defined by this widget.
vtkTextProperty * HandleTextProperty
vtkTextMapper * HandleTextMapper
void GetCenter(double xyz[3])
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkCursor3D * CenterCursorSource
void PlaceHandle(double *center, double radius)
void Scale(double *p1, double *p2, int X, int Y)
vtkSphereRepresentation()
vtkProperty * HandleProperty
void HighlightSphere(int highlight)
vtkProperty * SelectedSphereProperty
void SetRadius(double r)
Set/Get the radius of sphere.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
~vtkSphereRepresentation()
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
void SetHandlePosition(double x, double y, double z)
virtual int ComputeInteractionState(int X, int Y, int modify=0)
vtkPolyDataMapper * SphereMapper
void SetRepresentationToSurface()
void SetHandlePosition(double handle[3])
Set/Get the position of the handle.
virtual void SizeHandles()
vtkCellPicker * SpherePicker
vtkProperty * SelectedHandleProperty
virtual int RenderOverlay(vtkViewport *)
vtkActor2D * HandleTextActor
virtual void PlaceWidget(double bounds[6])
These are methods that satisfy vtkWidgetRepresentation's API.
vtkCellPicker * HandlePicker
virtual void RegisterPickers()
Register internal Pickers in the Picking Manager.
virtual void BuildRepresentation()
virtual void AdaptCenterCursorBounds()
void Translate(double *p1, 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
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_SPHERE_SURFACE
#define VTK_SPHERE_WIREFRAME