add_scene_3d_instanceT_add_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceadd_scene_3d_instance (Operator)
Name
add_scene_3d_instanceT_add_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceadd_scene_3d_instance
— Add an instance of a 3D object model to a 3D scene.
Signature
Description
add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceAddScene3dInstanceadd_scene_3d_instance
adds an instance of the 3D model
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d
to the 3D scene Scene3DScene3DScene3DScene3Dscene3Dscene_3d
and returns
its index in InstanceIndexInstanceIndexInstanceIndexInstanceIndexinstanceIndexinstance_index
. 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 PosePosePosePoseposepose
. The operator
set_scene_3d_instance_poseset_scene_3d_instance_poseSetScene3dInstancePoseSetScene3dInstancePoseSetScene3dInstancePoseset_scene_3d_instance_pose
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_poseSetScene3dToWorldPoseSetScene3dToWorldPoseSetScene3dToWorldPoseset_scene_3d_to_world_pose
, 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_paramSetScene3dInstanceParamSetScene3dInstanceParamSetScene3dInstanceParamset_scene_3d_instance_param
.
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
Scene3DScene3DScene3DScene3Dscene3Dscene_3d
(input_control) scene_3d →
HScene3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the 3D scene.
ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d
(input_control) object_model_3d(-array) →
HObjectModel3D, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the 3D object model.
PosePosePosePoseposepose
(input_control) pose(-array) →
HPose, HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Pose of the 3D object model.
Number of elements: 7
InstanceIndexInstanceIndexInstanceIndexInstanceIndexinstanceIndexinstance_index
(output_control) integer →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Index of the new instance in the 3D scene.
Result
add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceAddScene3dInstanceadd_scene_3d_instance
returns 2 (H_MSG_TRUE) if all parameters are
correct. If necessary, an exception is raised.
Possible Predecessors
create_scene_3dcreate_scene_3dCreateScene3dCreateScene3dCreateScene3dcreate_scene_3d
Possible Successors
set_scene_3d_instance_paramset_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParamSetScene3dInstanceParamset_scene_3d_instance_param
,
set_scene_3d_instance_poseset_scene_3d_instance_poseSetScene3dInstancePoseSetScene3dInstancePoseSetScene3dInstancePoseset_scene_3d_instance_pose
See also
remove_scene_3d_instanceremove_scene_3d_instanceRemoveScene3dInstanceRemoveScene3dInstanceRemoveScene3dInstanceremove_scene_3d_instance
Module
3D Metrology