Name
disp_object_model_3dT_disp_object_model_3dDispObjectModel3dDispObjectModel3d — Display 3D object models.
void DispObjectModel3d(const HTuple& WindowHandle, const HTuple& ObjectModel3D, const HTuple& CamParam, const HTuple& Pose, const HTuple& GenParamName, const HTuple& GenParamValue)
static void HObjectModel3D::DispObjectModel3d(const HWindow& WindowHandle, const HObjectModel3DArray& ObjectModel3D, const HCamPar& CamParam, const HPoseArray& Pose, const HTuple& GenParamName, const HTuple& GenParamValue)
void HObjectModel3D::DispObjectModel3d(const HWindow& WindowHandle, const HCamPar& CamParam, const HPose& Pose, const HTuple& GenParamName, const HTuple& GenParamValue) const
void HCamPar::DispObjectModel3d(const HWindow& WindowHandle, const HObjectModel3DArray& ObjectModel3D, const HPoseArray& Pose, const HTuple& GenParamName, const HTuple& GenParamValue) const
void HCamPar::DispObjectModel3d(const HWindow& WindowHandle, const HObjectModel3D& ObjectModel3D, const HPose& Pose, const HTuple& GenParamName, const HTuple& GenParamValue) const
static void HPose::DispObjectModel3d(const HWindow& WindowHandle, const HObjectModel3DArray& ObjectModel3D, const HCamPar& CamParam, const HPoseArray& Pose, const HTuple& GenParamName, const HTuple& GenParamValue)
void HPose::DispObjectModel3d(const HWindow& WindowHandle, const HObjectModel3D& ObjectModel3D, const HCamPar& CamParam, const HTuple& GenParamName, const HTuple& GenParamValue) const
static void HOperatorSet.DispObjectModel3d(HTuple windowHandle, HTuple objectModel3D, HTuple camParam, HTuple pose, HTuple genParamName, HTuple genParamValue)
static void HObjectModel3D.DispObjectModel3d(HWindow windowHandle, HObjectModel3D[] objectModel3D, HCamPar camParam, HPose[] pose, HTuple genParamName, HTuple genParamValue)
void HObjectModel3D.DispObjectModel3d(HWindow windowHandle, HCamPar camParam, HPose pose, HTuple genParamName, HTuple genParamValue)
void HCamPar.DispObjectModel3d(HWindow windowHandle, HObjectModel3D[] objectModel3D, HPose[] pose, HTuple genParamName, HTuple genParamValue)
void HCamPar.DispObjectModel3d(HWindow windowHandle, HObjectModel3D objectModel3D, HPose pose, HTuple genParamName, HTuple genParamValue)
static void HPose.DispObjectModel3d(HWindow windowHandle, HObjectModel3D[] objectModel3D, HCamPar camParam, HPose[] pose, HTuple genParamName, HTuple genParamValue)
void HPose.DispObjectModel3d(HWindow windowHandle, HObjectModel3D objectModel3D, HCamPar camParam, HTuple genParamName, HTuple genParamValue)
disp_object_model_3ddisp_object_model_3dDispObjectModel3dDispObjectModel3dDispObjectModel3d displays the 3D object models of
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D in the window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle.
Set CamParamCamParamCamParamCamParamcamParam and the individual poses (in PosePosePosePosepose) of the
3D object models to setup the displayed scene.
If an empty tuple is given for CamParamCamParamCamParamCamParamcamParam, disp_object_model_3ddisp_object_model_3dDispObjectModel3dDispObjectModel3dDispObjectModel3d
uses default camera parameters that correspond to the window size.
PosePosePosePosepose
can contain either multiple poses (one pose for each 3D object model) or one
pose for all 3D object models.
If an empty tuple is given for PosePosePosePosepose, disp_object_model_3ddisp_object_model_3dDispObjectModel3dDispObjectModel3dDispObjectModel3d
estimates a pose, such that all 3D object models are visible.
3D object models containing triangles or polygons are displayed as solids,
whereas 3D object models containing only coordinates are displayed as point
clouds. 3D primitives (e.g., obtained by
fit_primitives_object_model_3dfit_primitives_object_model_3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3d) are displayed as solids as well.
The generic parameter 'attribute'"attribute""attribute""attribute""attribute" can be used to explicitly select
in which way a 3D object model is visualized.
To render the 3D object models into an image, the operator
render_object_model_3drender_object_model_3dRenderObjectModel3dRenderObjectModel3dRenderObjectModel3d can be used.
GenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue are used to further
configure the scene. The following values influence the whole scene:
- 'disp_background'"disp_background""disp_background""disp_background""disp_background":
-
Flag, if the current window content should be used as background.
Values: 'true' or 'false'
Default value: 'false'
- 'light_position'"light_position""light_position""light_position""light_position":
-
Position of the light source. Must be given as a string
containing four space separated floating point numbers.
If the fourth number is 0.0, a directional light source is
used (the first three components represent the direction),
otherwise a point light source is used (with the first
three components representing the position).
Default value: '-100.0 -100.0 0.0 1.0'
- 'light_ambient'"light_ambient""light_ambient""light_ambient""light_ambient":
-
Ambient part of the light source. Must be given as a string
containing three space separated floating point numbers.
Default value: '0.2 0.2 0.2'
- 'light_diffuse'"light_diffuse""light_diffuse""light_diffuse""light_diffuse":
-
Diffuse part of the light source. Must be given as a string
containing three space separated floating point numbers.
Default value: '0.8 0.8 0.8'
- 'colored'"colored""colored""colored""colored":
-
Display 3D object models in different colors. The value of this
parameter defines the number of colors that are used.
Values: 3, 6, or 12
Default value: all objects are displayed white
- 'object_index_persistence'"object_index_persistence""object_index_persistence""object_index_persistence""object_index_persistence":
-
Must be set to 'true'"true""true""true""true" to enable the object index query
with get_disp_object_model_3d_infoget_disp_object_model_3d_infoGetDispObjectModel3dInfoGetDispObjectModel3dInfoGetDispObjectModel3dInfo.
Values: 'true' or 'false'
Default value: 'false'
- 'depth_persistence'"depth_persistence""depth_persistence""depth_persistence""depth_persistence":
-
Must be set to 'true'"true""true""true""true" to enable the depth query with
get_disp_object_model_3d_infoget_disp_object_model_3d_infoGetDispObjectModel3dInfoGetDispObjectModel3dInfoGetDispObjectModel3dInfo.
Values: 'true' or 'false'
Default value: 'false'
- 'quality'"quality""quality""quality""quality":
-
Must be set to 'low'"low""low""low""low" to enable faster rendering without
anti aliasing.
Values: 'low' or 'high'
Default value: 'high'
The following parameters can be set for all 3D object models in the scene or
for a specific 3D object model by appending the index of the 3D object model
to the parameter name (e.g., 'color_0'"color_0""color_0""color_0""color_0" to set the color of the
first 3D object model).
- '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 models. 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":
-
Translucency of the 3D object models. Displaying 3D object models
with translucency set to less than 1.0 may significantly increase
the runtime of disp_object_model_3ddisp_object_model_3dDispObjectModel3dDispObjectModel3dDispObjectModel3d.
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
All generic parameters are evaluated from left to right. For example, to set
the color of the first 3D object model to red and the color of all other
3D object models to green, set GenParamNameGenParamNameGenParamNameGenParamNamegenParamName to
['color','color_0']["color","color_0"]["color","color_0"]["color","color_0"]["color","color_0"] and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue to
['green','red']["green","red"]["green","red"]["green","red"]["green","red"].
disp_object_model_3ddisp_object_model_3dDispObjectModel3dDispObjectModel3dDispObjectModel3d requires OpenGL 2.1, GLSL 1.2, and the OpenGL
extensions GL_EXT_framebuffer_object and GL_EXT_framebuffer_blit.
Otherwise the compatibility mode is automatically enabled.
On graphics cards with low memory the following error messages could occur
if rendering in a window with high resolution:
Low level error: 'Incomplete attachment'
Unhandled Exception: 'Required framebuffer object is unsupported'
Solutions:
Set the parameter 'quality'"quality""quality""quality""quality" to 'low'"low""low""low""low" or use the
compatibility mode to reduce the requirements of the graphics card.
The system variable (see set_systemset_systemSetSystemSetSystemSetSystem)
'opengl_compatibility_mode_enable'"opengl_compatibility_mode_enable""opengl_compatibility_mode_enable""opengl_compatibility_mode_enable""opengl_compatibility_mode_enable" can be set to 'true'"true""true""true""true"
to permanently enable the visualization in compatibility mode with lower
OpenGL requirements.
This mode requires OpenGL 1.1.
In compatibility mode the parameters 'object_index_persistence'"object_index_persistence""object_index_persistence""object_index_persistence""object_index_persistence",
'depth_persistence'"depth_persistence""depth_persistence""depth_persistence""depth_persistence" and 'quality'"quality""quality""quality""quality" are not used.
On Linux Remote Desktop 'disp_background'"disp_background""disp_background""disp_background""disp_background" is not supported.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Handles of the 3D object models.
Camera parameters of the scene.
Default value: []
3D poses of the objects.
Default value: []
Names of the generic parameters.
Default value: []
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", 'colored'"colored""colored""colored""colored", 'compatibility_mode_enable'"compatibility_mode_enable""compatibility_mode_enable""compatibility_mode_enable""compatibility_mode_enable", 'depth_persistence'"depth_persistence""depth_persistence""depth_persistence""depth_persistence", 'disp_background'"disp_background""disp_background""disp_background""disp_background", '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", 'light_ambient'"light_ambient""light_ambient""light_ambient""light_ambient", 'light_diffuse'"light_diffuse""light_diffuse""light_diffuse""light_diffuse", 'light_position'"light_position""light_position""light_position""light_position", '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", 'object_index_persistence'"object_index_persistence""object_index_persistence""object_index_persistence""object_index_persistence", 'point_size'"point_size""point_size""point_size""point_size", 'quality'"quality""quality""quality""quality", '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"
Values of the generic parameters.
Default value: []
List of values: 'auto'"auto""auto""auto""auto", 'blue'"blue""blue""blue""blue", '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", 'faces'"faces""faces""faces""faces", 'false'"false""false""false""false", 'green'"green""green""green""green", 'lines'"lines""lines""lines""lines", '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", 'points'"points""points""points""points", 'primitive'"primitive""primitive""primitive""primitive", 'red'"red""red""red""red", 'true'"true""true""true""true"
disp_object_model_3ddisp_object_model_3dDispObjectModel3dDispObjectModel3dDispObjectModel3d returns 2 (H_MSG_TRUE) if all parameters are
correct. If necessary, an exception is raised.
If the image rendering exceeds the available memory of the graphics card, the
error 5188 is raised.
find_surface_modelfind_surface_modelFindSurfaceModelFindSurfaceModelFindSurfaceModel,
fit_primitives_object_model_3dfit_primitives_object_model_3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3dFitPrimitivesObjectModel3d,
read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3d,
segment_object_model_3dsegment_object_model_3dSegmentObjectModel3dSegmentObjectModel3dSegmentObjectModel3d
get_disp_object_model_3d_infoget_disp_object_model_3d_infoGetDispObjectModel3dInfoGetDispObjectModel3dInfoGetDispObjectModel3dInfo
render_object_model_3drender_object_model_3dRenderObjectModel3dRenderObjectModel3dRenderObjectModel3d,
project_object_model_3dproject_object_model_3dProjectObjectModel3dProjectObjectModel3dProjectObjectModel3d,
project_shape_model_3dproject_shape_model_3dProjectShapeModel3dProjectShapeModel3dProjectShapeModel3d,
object_model_3d_to_xyzobject_model_3d_to_xyzObjectModel3dToXyzObjectModel3dToXyzObjectModel3dToXyz
3D Metrology