Skip to content

HardwareSelector

Methods

attach

Attaches a render window + renderer to this hardware selector.

ArgumentTypeRequiredDescription
openglRenderWindowNullable<vtkOpenGLRenderWindow>Yes
rendererNullable<vtkRenderer>Yes

beginSelection

Preps for picking the scene.

Call endSelection() afterwards.

buildPropHitList

Builds the prop hit list.

ArgumentTypeRequiredDescription
pixelBufferUint8ArrayYes

captureBuffers

Captures the scene for picking.

Returns

TypeDescription
whether the capture succeeded.

endSelection

Cleans up picking state.

Should be after a call to beginSelection();

generateSelection

Generates selections in a given area.

ArgumentTypeRequiredDescription
fx1numberYestop left x coord
fy1numberYestop left y coord
fx2numberYesbottom right x coord
fy2numberYesbottom right y coord

getArea

Gets the selection area.

getCurrentPass

Gets the current pass type.

getMaximumCellId

Gets the maximum cell ID.

getMaximumPointId

Gets the maximum point ID.

getPixelBuffer

Get the pixel buffer for a pass type.

ArgumentTypeRequiredDescription
passNoPassTypesYes

getPixelInformation

Gets the selection information for a given pixel.

ArgumentTypeRequiredDescription
inDispPosYesThe input diplay position.
maxDistanceYesThe max distance to consider from the input position.
outDispPosYesThe output display position.

getPropColorValue

Gets the prop color value.

getRawPixelBuffer

Get the raw pixel buffer for a pass type.

ArgumentTypeRequiredDescription
passNoPassTypesYes

getRenderer

Gets the current renderer.

getSourceDataAsync

Get the picking source data.

ArgumentTypeRequiredDescription
renderervtkRendererYes
fx1numberYestop left x coord
fy1numberYestop left y coord
fx2numberYesbottom right x coord
fy2numberYesbottom right y coord

isPropHit

Has the prop with the given internal ID been hit.

ArgumentTypeRequiredDescription
idnumberYes

onEvent

Listen to the start/stop events.

ArgumentTypeRequiredDescription
cbYes
priorityYes

passRequired

Determines if a pass is required.

ArgumentTypeRequiredDescription
passPassTypesYes

passTypeToString

Returns the pass type name as a string.

ArgumentTypeRequiredDescription
typePassTypesYes

postCapturePass

Runs a post-capture pass.

preCapturePass

Runs a pre-capture pass.

processPixelBuffers

Processes the pixel buffers for actors.

releasePixBuffers

Releases internal pixel buffer memory.

renderAttributeId

Renders an attribute ID.

ArgumentTypeRequiredDescription
attribIdnumberYes

renderCompositeIndex

Sets the current prop's color value for the composite index.

ArgumentTypeRequiredDescription
indexnumberYes

renderProp

Renders a prop for picking.

ArgumentTypeRequiredDescription
propvtkPropYes

savePixelBuffer

Saves the pixel buffer from the view.

ArgumentTypeRequiredDescription
passPassTypesYes

select

Generates a selection.

setArea

Sets the selection area.

ArgumentTypeRequiredDescription
fx1numberYestop left x coord
fy1numberYestop left y coord
fx2numberYesbottom right x coord
fy2numberYesbottom right y coord

setArea

Sets the selection area.

ArgumentTypeRequiredDescription
areaYesAn area bounding box

setCurrentPass

Sets the current pass type.

ArgumentTypeRequiredDescription
passPassTypesYes

setMaximumCellId

Sets the maximum cell ID.

ArgumentTypeRequiredDescription
idnumberYes

setMaximumPointId

Sets the maximum point ID.

ArgumentTypeRequiredDescription
idnumberYes

setOpenGLRenderWindow

Sets the current opengl render window.

ArgumentTypeRequiredDescription
oglrwvtkOpenGLRenderWindowYes

setPropColorValue

Sets the prop's color value.

ArgumentTypeRequiredDescription
rnumberYes
gnumberYes
bnumberYes

setPropColorValue

Sets the prop's color value.

ArgumentTypeRequiredDescription
colorVector3Yes

setPropColorValueFromInt

Sets the internal color used for coloring the current prop.

ArgumentTypeRequiredDescription
valnumberYes

setRenderer

Sets the current renderer.

ArgumentTypeRequiredDescription
renvtkRendererYes