Regular API function


Description Creates a vision sensor.
C synopsis simInt simCreateVisionSensor(simInt options,const simInt* intParams,const simFloat* floatParams,const simFloat* color)
C parameters
options: bit-coded options:
bit 0 set (1): the sensor will be explicitely handled
bit 1 set (2): the sensor will be in perspective operation mode
bit 2 set (4): the sensor volume will not be shown when not detecting anything
bit 3 set (8): the sensor volume will not be shown when detecting something
bit 4 set (16): the sensor will be passive (use an external image)
bit 5 set (32): the sensor will use local lights
bit 6 set (64): the sensor will not render any fog
bit 7 set (128): the sensor will use a specific color for default background (i.e. "null" pixels)
intParams (input): 4 integer parameters:
intParams[0]: sensor resolution x
intParams[1]: sensor resolution y
intParams[2]: reserved. Set to 0
intParams[3]: reserved. Set to 0
floatParams (input): 11 floating point parameters:
floatParams[0]: near clipping plane
floatParams[1]: far clipping plane
floatParams[2]: view angle / ortho view size
floatParams[3]: sensor size x
floatParams[4]: sensor size y
floatParams[5]: sensor size z
floatParams[6]: "null" pixel red-value
floatParams[7]: "null" pixel green-value
floatParams[8]: "null" pixel blue-value
floatParams[9]: reserved. Set to 0.0
floatParams[10]: reserved. Set to 0.0
color: pointer to 4x4x3 values representing the various colors of the sensor ((sensor passive, sensor active) x (ambient_diffuse rgb, 3 reserved values (set to zero), specular rgb and emission rgb)). Set the last 24 values to zero. Can be NULL for default values
C return value
-1 if operation was not successful, otherwise the handle of the force sensor
Lua synopsis number sensorHandle=simCreateVisionSensor(number options,table_4 intParams,table_11 floatParams,table_48 color=nil)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page