create_scene_3d — 创建可视化三维对象集合所需的数据结构。
create_scene_3d( : : : Scene3D)
create_scene_3d creates a new 3D scene and returns it in
Scene3D。
A 3D scene is a collection of instances of 3D object models, cameras, and
light sources. Use the operators add_scene_3d_instance,
add_scene_3d_camera, and add_scene_3d_light to add these
objects to Scene3D. Use display_scene_3d to display a
3D scene in a window.
A pose is associated (with add_scene_3d_instance or
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 set_scene_3d_camera_pose and
defines the camera coordinate system CCS.
Parameters influencing the whole scene such as the quality of the
rendering can be set with set_scene_3d_param。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
Scene3D (输出控制) scene_3d → (handle)
3D 场景的句柄。
* 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。如有必要,则抛出异常。
add_scene_3d_instance,
add_scene_3d_light,
add_scene_3d_camera,
set_scene_3d_param
三维计量