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

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)

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

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