ClassesClasses | | Operators

set_scene_3d_instance_paramT_set_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParam (Operator)

Name

set_scene_3d_instance_paramT_set_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParam — Set parameters of an instance in a 3D scene.

Signature

set_scene_3d_instance_param( : : Scene3D, InstanceIndex, GenParamName, GenParamValue : )

Herror T_set_scene_3d_instance_param(const Htuple Scene3D, const Htuple InstanceIndex, const Htuple GenParamName, const Htuple GenParamValue)

void SetScene3dInstanceParam(const HTuple& Scene3D, const HTuple& InstanceIndex, const HTuple& GenParamName, const HTuple& GenParamValue)

void HScene3D::SetScene3dInstanceParam(const HTuple& InstanceIndex, const HTuple& GenParamName, const HTuple& GenParamValue) const

void HScene3D::SetScene3dInstanceParam(Hlong InstanceIndex, const HTuple& GenParamName, const HTuple& GenParamValue) const

static void HOperatorSet.SetScene3dInstanceParam(HTuple scene3D, HTuple instanceIndex, HTuple genParamName, HTuple genParamValue)

void HScene3D.SetScene3dInstanceParam(HTuple instanceIndex, HTuple genParamName, HTuple genParamValue)

void HScene3D.SetScene3dInstanceParam(int instanceIndex, HTuple genParamName, HTuple genParamValue)

Description

set_scene_3d_instance_paramset_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParamSetScene3dInstanceParam sets parameters of the instance InstanceIndexInstanceIndexInstanceIndexInstanceIndexinstanceIndex in the 3D scene Scene3DScene3DScene3DScene3Dscene3D. The name and value of a parameter must be given in GenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue. All parameters are applied to all instances.

The following values can be set:

'visible'"visible""visible""visible""visible"

Visibility of the 3D object models. If set to 'false'"false""false""false""false" this instance is not displayed.

Values: 'true' or 'false'

Default value: 'true'

'attribute'"attribute""attribute""attribute""attribute"

Explicitly select in which way a 3D object model is visualized.

Values: 'auto', 'faces', 'primitive', 'points', 'lines'

Default Value: 'auto'

'color'"color""color""color""color":

Color of the 3D object model. The available colors can be queried with the operator query_colorquery_colorQueryColorQueryColorQueryColor. In addition, the color may be specified as an RGB triplet in the form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb", where 'rr', 'gg', and 'bb' are hexadecimal numbers between '00' and 'ff', respectively.

Values: 'red', 'green', ...

Default value: 'white'

'alpha'"alpha""alpha""alpha""alpha":

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_3ddisplay_scene_3dDisplayScene3dDisplayScene3dDisplayScene3d and render_scene_3drender_scene_3dRenderScene3dRenderScene3dRenderScene3d.

Values: floating point value between 0.0 (fully transparent) and 1.0 (fully opaque).

Default value: 1.0

'disp_pose'"disp_pose""disp_pose""disp_pose""disp_pose":

Flag, if the pose of the 3D object models should be visualized.

Values: 'true' or 'false'

Default value: 'false'

'disp_lines'"disp_lines""disp_lines""disp_lines""disp_lines":

Flag, if the contours of the 3D object models' polygons should be displayed.

Values: 'true' or 'false'

Default value: 'false'

'disp_normals'"disp_normals""disp_normals""disp_normals""disp_normals":

Flag, if the surface normals of the 3D object models should be visualized.

Values: 'true' or 'false'

Default value: 'false'

'line_color'"line_color""line_color""line_color""line_color":

Color of the lines if 'disp_lines'"disp_lines""disp_lines""disp_lines""disp_lines" is set to 'true'"true""true""true""true". The available colors can be queried with the operator query_colorquery_colorQueryColorQueryColorQueryColor. In addition, the color may be specified as an RGB triplet in the form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb", where 'rr', 'gg', and 'bb' are hexadecimal numbers.

Values: 'red', 'green', ...

Default value: The value of 'color'"color""color""color""color"

'line_width'"line_width""line_width""line_width""line_width":

