set_scene_3d_instance_param
— Set parameters of an instance in a 3D scene.
set_scene_3d_instance_param( : : Scene3D, InstanceIndex, GenParamName, GenParamValue : )
set_scene_3d_instance_param
sets parameters of the
instance InstanceIndex
in the 3D scene Scene3D
. The name
and value of a parameter must be given in GenParamName
and GenParamValue
. All parameters are applied to all instances.
The following values can be set:
Visibility of the 3D object models. If set to 'false' this instance is not displayed.
List of values: 'true' , 'false' .
Default: 'true' .
Explicitly select in which way a 3D object model is visualized.
List of values: 'auto' , 'faces' , 'primitive' , 'points' , 'lines' .
Default: 'auto' .
Color of the 3D object model. The available colors can be queried
with the operator query_color
. In addition, the color may
be specified as an RGB triplet in the form '#rrggbb' ,
where 'rr', 'gg', and 'bb' are hexadecimal numbers between '00'
and 'ff', respectively.
Possible values: 'red' , 'green' .
Default: 'white'
Transparency of the 3D object models. Displaying 3D object models
with transparency set to less than 1.0 may significantly increase
the runtime of display_scene_3d
and
render_scene_3d
.
Possible values: floating point value between 0.0 (fully transparent) and 1.0 (fully opaque).
Default: 1.0
Flag, if the pose of the 3D object models should be visualized.
List of values: 'true' , 'false' .
Default: 'false' .
Flag, if the contours of the 3D object models' polygons should be displayed.
List of values: 'true' , 'false' .
Default: 'false'
Flag, if the surface normals of the 3D object models should be visualized.
List of values: 'true' , 'false' .
Default: 'false' .
Color of the lines if 'disp_lines' is set to
'true' . The available colors can be queried with the
operator query_color
. In addition, the color may be
specified as an RGB triplet in the form '#rrggbb' ,
where 'rr', 'gg', and 'bb' are hexadecimal numbers.
Possible values: 'red' , 'green' .
Default: The value of 'color' .
Sets the width of lines in pixel.
Default: 1.0
Color of the visualized normals if 'disp_normals' is set
to 'true' . The available colors can be queried with the
operator query_color
. In addition, the color may be
specified as an RGB triplet in the form '#rrggbb' ,
where 'rr', 'gg', and 'bb' are hexadecimal numbers.
Possible values: 'red' , 'green' .
Default: The value of 'color'
Sets the diameter of the points in pixel.
Default: 3.5.
Sets the LUT that transforms the values of the attribute set with 'color_attrib' into a color.
See set_lut
for available LUTs. If 'lut' is set to
anything but 'default' , 'color' is ignored.
Default: 'default' .
Name of a point attribute that is used for false color visualization.
If an attribute is set, the color of the displayed 3D points is determined by the point's attribute value and the currently set LUT (see 'lut' ). This way, it is possible to visualize attributes in false colors.
Example: If 'color_attrib' is set to 'coord_z' , and 'lut' is set to 'color1' , the z-coordinates will be color coded from red to blue.
If 'lut' is set to 'default' , the attribute values are used to scale the color that was set by the parameter 'color' .
If 'lut' is set to a different value, the attribute values of all points are internally scaled to the interval [0,255] and used as input value for the LUT function.
The mapping is also controlled by the parameters 'color_attrib_start' and 'color_attrib_end' (see below).
If faces are displayed, their color is interpolated between the color of the corner points.
Possible values: 'none' , '&distance' , 'coord_x' , 'coord_y' , 'coord_z' , user defined point attributes, or any other point attribute available.
Default: 'none' .
The range of interest of the values of the attribute set with 'color_attrib' .
The attribute values between 'color_attrib_start' and 'color_attrib_end' are scaled to the start and end of the selected LUT. Attribute values outside the selected range are clipped. This allows to use a fixed color mapping which will not be distorted by outliers.
If set to 'auto' , the minimum attribute value is mapped to the start of the LUT, the maximum is mapped to the end of the LUT, except if 'color_attrib' is 'normal_x' , 'normal_y' , or 'normal_z' . In this case, start and end are automatically set to -1 and 1.
It is possible to enter start value that is higher than the end value. This will in effect flip the used LUT.
Possible values: 0, 0.1, 1, 100, 255, 'auto' .
Default: 'auto' .
Name of a point attribute that is used for the red, green, or blue color channel.
This is most useful when used with a group of three connected attributes, like RGB colors or normal vectors. This way it is possible to display points in colored texture, e.g., display the object model with overlayed RGB-sensor data, or display point normals in false colors.
To display only a single attribute in false colors, please use 'color_attrib' (see above).
By default, the attribute values are assumed to lie between 0 and 255. If the attributes have a different range, you additionally have to set the parameters 'rgb_channel_attrib_start' and 'rgb_channel_attrib_end' (see below).
If only 1 or 2 channels are set, the remaining channels use the RGB value of the color set with 'color' .
If faces are displayed, their color is interpolated between the color of the corner points.
Possible values: 'none' , '&red' , '&green' , '&blue' , 'normal_x' , 'normal_y' , 'normal_z' , user defined point attributes, or any other point attribute available.
Default: 'none' .
The range of interest of the values of attributes set with 'red_channel_attrib' , 'green_channel_attrib' , and 'blue_channel_attrib' .
These parameters define the value range that is scaled to the full RGB channels. This is useful, if the input attribute values are not in the interval [0,255].
If set to 'auto' , the minimum attribute value is mapped to 0, the maximum is mapped to 255, except if the attribute is 'normal_x' , 'normal_y' , or 'normal_z' . In this case, start and end are automatically set to -1 and 1.
It is possible to enter start value that is higher than the end value. This will in effect invert the displayed RGB colors.
The range can be set for the channels individually by replacing 'rgb' in the parameter name with the channel name, e.g., 'green_channel_attrib_start' .
Possible values: 'auto' , 0, 0.1, 1, 100, 255.
Default: 0, 255.
Scene3D
(input_control) scene_3d →
(handle)
Handle of the 3D scene.
InstanceIndex
(input_control) integer(-array) →
(integer)
Index of the instance.
GenParamName
(input_control) string-array →
(string)
Names of the generic parameters.
Default: 'color'
List of values: 'alpha' , 'attribute' , 'blue_channel_attrib' , 'color' , 'color_attrib' , 'color_attrib_end' , 'color_attrib_start' , 'disp_lines' , 'disp_normals' , 'disp_pose' , 'green_channel_attrib' , 'line_color' , 'line_width' , 'lut' , 'normal_color' , 'point_size' , 'red_channel_attrib' , 'rgb_channel_attrib_end' , 'rgb_channel_attrib_start' , 'visible'
GenParamValue
(input_control) string-array →
(string / integer / real)
Values of the generic parameters.
Default: 'green'
Suggested values: 'true' , 'false' , 'coord_x' , 'coord_y' , 'coord_z' , 'normal_x' , 'normal_y' , 'normal_z' , 'red' , 'green' , 'blue' , 'auto' , 'faces' , 'primitive' , 'points' , 'lines'
set_scene_3d_instance_param
returns 2 (
H_MSG_TRUE)
if all parameters are
correct. If necessary, an exception is raised.
3D Metrology