add_scene_3d_instanceT_add_scene_3d_instanceAddScene3dInstanceAddScene3dInstance (Operator)
Name
add_scene_3d_instanceT_add_scene_3d_instanceAddScene3dInstanceAddScene3dInstance
— Add an instance of a 3D object model to a 3D scene.
Signature
Description
add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceAddScene3dInstance
adds an instance of the 3D model
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D
to the 3D scene Scene3DScene3DScene3DScene3Dscene3D
and returns
its index in InstanceIndexInstanceIndexInstanceIndexInstanceIndexinstanceIndex
. If multiple 3D object models are
supplied, it is possible to set one pose for all instances or one pose
for every instance.
The pose of the object instance in the scene coordinate system must be
given in PosePosePosePosepose
. The operator
set_scene_3d_instance_poseset_scene_3d_instance_poseSetScene3dInstancePoseSetScene3dInstancePoseSetScene3dInstancePose
can be used to change this pose.
As long as no global scene pose is set with
set_scene_3d_to_world_poseset_scene_3d_to_world_poseSetScene3dToWorldPoseSetScene3dToWorldPoseSetScene3dToWorldPose
, this pose is evaluated relative to
the world coordinate system.
Parameters of the instance, such as its color, are set with the
operator set_scene_3d_instance_paramset_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParamSetScene3dInstanceParam
.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
Scene3DScene3DScene3DScene3Dscene3D
(input_control) scene_3d →
HScene3D, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the 3D scene.
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D
(input_control) object_model_3d(-array) →
HObjectModel3D, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the 3D object model.
PosePosePosePosepose
(input_control) pose(-array) →
HPose, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Pose of the 3D object model.
Number of elements: 7
InstanceIndexInstanceIndexInstanceIndexInstanceIndexinstanceIndex
(output_control) integer →
HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Index of the new instance in the 3D scene.
Result
add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceAddScene3dInstance
returns 2 (H_MSG_TRUE) if all parameters are
correct. If necessary, an exception is raised.
Possible Predecessors
create_scene_3dcreate_scene_3dCreateScene3dCreateScene3dCreateScene3d
Possible Successors
set_scene_3d_instance_paramset_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParamSetScene3dInstanceParam
,
set_scene_3d_instance_poseset_scene_3d_instance_poseSetScene3dInstancePoseSetScene3dInstancePoseSetScene3dInstancePose
See also
remove_scene_3d_instanceremove_scene_3d_instanceRemoveScene3dInstanceRemoveScene3dInstanceRemoveScene3dInstance
Module
3D Metrology