Sets the width of lines in pixel.

Default value: 1.0

'normal_color'"normal_color""normal_color""normal_color""normal_color":

Color of the visualized normals if 'disp_normals'"disp_normals""disp_normals""disp_normals""disp_normals" is set to 'true'"true""true""true""true". The available colors can be queried with the operator query_colorquery_colorQueryColorQueryColorQueryColor. In addition, the color may be specified as an RGB triplet in the form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb", where 'rr', 'gg', and 'bb' are hexadecimal numbers.

Values: 'red', 'green', ...

Default value: The value of 'color'"color""color""color""color"

'point_size'"point_size""point_size""point_size""point_size":

Sets the diameter of the points in pixel.

Default value: 3.5

'lut'"lut""lut""lut""lut":

Sets the LUT that transforms the values of the attribute set with 'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib" into a color.

See set_lutset_lutSetLutSetLutSetLut for available LUTs. If 'lut'"lut""lut""lut""lut" is set to anything but 'default'"default""default""default""default", 'color'"color""color""color""color" is ignored.

Default value: 'default'

'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib":

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'"lut""lut""lut""lut"). This way, it is possible to visualize attributes in false colors.

Example: If 'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib" is set to 'coord_z'"coord_z""coord_z""coord_z""coord_z", and 'lut'"lut""lut""lut""lut" is set to 'color1'"color1""color1""color1""color1", the z-coordinates will be color coded from red to blue.

If 'lut'"lut""lut""lut""lut" is set to 'default'"default""default""default""default", the attribute values are used to scale the color that was set by the parameter 'color'"color""color""color""color".

If 'lut'"lut""lut""lut""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'"color_attrib_start""color_attrib_start""color_attrib_start""color_attrib_start" and 'color_attrib_end'"color_attrib_end""color_attrib_end""color_attrib_end""color_attrib_end" (see below).

If faces are displayed, their color is interpolated between the color of the corner points.

Values: 'none', '&distance', 'coord_x', 'coord_y', 'coord_z', user defined point attributes, or any other point attribute available.

Default: 'none'

'color_attrib_start'"color_attrib_start""color_attrib_start""color_attrib_start""color_attrib_start",'color_attrib_end'"color_attrib_end""color_attrib_end""color_attrib_end""color_attrib_end":

The range of interest of the values of the attribute set with 'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib".

The attribute values between 'color_attrib_start'"color_attrib_start""color_attrib_start""color_attrib_start""color_attrib_start" and 'color_attrib_end'"color_attrib_end""color_attrib_end""color_attrib_end""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'"auto""auto""auto""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'"color_attrib""color_attrib""color_attrib""color_attrib" is 'normal_x'"normal_x""normal_x""normal_x""normal_x", 'normal_y'"normal_y""normal_y""normal_y""normal_y", or 'normal_z'"normal_z""normal_z""normal_z""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.

Values: 0, 0.1, 1, 100, 255, ...

Default value: 'auto'

'red_channel_attrib'"red_channel_attrib""red_channel_attrib""red_channel_attrib""red_channel_attrib", 'green_channel_attrib'"green_channel_attrib""green_channel_attrib""green_channel_attrib""green_channel_attrib", 'blue_channel_attrib'"blue_channel_attrib""blue_channel_attrib""blue_channel_attrib""blue_channel_attrib":

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'"color_attrib""color_attrib""color_attrib""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'"rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start" and 'rgb_channel_attrib_end'"rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end""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'"color""color""color""color".

If faces are displayed, their color is interpolated between the color of the corner points.

Values: 'none', '&red','&green','&blue', 'normal_x', 'normal_y', 'normal_z', user defined point attributes, or any other point attribute available.

Default: 'none'

'rgb_channel_attrib_start'"rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start", 'rgb_channel_attrib_end'"rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end":

