Go to the documentation of this file.
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(); }
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);
212 vtkSetMacro(CenterCursor,
bool);
213 vtkGetMacro(CenterCursor,
bool);
214 vtkBooleanMacro(CenterCursor,
bool);
316 double LastEventPosition[3];
330 double LastPickPosition[3];
334 void Scale(
double *p1,
double *p2,
int X,
int Y);
356 double HandleDirection[3];
357 double HandlePosition[3];
map vtkPolyData to graphics primitives
represent and manipulate 3D points
void SetHandleDirection(double dx, double dy, double dz)
void SetCenter(double x, double y, double z)
void SetRadius(double r)
Set/Get the radius of sphere.
vtkPolyDataMapper * CenterMapper
void SetRepresentationToOff()
void GetSphere(vtkSphere *sphere)
Get the spherical implicit function defined by this widget.
void SetCenter(double c[3])
Set/Get the center position of the sphere.
void GetCenter(double xyz[3])
vtkProperty * RadialLineProperty
void PlaceWidget(double bounds[6]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void CreateDefaultProperties()
generate a 3D cursor representation
int RenderOpaqueGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
#define VTK_SPHERE_WIREFRAME
vtkSphereRepresentation()
double * GetBounds() override
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
vtkActor2D * HandleTextActor
a class defining the representation for the vtkSphereWidget2
vtkActor * RadialLineActor
#define VTK_SPHERE_SURFACE
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSphereSource * SphereSource
implicit function for a sphere
vtkCursor3D * CenterCursorSource
void SetThetaResolution(int r)
Set/Get the resolution of the sphere in the theta direction.
virtual void AdaptCenterCursorBounds()
vtkTextMapper * HandleTextMapper
window superclass for vtkRenderWindow
void BuildRepresentation() override
vtkSphereSource * HandleSource
void SetHandlePosition(double x, double y, double z)
void SetPhiResolution(int r)
Set/Get the resolution of the sphere in the phi direction.
vtkCellPicker * HandlePicker
#define VTK_SIZEHINT(...)
vtkLineSource * RadialLineSource
int RenderOverlay(vtkViewport *) override
vtkTypeBool HandleVisibility
create a polygonal sphere centered at the origin
void WidgetInteraction(double e[2]) override
void SetRepresentationToWireframe()
vtkTextProperty * HandleTextProperty
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
virtual void PlaceWidget(double center[3], double handlePosition[3])
represents an object (geometry & properties) in a rendered scene
vtkPolyDataMapper * RadialLineMapper
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
void Translate(double *p1, double *p2)
void GetPolyData(vtkPolyData *pd)
Grab the polydata (including points) that defines the sphere.
void StartWidgetInteraction(double e[2]) override
void SetInteractionState(int state)
The interaction state may be set from a widget (e.g., vtkSphereWidget2) or other object.
void SetHandleDirection(double dir[3])
Set/Get the direction vector of the handle relative to the center of the sphere.
create a line defined by two end points
abstract specification for Viewports
represent text properties.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
void SetRepresentationToSurface()
void SetHandlePosition(double handle[3])
Set/Get the position of the handle.
a actor that draws 2D data
vtkProperty * SphereProperty
void Scale(double *p1, double *p2, int X, int Y)
vtkProperty * HandleProperty
static vtkSphereRepresentation * New()
Instantiate the class.
vtkPolyDataMapper * HandleMapper
concrete dataset represents vertices, lines, polygons, and triangle strips
dynamic, self-adjusting array of double
represent surface properties of a geometric object
vtkProperty * SelectedHandleProperty
~vtkSphereRepresentation() override
vtkCellPicker * SpherePicker
ray-cast cell picker for all kinds of Prop3Ds
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
void HighlightSphere(int highlight)
void ReleaseGraphicsResources(vtkWindow *) override
Methods supporting, and required by, the rendering process.
vtkPolyDataMapper * SphereMapper
void PlaceHandle(double *center, double radius)
int ComputeInteractionState(int X, int Y, int modify=0) override
void HighlightHandle(int)
vtkProperty * SelectedSphereProperty
virtual void SizeHandles()
Superclass for algorithms that produce only polydata as output.