 |
VTK
9.0.1
|
Go to the documentation of this file.
109 #ifndef vtkHardwareSelector_h
110 #define vtkHardwareSelector_h
113 #include "vtkRenderingCoreModule.h"
167 vtkSetVector4Macro(Area,
unsigned int);
168 vtkGetVector4Macro(Area,
unsigned int);
182 vtkSetMacro(FieldAssociation,
int);
183 vtkGetMacro(FieldAssociation,
int);
192 vtkSetMacro(UseProcessIdFromData,
bool);
193 vtkGetMacro(UseProcessIdFromData,
bool);
219 return this->GetPixelInformation(display_position, 0);
223 unsigned int temp[2];
224 return this->GetPixelInformation(display_position, maxDist, temp);
227 const unsigned int display_position[2],
int maxDist,
unsigned int selected_position[2]);
268 vtkGetMacro(ActorPassOnly,
bool);
269 vtkSetMacro(ActorPassOnly,
bool);
279 vtkGetMacro(CaptureZValues,
bool);
280 vtkSetMacro(CaptureZValues,
bool);
296 vtkSetMacro(ProcessID,
int);
297 vtkGetMacro(ProcessID,
int);
304 vtkGetVector3Macro(PropColorValue,
float);
305 vtkSetVector3Macro(PropColorValue,
float);
313 vtkGetMacro(CurrentPass,
int);
327 return GenerateSelection(r[0], r[1], r[2], r[3]);
330 unsigned int x1,
unsigned int y1,
unsigned int x2,
unsigned int y2);
372 MAX_KNOWN_PASS = CELL_ID_HIGH24,
373 MIN_KNOWN_PASS = ACTOR_PASS
383 tcoord[0] =
static_cast<float>((
id & 0xff) / 255.0);
384 tcoord[1] =
static_cast<float>(((
id & 0xff00) >> 8) / 255.0);
385 tcoord[2] =
static_cast<float>(((
id & 0xff0000) >> 16) / 255.0);
414 unsigned char rgb[3];
431 int Convert(
unsigned int pos[2],
unsigned char* pb) {
return this->
Convert(pos[0], pos[1], pb); }
432 int Convert(
int xx,
int yy,
unsigned char* pb)
438 int offset = (yy *
static_cast<int>(this->Area[2] - this->Area[0] + 1) + xx) * 3;
439 unsigned char rgb[3];
493 unsigned int Area[4];
501 unsigned char* PixBuffer[10];
502 unsigned char* RawPixBuffer[10];
508 float PropColorValue[3];
519 vtkInternals* Internals;
vtkProp * GetPropFromID(int id)
returns the prop associated with a ID.
bool IsPropHit(int propid)
After the ACTOR_PASS this return true or false depending upon whether the prop was hit in the ACTOR_P...
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.
unsigned char * GetPixelBuffer(int passNo)
static vtkHardwareSelector * New()
virtual void ProcessPixelBuffers()
abstract base class for most VTK objects
virtual void RenderCompositeIndex(unsigned int index)
Called by any vtkMapper or vtkProp subclass to render a composite-index.
virtual bool PassRequired(int pass)
Returns is the pass indicated is needed.
virtual int GetPropID(int idx, vtkProp *vtkNotUsed(prop))
Return a unique ID for the prop.
virtual vtkSelection * GenerateSelection(unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2)
data object that represents a "selection" in VTK.
virtual void UpdateMaximumPointId(vtkIdType attribid)
virtual vtkSelection * GenerateSelection()
Generates the vtkSelection from pixel buffers.
virtual bool CaptureBuffers()
It is possible to use the vtkHardwareSelector for a custom picking.
virtual void EndRenderProp()
vtkSelection * Select()
Perform the selection.
virtual void BeginRenderProp()
Called by the mapper before and after rendering each prop.
std::string PassTypeToString(PassTypes type)
Convert a PassTypes enum value to a human readable string.
void ReleasePixBuffers()
Clears all pixel buffers.
PixelInformation GetPixelInformation(const unsigned int display_position[2])
void BuildPropHitList(unsigned char *rgbData)
virtual vtkSelection * GeneratePolygonSelection(int *polygonPoints, vtkIdType count)
Generates the vtkSelection from pixel buffers.
PixelInformation GetPixelInformation(const unsigned int display_position[2], int maxDist, unsigned int selected_position[2])
virtual void UpdateMaximumCellId(vtkIdType attribid)
Called by any vtkMapper or vtkProp subclass to indicate the maximum cell or point attribute ID it use...
a simple class to control print indentation
abstracts an OpenGL texture object.
virtual vtkSelection * GenerateSelection(unsigned int r[4])
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void EndRenderProp(vtkRenderWindow *)=0
double GetZValue(int propid)
vtkIdType GetID(int low24, int mid24, int high16)
int Render(vtkRenderer *renderer, vtkProp **propArray, int propArrayCount)
Called by vtkRenderer to render the selection pass.
virtual void PreCapturePass(int pass)
abstract superclass for all actors, volumes and annotations
int Convert(int xx, int yy, unsigned char *pb)
void SetPropColorValue(vtkIdType val)
virtual void SavePixelBuffer(int passNo)
unsigned char * GetRawPixelBuffer(int passNo)
virtual void SetRenderer(vtkRenderer *)
Get/Set the renderer to perform the selection on.
~vtkHardwareSelector() override
abstract specification for renderers
bool UseProcessIdFromData
create a window for renderers to draw into
static void Convert(vtkIdType id, float tcoord[3])
virtual void BeginRenderProp(vtkRenderWindow *)=0
virtual void RenderProcessId(unsigned int processid)
Called by any vtkMapper or subclass to render process id.
virtual void EndSelection()
PixelInformation GetPixelInformation(const unsigned int display_position[2], int maxDist)
virtual void PostCapturePass(int pass)
virtual void BeginSelection()