 |
VTK
9.1.0
|
Go to the documentation of this file.
85 #ifndef vtkSphereRepresentation_h
86 #define vtkSphereRepresentation_h
88 #include "vtkInteractionWidgetsModule.h"
110 #define VTK_SPHERE_OFF 0
111 #define VTK_SPHERE_WIREFRAME 1
112 #define VTK_SPHERE_SURFACE 2
146 vtkGetMacro(Representation,
int);
179 void GetCenter(
double xyz[3]) { this->SphereSource->GetCenter(xyz); }
186 double GetRadius() {
return this->SphereSource->GetRadius(); }
212 this->SetHandlePosition(p);
214 vtkGetVector3Macro(HandlePosition,
double);
230 this->SetHandleDirection(d);
232 vtkGetVector3Macro(HandleDirection,
double);
263 vtkSetMacro(CenterCursor,
bool);
264 vtkGetMacro(CenterCursor,
bool);
265 vtkBooleanMacro(CenterCursor,
bool);
367 vtkGetMacro(TranslationAxis,
int);
368 vtkSetClampMacro(TranslationAxis,
int, -1, 2);
393 double LastEventPosition[3];
409 double LastPickPosition[3];
413 void Scale(
const double* p1,
const double* p2,
int X,
int Y);
435 double HandleDirection[3];
436 double HandlePosition[3];
map vtkPolyData to graphics primitives
represent and manipulate 3D points
void SetHandleDirection(double dx, double dy, double dz)
Set/Get the direction vector of the handle relative to the center of the sphere.
void SetCenter(double x, double y, double z)
void SetRadius(double r)
Set/Get the radius of sphere.
vtkPolyDataMapper * CenterMapper
void SetRepresentationToOff()
Set the representation (i.e., appearance) of the sphere.
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
Methods supporting, and required by, the rendering process.
#define VTK_SPHERE_WIREFRAME
vtkSphereRepresentation()
void SetXTranslationAxisOn()
Toggles constraint translation axis on/off.
double * GetBounds() override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkActor2D * HandleTextActor
a class defining the representation for the vtkSphereWidget2
vtkActor * RadialLineActor
#define VTK_SPHERE_SURFACE
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and to print out the contents of the class.
vtkSphereSource * SphereSource
bool IsTranslationConstrained()
Returns true if ContrainedAxis.
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
These are methods that satisfy vtkWidgetRepresentation's API.
vtkSphereSource * HandleSource
void SetHandlePosition(double x, double y, double z)
Set/Get the position of the handle.
void SetPhiResolution(int r)
Set/Get the resolution of the sphere in the phi direction.
vtkCellPicker * HandlePicker
void Translate(const double *p1, const double *p2)
#define VTK_SIZEHINT(...)
vtkLineSource * RadialLineSource
int RenderOverlay(vtkViewport *) override
Methods supporting, and required by, the rendering process.
void PlaceHandle(const double *center, double radius)
vtkTypeBool HandleVisibility
create a polygonal sphere centered at the origin
void WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void SetRepresentationToWireframe()
Set the representation (i.e., appearance) of the sphere.
vtkTextProperty * HandleTextProperty
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods supporting, and required by, the rendering process.
virtual void PlaceWidget(double center[3], double handlePosition[3])
These are methods that satisfy vtkWidgetRepresentation's API.
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 SetYTranslationAxisOn()
Toggles constraint translation axis on/off.
void GetPolyData(vtkPolyData *pd)
Grab the polydata (including points) that defines the sphere.
void StartWidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
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.
void SetTranslationAxisOff()
Toggles constraint translation axis on/off.
create a line defined by two end points
abstract specification for Viewports
represent text properties.
int RenderTranslucentPolygonalGeometry(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.
a actor that draws 2D data
vtkProperty * SphereProperty
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
void SetZTranslationAxisOn()
Toggles constraint translation axis on/off.
vtkCellPicker * SpherePicker
ray-cast cell picker for all kinds of Prop3Ds
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
void Scale(const double *p1, const double *p2, int X, int Y)
void HighlightSphere(int highlight)
void ReleaseGraphicsResources(vtkWindow *) override
Methods supporting, and required by, the rendering process.
vtkPolyDataMapper * SphereMapper
int ComputeInteractionState(int X, int Y, int modify=0) override
These are methods that satisfy vtkWidgetRepresentation's API.
void HighlightHandle(int)
vtkProperty * SelectedSphereProperty
virtual void SizeHandles()
Superclass for algorithms that produce only polydata as output.