Operator Reference

add_scene_3d_cameraT_add_scene_3d_cameraAddScene3dCameraAddScene3dCameraadd_scene_3d_camera (Operator)

add_scene_3d_cameraT_add_scene_3d_cameraAddScene3dCameraAddScene3dCameraadd_scene_3d_camera — Add a camera to a 3D scene.

Signature

add_scene_3d_camera( : : Scene3D, CameraParam : CameraIndex)

Herror T_add_scene_3d_camera(const Htuple Scene3D, const Htuple CameraParam, Htuple* CameraIndex)

void AddScene3dCamera(const HTuple& Scene3D, const HTuple& CameraParam, HTuple* CameraIndex)

Hlong HCamPar::AddScene3dCamera(const HScene3D& Scene3D) const

Hlong HScene3D::AddScene3dCamera(const HCamPar& CameraParam) const

static void HOperatorSet.AddScene3dCamera(HTuple scene3D, HTuple cameraParam, out HTuple cameraIndex)

int HCamPar.AddScene3dCamera(HScene3D scene3D)

int HScene3D.AddScene3dCamera(HCamPar cameraParam)

def add_scene_3d_camera(scene_3d: HHandle, camera_param: Sequence[Union[float, int, str]]) -> int

Description

add_scene_3d_cameraadd_scene_3d_cameraAddScene3dCameraAddScene3dCameraadd_scene_3d_camera adds a new camera to the 3D scene Scene3DScene3DScene3Dscene3Dscene_3d and returns the index of this camera in CameraIndexCameraIndexCameraIndexcameraIndexcamera_index. The camera parameters of the camera must be given in CameraParamCameraParamCameraParamcameraParamcamera_param. By default the new camera is located at the origin of the world coordinate system. The pose of the camera CameraIndexCameraIndexCameraIndexcameraIndexcamera_index can be set with set_scene_3d_camera_poseset_scene_3d_camera_poseSetScene3dCameraPoseSetScene3dCameraPoseset_scene_3d_camera_pose.

Attention

Cameras with hypercentric lenses are not supported. For displaying large faces (or primitives) with a non-zero distortion in CameraParamCameraParamCameraParamcameraParamcamera_param, note that the distortion is only applied to the points of the model. In the projection, these points are subsequently connected by straight lines. For a good approximation of the distorted lines, please use a triangulation with sufficiently small triangles.

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.

CameraParamCameraParamCameraParamcameraParamcamera_param (input_control)  campar HCamPar, HTupleSequence[Union[float, int, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Parameters of the new camera.

CameraIndexCameraIndexCameraIndexcameraIndexcamera_index (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index of the new camera in the 3D scene.

Result

add_scene_3d_cameraadd_scene_3d_cameraAddScene3dCameraAddScene3dCameraadd_scene_3d_camera 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_camera_poseset_scene_3d_camera_poseSetScene3dCameraPoseSetScene3dCameraPoseset_scene_3d_camera_pose, display_scene_3ddisplay_scene_3dDisplayScene3dDisplayScene3ddisplay_scene_3d

Module

3D Metrology