100 #ifndef vtkHardwareSelector_h
101 #define vtkHardwareSelector_h
104 #include "vtkRenderingCoreModule.h"
108 VTK_ABI_NAMESPACE_BEGIN
140 , CellGridCellTypeID(-1)
141 , CellGridSourceSpecID(-1)
142 , CellGridTupleID(-1)
164 vtkSetVector4Macro(Area,
unsigned int);
165 vtkGetVector4Macro(Area,
unsigned int);
179 vtkSetMacro(FieldAssociation,
int);
180 vtkGetMacro(FieldAssociation,
int);
189 vtkSetMacro(UseProcessIdFromData,
bool);
190 vtkGetMacro(UseProcessIdFromData,
bool);
213 virtual bool CaptureBuffers();
216 return this->GetPixelInformation(display_position, 0);
220 unsigned int temp[2];
221 return this->GetPixelInformation(display_position, maxDist, temp);
223 virtual PixelInformation GetPixelInformation(
224 const unsigned int display_position[2],
int maxDist,
unsigned int selected_position[2]);
235 virtual void RenderCompositeIndex(
unsigned int index);
244 virtual void UpdateMaximumCellId(
vtkIdType attribid);
245 virtual void UpdateMaximumPointId(
vtkIdType attribid);
246 virtual void UpdateMaximumCellGridTupleId(
vtkIdType attribid);
253 virtual void RenderProcessId(
unsigned int processid);
266 vtkGetMacro(ActorPassOnly,
bool);
267 vtkSetMacro(ActorPassOnly,
bool);
277 vtkGetMacro(CaptureZValues,
bool);
278 vtkSetMacro(CaptureZValues,
bool);
285 virtual void BeginRenderProp();
286 virtual void EndRenderProp();
294 vtkSetMacro(ProcessID,
int);
295 vtkGetMacro(ProcessID,
int);
302 vtkGetVector3Macro(PropColorValue,
float);
303 vtkSetVector3Macro(PropColorValue,
float);
311 vtkGetMacro(CurrentPass,
int);
325 return GenerateSelection(r[0], r[1], r[2], r[3]);
328 unsigned int x1,
unsigned int y1,
unsigned int x2,
unsigned int y2);
342 virtual vtkProp* GetPropFromID(
int id);
360 COMPOSITE_INDEX_PASS = 1,
369 CELLGRID_CELL_TYPE_INDEX_PASS = 7,
370 CELLGRID_SOURCE_INDEX_PASS = 8,
371 CELLGRID_TUPLE_ID_LOW24 = 9,
372 CELLGRID_TUPLE_ID_HIGH24 = 10,
374 MAX_KNOWN_PASS = CELLGRID_TUPLE_ID_HIGH24,
375 MIN_KNOWN_PASS = ACTOR_PASS
385 tcoord[0] =
static_cast<float>((
id & 0xff) / 255.0);
386 tcoord[1] =
static_cast<float>(((
id & 0xff00) >> 8) / 255.0);
387 tcoord[2] =
static_cast<float>(((
id & 0xff0000) >> 16) / 255.0);
392 virtual void SavePixelBuffer(
int passNo);
396 bool HasHighCellIds();
400 bool HasHighPointIds();
404 bool HasHighCellGridTupleIds();
419 double GetZValue(
int propid);
428 unsigned char rgb[3];
430 rgb[1] = pb[offset + 1];
431 rgb[2] = pb[offset + 2];
445 int Convert(
unsigned int pos[2],
unsigned char* pb) {
return this->
Convert(pos[0], pos[1], pb); }
446 virtual int Convert(
int xx,
int yy,
unsigned char* pb)
452 int offset = (yy *
static_cast<int>(this->Area[2] - this->Area[0] + 1) + xx) * 3;
453 unsigned char rgb[3];
455 rgb[1] = pb[offset + 1];
456 rgb[2] = pb[offset + 2];
481 virtual bool PassRequired(
int pass);
488 bool IsPropHit(
int propid);
495 virtual void BeginSelection();
496 virtual void EndSelection();
498 virtual void ProcessPixelBuffers();
499 void BuildPropHitList(
unsigned char* rgbData);
505 virtual void ReleasePixBuffers();
507 unsigned int Area[4];
516 unsigned char* PixBuffer[11];
517 unsigned char* RawPixBuffer[11];
523 float PropColorValue[3];
534 vtkInternals* Internals;
537 VTK_ABI_NAMESPACE_END
abstract superclass for all actors, volumes and annotations
virtual void PostCapturePass(int pass)
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void PreCapturePass(int pass)
PixelInformation GetPixelInformation(const unsigned int display_position[2], int maxDist)
It is possible to use the vtkHardwareSelector for a custom picking.
abstract specification for renderers
virtual vtkSelection * GenerateSelection(unsigned int r[4])
data object that represents a "selection" in VTK.
bool UseProcessIdFromData
Clears all pixel buffers.
static void Convert(vtkIdType id, float tcoord[3])
int FieldAssociation
Clears all pixel buffers.
vtkIdType MaximumCellId
Clears all pixel buffers.
vtkIdType MaximumCellGridTupleId
Clears all pixel buffers.
a simple class to control print indentation
virtual int Convert(int xx, int yy, unsigned char *pb)
pos must be relative to the lower-left corner of this->Area.
void ClearBuffers()
It is possible to use the vtkHardwareSelector for a custom picking.
unsigned char * GetPixelBuffer(int passNo)
It is possible to use the vtkHardwareSelector for a custom picking.
abstracts an OpenGL texture object.
vtkIdType GetID(int low24, int mid24, int high16)
create a window for renderers to draw into
virtual int GetPropID(int idx, vtkProp *prop)
Return a unique ID for the prop.
vtkIdType MaximumPointId
Clears all pixel buffers.
vtkRenderer * Renderer
Clears all pixel buffers.
PixelInformation GetPixelInformation(const unsigned int display_position[2])
It is possible to use the vtkHardwareSelector for a custom picking.
virtual vtkSelection * GenerateSelection()
Generates the vtkSelection from pixel buffers.
unsigned char * GetRawPixelBuffer(int passNo)
It is possible to use the vtkHardwareSelector for a custom picking.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
int Convert(unsigned long offset, unsigned char *pb)
int Convert(unsigned int pos[2], unsigned char *pb)
pos must be relative to the lower-left corner of this->Area.