Camera
Overview
Camera is a class in Aspose.Slides FOSS for C++.
Represents camera properties for 3D scene rendering.
This class provides 19 methods for working with Camera objects in C++ programs.
Available methods include: Camera, CameraPresetType, camera_type, ensure_camera, field_of_view_angle, get_camera, get_rotation, has_parent, init_internal, latitude, longitude, revolution, and 7 additional methods.
All public members are accessible to any C++ application after installing the Aspose.Slides FOSS for C++ package.
Properties: CameraPresetType.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
CameraPresetType | CameraPresetType | Read | Gets the camera preset type. |
Methods
| Signature | Description |
|---|---|
CameraPresetType() → CameraPresetType | Returns the current CameraPresetType of the camera |
Camera() | |
~Camera() | |
init_internal(scene3d_element: pugi::xml_node, save_callback: std::function<void()>) | Initialize XML-backed camera. |
get_camera() → pugi::xml_node | Get the element if it exists within the scene3d element. |
ensure_camera() → pugi::xml_node | Get or create the element with default preset “orthographicFront”. |
save() | Save changes via the save callback. |
has_parent() → bool | Returns true if this camera has been initialized with a parent XML element. |
camera_type() → CameraPresetType | Returns the camera preset type. |
set_camera_type(value: CameraPresetType) | Sets the camera preset type. |
field_of_view_angle() → float | Returns the field of view angle in degrees (0-180). |
set_field_of_view_angle(value: float) | Sets the field of view angle in degrees. |
zoom() → float | Returns the zoom factor as a percentage (default 100). |
set_zoom(value: float) | Sets the zoom factor as a percentage. |
set_rotation(lat: float, lon: float, rev: float) | Sets the rotation angles (latitude, longitude, revolution) in degrees. |
get_rotation() → std::array<float, 3> | Returns the rotation as {latitude, longitude, revolution} in degrees. |
latitude() → float | Returns the latitude component of the rotation. |
longitude() → float | Returns the longitude component of the rotation. |
revolution() → float | Returns the revolution component of the rotation. |