63 #ifndef __vtkHardwareSelector_h
64 #define __vtkHardwareSelector_h
146 virtual bool CaptureBuffers();
148 {
return this->GetPixelInformation(display_position, 0); }
149 PixelInformation GetPixelInformation(
unsigned int display_position[2],
152 { this->ReleasePixBuffers(); }
158 VTK_LEGACY(
bool GetPixelInformation(
unsigned int display_position[2],
165 VTK_LEGACY(
bool GetPixelInformation(
unsigned int display_position[2],
171 void RenderCompositeIndex(
unsigned int index);
175 void RenderAttributeId(
vtkIdType attribid);
179 void RenderProcessId(
unsigned int processid);
188 virtual void BeginRenderProp();
189 virtual void EndRenderProp();
211 {
return GenerateSelection(this->Area); }
213 {
return GenerateSelection(r[0], r[1], r[2], r[3]); }
215 unsigned int x1,
unsigned int y1,
216 unsigned int x2,
unsigned int y2);
230 vtkProp* GetPropFromID(
int id);
241 MAX_KNOWN_PASS = ID_HIGH16,
242 MIN_KNOWN_PASS = PROCESS_PASS
255 tcoord[0] =
static_cast<float>((
id & 0xff)/255.0);
256 tcoord[1] =
static_cast<float>(((
id & 0xff00) >> 8)/255.0);
257 tcoord[2] =
static_cast<float>(((
id & 0xff0000) >> 16)/255.0);
267 unsigned char rgb[3];
269 rgb[1] = pb[offset+1];
270 rgb[2] = pb[offset+2];
282 int Convert(
unsigned int pos[2],
unsigned char* pb)
283 {
return this->Convert(pos[0], pos[1], pb); }
284 int Convert(
int xx,
int yy,
unsigned char* pb)
290 int offset = (yy *
static_cast<int>(this->Area[2]-this->Area[0]+1) + xx) * 3;
291 unsigned char rgb[3];
293 rgb[1] = pb[offset+1];
294 rgb[2] = pb[offset+2];
317 virtual bool PassRequired(
int pass);
322 bool IsPropHit(
int propid);
330 virtual void BeginSelection();
331 virtual void EndSelection();
333 void SavePixelBuffer(
int passNo);
334 void BuildPropHitList(
unsigned char* rgbData);
338 void ReleasePixBuffers();
340 unsigned int Area[4];
347 unsigned char* PixBuffer[10];
357 vtkInternals* Internals;
abstract superclass for all actors, volumes and annotations
abstract base class for most VTK objects
#define vtkGetMacro(name, type)
GLuint GLuint GLsizei count
abstract specification for renderers
virtual vtkSelection * GenerateSelection(unsigned int r[4])
A node in a selection tree. Used to store selection results.
GLdouble GLdouble GLdouble r
bool UseProcessIdFromData
#define vtkTypeMacro(thisClass, superclass)
virtual void PrintSelf(ostream &os, vtkIndent indent)
#define vtkSetVector4Macro(name, type)
a simple class to control print indentation
virtual int GetPropID(int idx, vtkProp *vtkNotUsed(prop))
static void Convert(int id, float tcoord[3])
#define vtkGetVector4Macro(name, type)
int Convert(int xx, int yy, unsigned char *pb)
#define vtkGetObjectMacro(name, type)
#define VTK_LEGACY(method)
abstracts an OpenGL texture object.
vtkIdType GetID(int low24, int mid24, int high16)
create a window for renderers to draw into
#define VTKRENDERINGCORE_EXPORT
virtual vtkSelection * GenerateSelection()
manager for OpenGL-based selection.
PixelInformation GetPixelInformation(unsigned int display_position[2])
int Convert(unsigned long offset, unsigned char *pb)
#define vtkSetMacro(name, type)
int Convert(unsigned int pos[2], unsigned char *pb)