The range of interest of the values of attributes set with 'red_channel_attrib'"red_channel_attrib""red_channel_attrib""red_channel_attrib""red_channel_attrib", 'green_channel_attrib'"green_channel_attrib""green_channel_attrib""green_channel_attrib""green_channel_attrib", and 'blue_channel_attrib'"blue_channel_attrib""blue_channel_attrib""blue_channel_attrib""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'"auto""auto""auto""auto", the minimum attribute value is mapped to 0, the maximum is mapped to 255, except if the attribute is 'normal_x'"normal_x""normal_x""normal_x""normal_x", 'normal_y'"normal_y""normal_y""normal_y""normal_y", or 'normal_z'"normal_z""normal_z""normal_z""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'"rgb""rgb""rgb""rgb" in the parameter name with the channel name, e.g., 'green_channel_attrib_start'"green_channel_attrib_start""green_channel_attrib_start""green_channel_attrib_start""green_channel_attrib_start".

Values: 'auto', 0, 0.1, 1, 100, 255, ...

Default values: 0, 255

Execution Information

Parameters

Scene3DScene3DScene3DScene3Dscene3D (input_control)  scene_3d HScene3D, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D scene.

InstanceIndexInstanceIndexInstanceIndexInstanceIndexinstanceIndex (input_control)  integer(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index of the instance.

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  string-array HTupleHTupleHtuple (string) (string) (HString) (char*)

Names of the generic parameters.

Default value: 'color' "color" "color" "color" "color"

List of values: 'alpha'"alpha""alpha""alpha""alpha", 'attribute'"attribute""attribute""attribute""attribute", 'blue_channel_attrib'"blue_channel_attrib""blue_channel_attrib""blue_channel_attrib""blue_channel_attrib", 'color'"color""color""color""color", 'color_attrib'"color_attrib""color_attrib""color_attrib""color_attrib", 'color_attrib_end'"color_attrib_end""color_attrib_end""color_attrib_end""color_attrib_end", 'color_attrib_start'"color_attrib_start""color_attrib_start""color_attrib_start""color_attrib_start", 'disp_lines'"disp_lines""disp_lines""disp_lines""disp_lines", 'disp_normals'"disp_normals""disp_normals""disp_normals""disp_normals", 'disp_pose'"disp_pose""disp_pose""disp_pose""disp_pose", 'green_channel_attrib'"green_channel_attrib""green_channel_attrib""green_channel_attrib""green_channel_attrib", 'line_color'"line_color""line_color""line_color""line_color", 'line_width'"line_width""line_width""line_width""line_width", 'lut'"lut""lut""lut""lut", 'normal_color'"normal_color""normal_color""normal_color""normal_color", 'point_size'"point_size""point_size""point_size""point_size", 'red_channel_attrib'"red_channel_attrib""red_channel_attrib""red_channel_attrib""red_channel_attrib", 'rgb_channel_attrib_end'"rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end""rgb_channel_attrib_end", 'rgb_channel_attrib_start'"rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start""rgb_channel_attrib_start", 'visible'"visible""visible""visible""visible"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  string-array HTupleHTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Values of the generic parameters.

Default value: 'green' "green" "green" "green" "green"

Suggested values: 'true'"true""true""true""true", 'false'"false""false""false""false", 'coord_x'"coord_x""coord_x""coord_x""coord_x", 'coord_y'"coord_y""coord_y""coord_y""coord_y", 'coord_z'"coord_z""coord_z""coord_z""coord_z", 'normal_x'"normal_x""normal_x""normal_x""normal_x", 'normal_y'"normal_y""normal_y""normal_y""normal_y", 'normal_z'"normal_z""normal_z""normal_z""normal_z", 'red'"red""red""red""red", 'green'"green""green""green""green", 'blue'"blue""blue""blue""blue", 'auto'"auto""auto""auto""auto", 'faces'"faces""faces""faces""faces", 'primitive'"primitive""primitive""primitive""primitive", 'points'"points""points""points""points", 'lines'"lines""lines""lines""lines"

Result

set_scene_3d_instance_paramset_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParamSetScene3dInstanceParam returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Possible Predecessors

add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceAddScene3dInstance

See also

set_scene_3d_paramset_scene_3d_paramSetScene3dParamSetScene3dParamSetScene3dParam

Module

3D Metrology


ClassesClasses | | Operators