Skip to content

add_scene_3d_cameraAddScene3dCameraAddScene3dCameraadd_scene_3d_cameraT_add_scene_3d_camera🔗

Short description🔗

add_scene_3d_cameraAddScene3dCameraAddScene3dCameraadd_scene_3d_cameraT_add_scene_3d_camera — Add a camera to a 3D scene.

Signature🔗

add_scene_3d_camera( scene_3d Scene3D, campar CameraParam, out integer CameraIndex )void AddScene3dCamera( const HTuple& Scene3D, const HTuple& CameraParam, HTuple* CameraIndex )static void HOperatorSet.AddScene3dCamera( HTuple scene3D, HTuple cameraParam, out HTuple cameraIndex )def add_scene_3d_camera( scene_3d: HHandle, camera_param: Sequence[Union[float, int, str]] ) -> int

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

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

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

int HCamPar.AddScene3dCamera( HScene3D scene3D )

int HScene3D.AddScene3dCamera( HCamPar cameraParam )

Description🔗

add_scene_3d_cameraAddScene3dCamera adds a new camera to the 3D scene Scene3Dscene3Dscene_3d and returns the index of this camera in CameraIndexcameraIndexcamera_index. The camera parameters of the camera must be given in CameraParamcameraParamcamera_param. By default the new camera is located at the origin of the world coordinate system. The pose of the camera CameraIndexcameraIndexcamera_index can be set with set_scene_3d_camera_poseSetScene3dCameraPose.

Attention🔗

Cameras with hypercentric lenses are not supported. For displaying large faces (or primitives) with a non-zero distortion in CameraParamcameraParamcamera_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🔗

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🔗

Scene3Dscene3Dscene_3d (input_control) scene_3d → (handle)HTuple (HHandle)HScene3D, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the 3D scene.

CameraParamcameraParamcamera_param (input_control) campar → (real / integer / string)HTuple (double / Hlong / HString)HCamPar, HTuple (double / int / long / string)Sequence[Union[float, int, str]]Htuple (double / Hlong / char*)

Parameters of the new camera.

CameraIndexcameraIndexcamera_index (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Index of the new camera in the 3D scene.

Result🔗

add_scene_3d_cameraAddScene3dCamera returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

create_scene_3dCreateScene3d

Possible successors

set_scene_3d_camera_poseSetScene3dCameraPose, display_scene_3dDisplayScene3d

Module🔗

3D Metrology