100 #ifndef vtkHardwareSelector_h
101 #define vtkHardwareSelector_h
104 #include "vtkRenderingCoreModule.h"
108 VTK_ABI_NAMESPACE_BEGIN
158 vtkSetVector4Macro(Area,
unsigned int);
159 vtkGetVector4Macro(Area,
unsigned int);
173 vtkSetMacro(FieldAssociation,
int);
174 vtkGetMacro(FieldAssociation,
int);
183 vtkSetMacro(UseProcessIdFromData,
bool);
184 vtkGetMacro(UseProcessIdFromData,
bool);
207 virtual bool CaptureBuffers();
210 return this->GetPixelInformation(display_position, 0);
214 unsigned int temp[2];
215 return this->GetPixelInformation(display_position, maxDist, temp);
217 virtual PixelInformation GetPixelInformation(
218 const unsigned int display_position[2],
int maxDist,
unsigned int selected_position[2]);
229 virtual void RenderCompositeIndex(
unsigned int index);
238 virtual void UpdateMaximumCellId(
vtkIdType attribid);
239 virtual void UpdateMaximumPointId(
vtkIdType attribid);
246 virtual void RenderProcessId(
unsigned int processid);
259 vtkGetMacro(ActorPassOnly,
bool);
260 vtkSetMacro(ActorPassOnly,
bool);
270 vtkGetMacro(CaptureZValues,
bool);
271 vtkSetMacro(CaptureZValues,
bool);
278 virtual void BeginRenderProp();
279 virtual void EndRenderProp();
287 vtkSetMacro(ProcessID,
int);
288 vtkGetMacro(ProcessID,
int);
295 vtkGetVector3Macro(PropColorValue,
float);
296 vtkSetVector3Macro(PropColorValue,
float);
304 vtkGetMacro(CurrentPass,
int);
318 return GenerateSelection(r[0], r[1], r[2], r[3]);
321 unsigned int x1,
unsigned int y1,
unsigned int x2,
unsigned int y2);
335 vtkProp* GetPropFromID(
int id);
363 MAX_KNOWN_PASS = CELL_ID_HIGH24,
364 MIN_KNOWN_PASS = ACTOR_PASS
374 tcoord[0] =
static_cast<float>((
id & 0xff) / 255.0);
375 tcoord[1] =
static_cast<float>(((
id & 0xff00) >> 8) / 255.0);
376 tcoord[2] =
static_cast<float>(((
id & 0xff0000) >> 16) / 255.0);
381 virtual void SavePixelBuffer(
int passNo);
385 bool HasHighCellIds();
389 bool HasHighPointIds();
404 double GetZValue(
int propid);
413 unsigned char rgb[3];
415 rgb[1] = pb[offset + 1];
416 rgb[2] = pb[offset + 2];
430 int Convert(
unsigned int pos[2],
unsigned char* pb) {
return this->
Convert(pos[0], pos[1], pb); }
431 int Convert(
int xx,
int yy,
unsigned char* pb)
437 int offset = (yy *
static_cast<int>(this->Area[2] - this->Area[0] + 1) + xx) * 3;
438 unsigned char rgb[3];
440 rgb[1] = pb[offset + 1];
441 rgb[2] = pb[offset + 2];
466 virtual bool PassRequired(
int pass);
473 bool IsPropHit(
int propid);
480 virtual void BeginSelection();
481 virtual void EndSelection();
483 virtual void ProcessPixelBuffers();
484 void BuildPropHitList(
unsigned char* rgbData);
490 void ReleasePixBuffers();
492 unsigned int Area[4];
500 unsigned char* PixBuffer[10];
501 unsigned char* RawPixBuffer[10];
507 float PropColorValue[3];
518 vtkInternals* Internals;
521 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.
a simple class to control print indentation
virtual int GetPropID(int idx, vtkProp *vtkNotUsed(prop))
Return a unique ID for the prop.
void ClearBuffers()
It is possible to use the vtkHardwareSelector for a custom picking.
int Convert(int xx, int yy, unsigned char *pb)
pos must be relative to the lower-left corner of this->Area.
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
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.