VTK  9.4.20241112
vtkCellCentersPointPlacer.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
29#ifndef vtkCellCentersPointPlacer_h
30#define vtkCellCentersPointPlacer_h
31
32#include "vtkInteractionWidgetsModule.h" // For export macro
33#include "vtkPointPlacer.h"
34
35VTK_ABI_NAMESPACE_BEGIN
36class vtkRenderer;
38class vtkProp;
39class vtkCellPicker;
40
41class VTKINTERACTIONWIDGETS_EXPORT vtkCellCentersPointPlacer : public vtkPointPlacer
42{
43public:
48
50
54 void PrintSelf(ostream& os, vtkIndent indent) override;
56
57 // Description:
58 // Add an actor (that represents a terrain in a rendered scene) to the
59 // list. Only props in this list are considered by the PointPlacer
60 virtual void AddProp(vtkProp*);
61 virtual void RemoveViewProp(vtkProp* prop);
62 virtual void RemoveAllProps();
65
75 vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
76
83 int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
84 double worldPos[3], double worldOrient[9]) override;
85
90 int ValidateWorldPosition(double worldPos[3]) override;
91
95 int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]) override;
96
101 int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
102
104
107 vtkGetObjectMacro(CellPicker, vtkCellPicker);
109
111
117 vtkSetMacro(Mode, int);
118 vtkGetMacro(Mode, int);
120
121 enum
122 {
123 ParametricCenter = 0,
125 None
126 };
127
128protected:
131
132 // The props that represents the terrain data (one or more) in a rendered
133 // scene
136 int Mode;
137
138private:
140 void operator=(const vtkCellCentersPointPlacer&) = delete;
141};
142
143VTK_ABI_NAMESPACE_END
144#endif
Snaps points at the center of a cell.
int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double refWorldPos[3], double worldPos[3], double worldOrient[9]) override
Given a renderer, a display position, and a reference world position, compute the new world position ...
int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override
Given a world position and a world orientation, validate it according to the constraints of the place...
vtkTypeBool HasProp(vtkProp *)
virtual void RemoveViewProp(vtkProp *prop)
virtual void RemoveAllProps()
int ValidateDisplayPosition(vtkRenderer *, double displayPos[2]) override
Given a display position, check the validity of this position.
virtual void AddProp(vtkProp *)
int ValidateWorldPosition(double worldPos[3]) override
Given a world position check the validity of this position according to the constraints of the placer...
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override
Given a renderer and a display position in pixel coordinates, compute the world position and orientat...
static vtkCellCentersPointPlacer * New()
Instantiate this class.
~vtkCellCentersPointPlacer() override
ray-cast cell picker for all kinds of Prop3Ds
a simple class to control print indentation
Definition vtkIndent.h:108
Abstract interface to translate 2D display positions to world coordinates.
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:66
abstract specification for renderers
int vtkTypeBool
Definition vtkABI.h:64
@ None
!< For HCURL