Operator Reference

add_scene_3d_instanceT_add_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceadd_scene_3d_instance (Operator)

add_scene_3d_instanceT_add_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceadd_scene_3d_instance — Add an instance of a 3D object model to a 3D scene.

Signature

add_scene_3d_instance( : : Scene3D, ObjectModel3D, Pose : InstanceIndex)

Herror T_add_scene_3d_instance(const Htuple Scene3D, const Htuple ObjectModel3D, const Htuple Pose, Htuple* InstanceIndex)

void AddScene3dInstance(const HTuple& Scene3D, const HTuple& ObjectModel3D, const HTuple& Pose, HTuple* InstanceIndex)

Hlong HScene3D::AddScene3dInstance(const HObjectModel3DArray& ObjectModel3D, const HPoseArray& Pose) const

Hlong HScene3D::AddScene3dInstance(const HObjectModel3D& ObjectModel3D, const HPose& Pose) const

static void HOperatorSet.AddScene3dInstance(HTuple scene3D, HTuple objectModel3D, HTuple pose, out HTuple instanceIndex)

int HScene3D.AddScene3dInstance(HObjectModel3D[] objectModel3D, HPose[] pose)

int HScene3D.AddScene3dInstance(HObjectModel3D objectModel3D, HPose pose)

def add_scene_3d_instance(scene_3d: HHandle, object_model_3d: MaybeSequence[HHandle], pose: Sequence[Union[float, int]]) -> int

Description

add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstanceadd_scene_3d_instance adds an instance of the 3D model ObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d to the 3D scene Scene3DScene3DScene3Dscene3Dscene_3d and returns its index in InstanceIndexInstanceIndexInstanceIndexinstanceIndexinstance_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 PosePosePoseposepose. The operator set_scene_3d_instance_poseset_scene_3d_instance_poseSetScene3dInstancePoseSetScene3dInstancePoseset_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_poseSetScene3dToWorldPoseSetScene3dToWorldPoseset_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_paramSetScene3dInstanceParamSetScene3dInstanceParamset_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

Scene3DScene3DScene3Dscene3Dscene_3d (input_control)  scene_3d HScene3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D scene.

ObjectModel3DObjectModel3DObjectModel3DobjectModel3Dobject_model_3d (input_control)  object_model_3d(-array) HObjectModel3D, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D object model.

PosePosePoseposepose (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

InstanceIndexInstanceIndexInstanceIndexinstanceIndexinstance_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_instanceAddScene3dInstanceAddScene3dInstanceadd_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_3dCreateScene3dCreateScene3dcreate_scene_3d

Possible Successors

set_scene_3d_instance_paramset_scene_3d_instance_paramSetScene3dInstanceParamSetScene3dInstanceParamset_scene_3d_instance_param, set_scene_3d_instance_poseset_scene_3d_instance_poseSetScene3dInstancePoseSetScene3dInstancePoseset_scene_3d_instance_pose

See also

remove_scene_3d_instanceremove_scene_3d_instanceRemoveScene3dInstanceRemoveScene3dInstanceremove_scene_3d_instance

Module

3D Metrology