36 #ifndef vtkBoxRepresentation_h
37 #define vtkBoxRepresentation_h
39 #include "vtkInteractionWidgetsModule.h"
166 vtkGetMacro(OutlineFaceWires,
int);
178 vtkGetMacro(OutlineCursorWires,
int);
203 unsigned long event,
void* calldata) override;
205 unsigned long event,
void* calldata) override;
207 unsigned long event,
void* calldata,
int modify = 0) override;
209 unsigned long event,
void* calldata) override;
253 vtkGetMacro(TwoPlaneMode,
bool);
262 vtkGetMacro(SnapToAxes,
bool);
263 vtkSetMacro(SnapToAxes,
bool);
285 vtkGetMacro(TranslationAxis,
int);
286 vtkSetClampMacro(TranslationAxis,
int, -1, 2);
311 double LastEventPosition[3];
312 double LastEventOrientation[4];
313 double StartEventOrientation[4];
314 double SnappedEventOrientations[3][4];
315 bool SnappedOrientation[3];
381 virtual void Translate(
const double* p1,
const double* p2);
382 virtual void Scale(
const double* p1,
const double* p2,
int X,
int Y);
383 virtual void Rotate(
int X,
int Y,
const double* p1,
const double* p2,
const double* vpn);
390 void UpdatePose(
const double* p1,
const double* d1,
const double* p2,
const double* d2);
402 void MoveFace(
const double* p1,
const double* p2,
const double*
dir,
double* x1,
double* x2,
403 double* x3,
double* x4,
double* x5);
406 void GetDirection(
const double Nx[3],
const double Ny[3],
const double Nz[3],
double dir[3]);
represents an object (geometry & properties) in a rendered scene
a class defining the representation for the vtkBoxWidget2
int ComputeInteractionState(int X, int Y, int modify=0) override
void SetZTranslationAxisOn()
virtual void PositionHandles()
virtual void SetTransform(vtkTransform *t)
Set the position, scale and orientation of the box widget using the transform specified.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkProperty * OutlineProperty
void MovePlusZFace(const double *p1, const double *p2)
void OutlineCursorWiresOff()
void MoveMinusYFace(const double *p1, const double *p2)
void GetPlanes(vtkPlanes *planes)
Get the planes describing the implicit function defined by the box widget.
void SetOutlineCursorWires(int)
Control the representation of the outline.
vtkPolyDataMapper * HexFaceMapper
vtkProperty * FaceProperty
void MoveMinusXFace(const double *p1, const double *p2)
void MoveFace(const double *p1, const double *p2, const double *dir, double *x1, double *x2, double *x3, double *x4, double *x5)
virtual void HandlesOff()
vtkProperty * HandleProperty
void HighlightFace(int cellId)
int HighlightHandle(vtkProp *prop)
bool IsTranslationConstrained()
Returns true if ContrainedAxis.
void OutlineFaceWiresOn()
vtkPolyDataMapper * OutlineMapper
void GetDirection(const double Nx[3], const double Ny[3], const double Nz[3], double dir[3])
void SetXTranslationAxisOn()
Toggles constraint translation axis on/off.
virtual void Translate(const double *p1, const double *p2)
void MovePlusYFace(const double *p1, const double *p2)
static vtkBoxRepresentation * New()
Instantiate the class.
virtual void SizeHandles()
void BuildRepresentation() override
vtkCellPicker * LastPicker
virtual void Rotate(int X, int Y, const double *p1, const double *p2, const double *vpn)
vtkSphereSource ** HandleGeometry
virtual void GetTransform(vtkTransform *t)
Retrieve a linear transform characterizing the transformation of the box.
vtkDoubleArray * PlaneNormals
void SetTwoPlaneMode(bool)
void WidgetInteraction(double e[2]) override
vtkProperty * SelectedOutlineProperty
void OutlineCursorWiresOn()
virtual void ComputeNormals()
vtkProperty * SelectedFaceProperty
void HighlightOutline(int highlight)
vtkPolyData * HexPolyData
void GetPolyData(vtkPolyData *pd)
Grab the polydata (including points) that define the box widget.
void UpdatePose(const double *p1, const double *d1, const double *p2, const double *d2)
vtkProperty * SelectedHandleProperty
void MovePlusXFace(const double *p1, const double *p2)
vtkPolyDataMapper * HexMapper
void SetYTranslationAxisOn()
void StartWidgetInteraction(double e[2]) override
void SetTranslationAxisOff()
void StepForward()
For complex events should we snap orientations to be aligned with the x y z axes.
vtkPolyDataMapper ** HandleMapper
vtkCellPicker * HandlePicker
void SetInteractionState(int state)
The interaction state may be set from a widget (e.g., vtkBoxWidget2) or other object.
virtual void HandlesOn()
Switches handles (the spheres) on or off by manipulating the underlying actor visibility.
void SetOutlineFaceWires(int)
Control the representation of the outline.
~vtkBoxRepresentation() override
void OutlineFaceWiresOff()
double * GetBounds() override
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
virtual void CreateDefaultProperties()
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
void PlaceWidget(double bounds[6]) override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkPolyData * HexFacePolyData
vtkPolyData * OutlinePolyData
virtual void Scale(const double *p1, const double *p2, int X, int Y)
vtkPlane * GetUnderlyingPlane(int i)
vtkCellPicker * HexPicker
void MoveMinusZFace(const double *p1, const double *p2)
implicit function for a bounding box
ray-cast cell picker for all kinds of Prop3Ds
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
perform various plane computations
implicit function for convex set of planes
represent the position of a point in 3D space
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
abstract superclass for all actors, volumes and annotations
represent surface properties of a geometric object
platform-independent render window interaction including picking and frame rate control.
create a polygonal sphere centered at the origin
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_SIZEHINT(...)