create_scene_3d — Create the data structure that is needed to visualize collections of
create_scene_3d( : : : Scene3D)
create_scene_3d creates a new 3D scene and returns it in
A 3D scene is a collection of instances of 3D object models, cameras, and
light sources. Use the operators
add_scene_3d_light to add these
display_scene_3d to display a
3D scene in a window.
A pose is associated (with
set_scene_3d_instance_pose) 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_pose. The pose of the camera in the
world coordinate system can be set with
defines the camera coordinate system CCS.
Parameters influencing the whole scene such as the quality of the
rendering can be set with
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.
Handle of the 3D scene.
* 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) clear_scene_3d (Scene)
create_scene_3d returns 2 (H_MSG_TRUE) if the scene could be created
successfully. If necessary, an exception is raised.