Regular API function

simCheckVisionSensorEx / sim.checkVisionSensorEx

Description Checks whether the vision sensor detects the indicated entity. This is the extended functionality version of sim.checkVisionSensor. Detection is silent (no visual feedback) compared to sim.handleVisionSensor. Also, the renderable flag of the entity is overridden if the entity is an object. See also sim.readVisionSensor.
C synopsis simFloat* simCheckVisionSensorEx(simInt sensorHandle,simInt entityHandle,simBool returnImage)
C parameters
sensorHandle: handle of the vision sensor object
entityHandle: handle of entity to detect (object or collection), or sim_handle_all to detect all detectable objects
returnImage: specifies what should be returned. If true, the sensor's image buffer is returned, otherwise its depth buffer is returned
C return value
image or depth buffer (use simGetVisionSensorResolution for correct size), or NULL in case of an error. The user is in charge of releasing the returned buffer with simReleaseBuffer
Lua synopsis table buffer=sim.checkVisionSensorEx(number sensorHandle,number entityHandle,boolean returnImage)
Lua parameters
Same as C-function
Lua return values
Similar to C-function: a table containing the image or depth buffer is returned (or nil in case of an error)

All regular API functions on one page