ClassesClassesClassesClasses | | | | Operators

create_scene_3dcreate_scene_3dCreateScene3dcreate_scene_3dCreateScene3dCreateScene3d (Operator)

Name

create_scene_3dcreate_scene_3dCreateScene3dcreate_scene_3dCreateScene3dCreateScene3d — Create the data structure that is needed to visualize collections of 3D objects.

Signature

create_scene_3d( : : : Scene3D)

Herror create_scene_3d(Hlong* Scene3D)

Herror T_create_scene_3d(Htuple* Scene3D)

Herror create_scene_3d(Hlong* Scene3D)

void HScene3D::CreateScene3d()

void CreateScene3d(HTuple* Scene3D)

void HScene3D::HScene3D()

void HScene3D::CreateScene3d()

void HOperatorSetX.CreateScene3d([out] VARIANT* Scene3D)

void HScene3DX.CreateScene3d()

static void HOperatorSet.CreateScene3d(out HTuple scene3D)

public HScene3D()

void HScene3D.CreateScene3d()

Description

create_scene_3dcreate_scene_3dCreateScene3dcreate_scene_3dCreateScene3dCreateScene3d creates a new 3D scene and returns it in Scene3DScene3DScene3DScene3DScene3Dscene3D.

A 3D scene is a collection of instances of 3D object models, cameras, and light sources. Use the operators add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstance, add_scene_3d_cameraadd_scene_3d_cameraAddScene3dCameraadd_scene_3d_cameraAddScene3dCameraAddScene3dCamera, and add_scene_3d_lightadd_scene_3d_lightAddScene3dLightadd_scene_3d_lightAddScene3dLightAddScene3dLight to add these objects to Scene3DScene3DScene3DScene3DScene3Dscene3D. Use display_scene_3ddisplay_scene_3dDisplayScene3ddisplay_scene_3dDisplayScene3dDisplayScene3d to display a 3D scene in a window.

A pose is associated (with add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstance or set_scene_3d_instance_poseset_scene_3d_instance_poseSetScene3dInstancePoseset_scene_3d_instance_poseSetScene3dInstancePoseSetScene3dInstancePose) to each instance in the Scene, which represents the instance's position within the scene coordinate system SCS. The pose of the scene in the world coordinate system WCS can be set with set_scene_3d_to_world_poseset_scene_3d_to_world_poseSetScene3dToWorldPoseset_scene_3d_to_world_poseSetScene3dToWorldPoseSetScene3dToWorldPose. The pose of the camera in the world coordinate system can be set with set_scene_3d_camera_poseset_scene_3d_camera_poseSetScene3dCameraPoseset_scene_3d_camera_poseSetScene3dCameraPoseSetScene3dCameraPose and defines the camera coordinate system CCS.

WCS SCS CCS
The coordinate systems in a 3D scene

Parameters influencing the whole scene such as the quality of the rendering can be set with set_scene_3d_paramset_scene_3d_paramSetScene3dParamset_scene_3d_paramSetScene3dParamSetScene3dParam.

Parallelization

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

Scene3DScene3DScene3DScene3DScene3Dscene3D (output_control)  scene_3d HScene3D, HTupleHTupleHScene3D, HTupleHScene3DX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the 3D scene.

Example (HDevelop)

  * Create a new scene
  create_scene_3d (Scene)
  * A scene needs at least one camera. The default pose
  * of a camera is located at the origin. The pose can be
  * changed with set_scene_3d_camera_pose.
  add_scene_3d_camera (Scene, CameraParam, CameraIndex)
  * Further a scene needs at least one light.
  add_scene_3d_light (Scene, [42.0, 42.0, 42.0], 'point_light', LightIndex)
  *
  * To add an object, add_scene_3d_instance is called with a 
  * 3d object model and a pose. add_scene_3d returns an InstanceIndex
  * which must be used to reference this instance in subsequent calls.
  add_scene_3d_instance (Scene, ObjectModel3D, Pose, InstanceIndex)
  * Set its color.
  set_scene_3d_instance_param (Scene, InstanceIndex, 'color', 'green')
  * Display the scene.
  display_scene_3d (WindowHandle, Scene, CameraIndex)
  * Cleanup.
  clear_scene_3d (Scene)

Result

create_scene_3dcreate_scene_3dCreateScene3dcreate_scene_3dCreateScene3dCreateScene3d returns 2 (H_MSG_TRUE) if the scene could be created successfully. If necessary, an exception is raised.

Possible Successors

add_scene_3d_instanceadd_scene_3d_instanceAddScene3dInstanceadd_scene_3d_instanceAddScene3dInstanceAddScene3dInstance, add_scene_3d_lightadd_scene_3d_lightAddScene3dLightadd_scene_3d_lightAddScene3dLightAddScene3dLight, add_scene_3d_cameraadd_scene_3d_cameraAddScene3dCameraadd_scene_3d_cameraAddScene3dCameraAddScene3dCamera, set_scene_3d_paramset_scene_3d_paramSetScene3dParamset_scene_3d_paramSetScene3dParamSetScene3dParam

See also

clear_scene_3dclear_scene_3dClearScene3dclear_scene_3dClearScene3dClearScene3d

Module

3D Metrology


ClassesClassesClassesClasses | | | | Operators