43#ifndef vtkTensorRepresentation_h
44#define vtkTensorRepresentation_h
46#include "vtkInteractionWidgetsModule.h"
95 void GetTensor(
double tensor[9]) { std::copy(this->Tensor, this->Tensor + 9, tensor); }
98 symTensor[0] = this->Tensor[0];
99 symTensor[1] = this->Tensor[4];
100 symTensor[2] = this->Tensor[8];
101 symTensor[3] = this->Tensor[1];
102 symTensor[4] = this->Tensor[2];
103 symTensor[5] = this->Tensor[5];
115 std::copy(this->Eigenvalues, this->Eigenvalues + 3, evals);
119 n = (n < 0 ? 0 : (n > 2 ? 2 : n));
120 std::copy(this->Eigenvectors[n], this->Eigenvectors[n] + 3, ev);
133 std::copy(this->TensorPosition, this->TensorPosition + 3, pos);
193 vtkGetMacro(OutlineFaceWires,
bool);
205 vtkGetMacro(OutlineCursorWires,
bool);
224 vtkGetMacro(TensorEllipsoid,
bool);
248 unsigned long event,
void* calldata) override;
250 unsigned long event,
void* calldata) override;
252 unsigned long event,
void* calldata,
int modify = 0) override;
254 unsigned long event,
void* calldata) override;
298 vtkGetMacro(SnapToAxes,
bool);
299 vtkSetMacro(SnapToAxes,
bool);
321 vtkGetMacro(TranslationAxis,
int);
322 vtkSetClampMacro(TranslationAxis,
int, -1, 2);
348 double Eigenvalues[3];
349 double Eigenvectors[3][3];
350 double TensorPosition[3];
353 double LastEventPosition[3];
354 double LastEventOrientation[4];
355 double StartEventOrientation[4];
356 double SnappedEventOrientations[3][4];
357 bool SnappedOrientation[3];
435 virtual void Translate(
const double* p1,
const double* p2);
436 virtual void Scale(
const double* p1,
const double* p2,
int X,
int Y);
437 virtual void Rotate(
int X,
int Y,
const double* p1,
const double* p2,
const double* vpn);
444 void UpdatePose(
const double* p1,
const double* d1,
const double* p2,
const double* d2);
455 void MoveFace(
const double* p1,
const double* p2,
const double* dir,
double* x1,
double* x2,
456 double* x3,
double* x4,
double* x5);
460 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
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
class defining a representation for the vtkTensorWidget
void SetZTranslationAxisOn()
Toggles constraint translation axis on/off.
vtkProperty * FaceProperty
void OutlineCursorWiresOn()
Control the representation of the outline.
virtual void SizeHandles()
void GetEigenvalues(double evals[3])
These are methods used to retrieve derived information about the tensor.
void MovePlusXFace(const double *p1, const double *p2, bool entry)
vtkPolyDataMapper * HexMapper
vtkProperty * SelectedHandleProperty
int HighlightHandle(vtkProp *prop)
void SetOutlineFaceWires(bool)
Control the representation of the outline.
vtkPolyData * OutlinePolyData
vtkProperty * EllipsoidProperty
void MoveFace(const double *p1, const double *p2, const double *dir, double *x1, double *x2, double *x3, double *x4, double *x5)
void SetPosition(double pos[3])
Set/Get a position for the location of the tensor.
void HighlightFace(int cellId)
void StartWidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void MovePlusZFace(const double *p1, const double *p2, bool entry)
void SetTensor(double tensor[9])
These are the basic methods used to define the tensor (these methods coordinate with the overloaded P...
vtkSphereSource ** HandleGeometry
void SetOutlineCursorWires(bool)
Control the representation of the outline.
virtual void HandlesOn()
Switches handles (the spheres) on or off by manipulating the underlying actor visibility.
void UpdateTensorFromWidget()
virtual void HandlesOff()
Switches handles (the spheres) on or off by manipulating the underlying actor visibility.
vtkDoubleArray * PlaneNormals
~vtkTensorRepresentation() override
void TensorEllipsoidOn()
Indicate whether to show the tensor ellipsoid.
vtkCellPicker * LastPicker
virtual void PositionHandles()
vtkProperty * SelectedFaceProperty
vtkPolyDataMapper * OutlineMapper
void UpdateTensorEigenfunctions(double tensor[3][3])
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing.
void SetYTranslationAxisOn()
Toggles constraint translation axis on/off.
vtkPolyDataMapper * HexFaceMapper
void MoveMinusXFace(const double *p1, const double *p2, bool entry)
vtkActor * EllipsoidActor
void SetXTranslationAxisOn()
Toggles constraint translation axis on/off.
void MovePlusYFace(const double *p1, const double *p2, bool entry)
vtkPolyDataMapper ** HandleMapper
void GetPolyData(vtkPolyData *pd)
Grab the polydata (including points) that define the representation.
int ComputeInteractionState(int X, int Y, int modify=0) override
These are methods that satisfy vtkWidgetRepresentation's API.
void UpdateWidgetFromTensor()
void GetEigenvector(int n, double ev[3])
These are methods used to retrieve derived information about the tensor.
static vtkTensorRepresentation * New()
Standard methods for instantiation, obtaining type information, and printing.
void UpdatePose(const double *p1, const double *d1, const double *p2, const double *d2)
vtkProperty * SelectedOutlineProperty
vtkTensorRepresentation()
virtual void ComputeNormals()
void GetDirection(const double Nx[3], const double Ny[3], const double Nz[3], double dir[3])
vtkPolyData * HexFacePolyData
void PlaceTensor(double tensor[9], double position[3])
This is a specialized place widget method for a tensor.
vtkProperty * HandleProperty
void GetSymmetricTensor(double symTensor[6])
These are the basic methods used to define the tensor (these methods coordinate with the overloaded P...
double * GetBounds() override
These are methods that satisfy vtkWidgetRepresentation's API.
bool IsTranslationConstrained()
Returns true if ContrainedAxis.
virtual void Rotate(int X, int Y, const double *p1, const double *p2, const double *vpn)
virtual void CreateDefaultProperties()
void MoveMinusZFace(const double *p1, const double *p2, bool entry)
vtkPolyDataMapper * EllipsoidMapper
vtkProperty * OutlineProperty
void OutlineCursorWiresOff()
Control the representation of the outline.
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
void StepForward()
For complex events should we snap orientations to be aligned with the x y z axes.
vtkTransform * EllipsoidTransform
void GetPosition(double pos[3])
Set/Get a position for the location of the tensor.
void TensorEllipsoidOff()
Indicate whether to show the tensor ellipsoid.
void PlaceWidget(double bounds[6]) override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkPolyData * HexPolyData
void OutlineFaceWiresOff()
Control the representation of the outline.
void SetSymmetricTensor(double symTensor[6])
These are the basic methods used to define the tensor (these methods coordinate with the overloaded P...
virtual void Translate(const double *p1, const double *p2)
void SetTranslationAxisOff()
Toggles constraint translation axis on/off.
void StepBackward()
For complex events should we snap orientations to be aligned with the x y z axes.
void OutlineFaceWiresOn()
Control the representation of the outline.
vtkCellPicker * HandlePicker
vtkSphereSource * EllipsoidSource
void GetTensor(double tensor[9])
These are the basic methods used to define the tensor (these methods coordinate with the overloaded P...
void SetInteractionState(int state)
The interaction state may be set from a widget (e.g., vtkTensorWidget) or other object.
vtkCellPicker * HexPicker
void SetTensorEllipsoid(bool)
Indicate whether to show the tensor ellipsoid.
vtkMatrix4x4 * EllipsoidMatrix
void MoveMinusYFace(const double *p1, const double *p2, bool entry)
void WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
virtual void Scale(const double *p1, const double *p2, int X, int Y)
void HighlightOutline(int highlight)
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_SIZEHINT(...)