 |
VTK
9.1.0
|
Go to the documentation of this file.
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]);
map vtkPolyData to graphics primitives
represent and manipulate 3D points
static vtkTensorRepresentation * New()
Standard methods for instantiation, obtaining type information, and printing.
perform various plane computations
virtual void HandlesOn()
Switches handles (the spheres) on or off by manipulating the underlying actor visibility.
vtkTransform * EllipsoidTransform
void GetEigenvalues(double evals[3])
These are methods used to retrieve derived information about the tensor.
vtkPolyData * HexFacePolyData
void StepForward()
For complex events should we snap orientations to be aligned with the x y z axes.
void SetTranslationAxisOff()
Toggles constraint translation axis on/off.
vtkPolyDataMapper * OutlineMapper
void GetTensor(double tensor[9])
These are the basic methods used to define the tensor (these methods coordinate with the overloaded P...
int HighlightHandle(vtkProp *prop)
void SetOutlineFaceWires(bool)
Control the representation of the outline.
void WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
represent the position of a point in 3D space
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing.
void GetEigenvector(int n, double ev[3])
These are methods used to retrieve derived information about the tensor.
void SetZTranslationAxisOn()
Toggles constraint translation axis on/off.
void MovePlusZFace(const double *p1, const double *p2, bool entry)
void MoveMinusYFace(const double *p1, const double *p2, bool entry)
void SetXTranslationAxisOn()
Toggles constraint translation axis on/off.
vtkProperty * OutlineProperty
void StartWidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void OutlineFaceWiresOn()
Control the representation of the outline.
vtkProperty * FaceProperty
void SetTensorEllipsoid(bool)
Indicate whether to show the tensor ellipsoid.
virtual void CreateDefaultProperties()
vtkPolyData * OutlinePolyData
implicit function for convex set of planes
vtkMatrix4x4 * EllipsoidMatrix
void SetTensor(double tensor[9])
These are the basic methods used to define the tensor (these methods coordinate with the overloaded P...
void GetDirection(const double Nx[3], const double Ny[3], const double Nz[3], double dir[3])
void MovePlusXFace(const double *p1, const double *p2, bool entry)
window superclass for vtkRenderWindow
vtkSphereSource * EllipsoidSource
virtual void Translate(const double *p1, const double *p2)
virtual void Rotate(int X, int Y, const double *p1, const double *p2, const double *vpn)
vtkCellPicker * HandlePicker
vtkPolyDataMapper * EllipsoidMapper
#define VTK_SIZEHINT(...)
vtkPolyDataMapper * HexMapper
void PlaceWidget(double bounds[6]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
void StepBackward()
For complex events should we snap orientations to be aligned with the x y z axes.
void GetPosition(double pos[3])
Set/Get a position for the location of the tensor.
create a polygonal sphere centered at the origin
double * GetBounds() override
These are methods that satisfy vtkWidgetRepresentation's API.
void OutlineCursorWiresOn()
Control the representation of the outline.
void HighlightOutline(int highlight)
void HighlightFace(int cellId)
represents an object (geometry & properties) in a rendered scene
virtual void Scale(const double *p1, const double *p2, int X, int Y)
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
vtkPolyDataMapper ** HandleMapper
void MoveMinusZFace(const double *p1, const double *p2, bool entry)
void UpdateTensorFromWidget()
void SetOutlineCursorWires(bool)
Control the representation of the outline.
void UpdatePose(const double *p1, const double *d1, const double *p2, const double *d2)
int ComputeInteractionState(int X, int Y, int modify=0) override
These are methods that satisfy vtkWidgetRepresentation's API.
~vtkTensorRepresentation() override
create a line defined by two end points
vtkDoubleArray * PlaneNormals
vtkCellPicker * LastPicker
platform-independent render window interaction including picking and frame rate control.
vtkPolyDataMapper * HexFaceMapper
abstract specification for Viewports
void OutlineCursorWiresOff()
Control the representation of the outline.
void MoveMinusXFace(const double *p1, const double *p2, bool entry)
void GetSymmetricTensor(double symTensor[6])
These are the basic methods used to define the tensor (these methods coordinate with the overloaded P...
vtkProperty * SelectedOutlineProperty
abstract superclass for all actors, volumes and annotations
virtual void SizeHandles()
void MovePlusYFace(const double *p1, const double *p2, bool entry)
void SetYTranslationAxisOn()
Toggles constraint translation axis on/off.
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
implicit function for a bounding box
void TensorEllipsoidOn()
Indicate whether to show the tensor ellipsoid.
virtual void HandlesOff()
Switches handles (the spheres) on or off by manipulating the underlying actor visibility.
void OutlineFaceWiresOff()
Control the representation of the outline.
void UpdateTensorEigenfunctions(double tensor[3][3])
vtkPolyData * HexPolyData
void SetPosition(double pos[3])
Set/Get a position for the location of the tensor.
void PlaceTensor(double tensor[9], double position[3])
This is a specialized place widget method for a tensor.
vtkSphereSource ** HandleGeometry
void GetPolyData(vtkPolyData *pd)
Grab the polydata (including points) that define the representation.
concrete dataset represents vertices, lines, polygons, and triangle strips
class defining a representation for the vtkTensorWidget
vtkActor * EllipsoidActor
virtual void ComputeNormals()
dynamic, self-adjusting array of double
vtkProperty * SelectedFaceProperty
vtkProperty * HandleProperty
represent surface properties of a geometric object
vtkTensorRepresentation()
void SetSymmetricTensor(double symTensor[6])
These are the basic methods used to define the tensor (these methods coordinate with the overloaded P...
void MoveFace(const double *p1, const double *p2, const double *dir, double *x1, double *x2, double *x3, double *x4, double *x5)
ray-cast cell picker for all kinds of Prop3Ds
virtual void PositionHandles()
vtkProperty * SelectedHandleProperty
void SetInteractionState(int state)
The interaction state may be set from a widget (e.g., vtkTensorWidget) or other object.
vtkCellPicker * HexPicker
bool IsTranslationConstrained()
Returns true if ContrainedAxis.
vtkProperty * EllipsoidProperty
void TensorEllipsoidOff()
Indicate whether to show the tensor ellipsoid.
void UpdateWidgetFromTensor()
Superclass for algorithms that produce only polydata as output.