63 #ifndef vtkHardwareSelector_h 64 #define vtkHardwareSelector_h 100 void PrintSelf(ostream& os,
vtkIndent indent);
146 virtual bool CaptureBuffers();
148 {
return this->GetPixelInformation(display_position, 0); }
152 { this->ReleasePixBuffers(); }
158 VTK_LEGACY(
bool GetPixelInformation(
unsigned int display_position[2],
165 VTK_LEGACY(
bool GetPixelInformation(
unsigned int display_position[2],
171 virtual void RenderCompositeIndex(
unsigned int index);
175 virtual void RenderAttributeId(
vtkIdType attribid);
179 virtual void RenderProcessId(
unsigned int processid);
188 virtual void BeginRenderProp();
189 virtual void EndRenderProp();
217 {
return GenerateSelection(this->Area); }
219 {
return GenerateSelection(r[0], r[1], r[2], r[3]); }
221 unsigned int x1,
unsigned int y1,
222 unsigned int x2,
unsigned int y2);
236 vtkProp* GetPropFromID(
int id);
247 MAX_KNOWN_PASS = ID_HIGH16,
248 MIN_KNOWN_PASS = PROCESS_PASS
253 tcoord[0] =
static_cast<float>((
id & 0xff)/255.0);
254 tcoord[1] =
static_cast<float>(((
id & 0xff00) >> 8)/255.0);
255 tcoord[2] =
static_cast<float>(((
id & 0xff0000) >> 16)/255.0);
274 unsigned char rgb[3];
276 rgb[1] = pb[offset+1];
277 rgb[2] = pb[offset+2];
289 int Convert(
unsigned int pos[2],
unsigned char* pb)
290 {
return this->Convert(pos[0], pos[1], pb); }
291 int Convert(
int xx,
int yy,
unsigned char* pb)
297 int offset = (yy *
static_cast<int>(this->Area[2]-this->Area[0]+1) + xx) * 3;
298 unsigned char rgb[3];
300 rgb[1] = pb[offset+1];
301 rgb[2] = pb[offset+2];
324 virtual bool PassRequired(
int pass);
329 bool IsPropHit(
int propid);
337 virtual void BeginSelection();
338 virtual void EndSelection();
340 void SavePixelBuffer(
int passNo);
341 void BuildPropHitList(
unsigned char* rgbData);
345 void ReleasePixBuffers();
347 unsigned int Area[4];
354 unsigned char* PixBuffer[10];
359 float PropColorValue[3];
366 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)
#define vtkSetVector4Macro(name, type)
a simple class to control print indentation
virtual int GetPropID(int idx, vtkProp *vtkNotUsed(prop))
#define vtkGetVector3Macro(name, type)
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])
#define vtkSetVector3Macro(name, type)
int Convert(unsigned long offset, unsigned char *pb)
#define vtkSetMacro(name, type)
int Convert(unsigned int pos[2], unsigned char *pb)