34#ifndef vtkTensorRepresentation_h 
   35#define vtkTensorRepresentation_h 
   37#include "vtkInteractionWidgetsModule.h"  
   40VTK_ABI_NAMESPACE_BEGIN
 
   87  void GetTensor(
double tensor[9]) { std::copy(this->Tensor, this->Tensor + 9, tensor); }
 
   90    symTensor[0] = this->Tensor[0];
 
   91    symTensor[1] = this->Tensor[4];
 
   92    symTensor[2] = this->Tensor[8];
 
   93    symTensor[3] = this->Tensor[1];
 
   94    symTensor[4] = this->Tensor[2];
 
   95    symTensor[5] = this->Tensor[5];
 
  107    std::copy(this->Eigenvalues, this->Eigenvalues + 3, evals);
 
  111    n = (n < 0 ? 0 : (n > 2 ? 2 : n));
 
  112    std::copy(this->Eigenvectors[n], this->Eigenvectors[n] + 3, ev);
 
  125    std::copy(this->TensorPosition, this->TensorPosition + 3, pos);
 
  185  vtkGetMacro(OutlineFaceWires, 
bool);
 
  197  vtkGetMacro(OutlineCursorWires, 
bool);
 
  216  vtkGetMacro(TensorEllipsoid, 
bool);
 
  240    unsigned long event, 
void* calldata) override;
 
  242    unsigned long event, 
void* calldata) override;
 
  244    unsigned long event, 
void* calldata, 
int modify = 0) override;
 
  246    unsigned long event, 
void* calldata) override;
 
  290  vtkGetMacro(SnapToAxes, 
bool);
 
  291  vtkSetMacro(SnapToAxes, 
bool);
 
  313  vtkGetMacro(TranslationAxis, 
int);
 
  314  vtkSetClampMacro(TranslationAxis, 
int, -1, 2);
 
  340  double Eigenvalues[3];
 
  341  double Eigenvectors[3][3];
 
  342  double TensorPosition[3];
 
  345  double LastEventPosition[3];
 
  346  double LastEventOrientation[4];
 
  347  double StartEventOrientation[4];
 
  348  double SnappedEventOrientations[3][4];
 
  349  bool SnappedOrientation[3];
 
  427  virtual void Translate(
const double* p1, 
const double* p2);
 
  428  virtual void Scale(
const double* p1, 
const double* p2, 
int X, 
int Y);
 
  429  virtual void Rotate(
int X, 
int Y, 
const double* p1, 
const double* p2, 
const double* vpn);
 
  436  void UpdatePose(
const double* p1, 
const double* d1, 
const double* p2, 
const double* d2);
 
  447  void MoveFace(
const double* p1, 
const double* p2, 
const double* dir, 
double* x1, 
double* x2,
 
  448    double* x3, 
double* x4, 
double* x5);
 
  452  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 ConstrainedAxis.
 
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(...)