Represents a frame of an animation which contains a number of transformed Mesh objects.
More...
#include <frame3d.h>
|
void | add_meshes_by_id (const std::vector< std::string > &mesh_ids, const Transform &transform=Transform::Identity()) |
| Add meshes to the frame. More...
|
|
template<typename MeshType > |
void | add_meshes (const std::vector< std::shared_ptr< MeshType > > &meshes, const Transform &transform=Transform::Identity()) |
| Add meshes to the frame. More...
|
|
void | add_mesh_by_id (const std::string &mesh_id, const Transform &transform=Transform::Identity()) |
| Add a mesh to the frame. More...
|
|
template<typename MeshType > |
void | add_mesh (const std::shared_ptr< MeshType > &mesh, const Transform &transform=Transform::Identity()) |
| Add a mesh to the frame. More...
|
|
void | add_label (const std::shared_ptr< Label > &label, const Vector &position) |
| Add a label to the frame. More...
|
|
void | set_layer_settings (const std::map< std::string, LayerSettings > layer_settings) |
| Specify the visibilities and opacities of certain mesh layers. More...
|
|
const Camera & | camera () const |
| The default camera parameters for this frame. More...
|
|
Frame3D & | camera (const Camera &camera) |
| Set the default camera parameters for this frame. More...
|
|
const FocusPoint & | focus_point () const |
| The focus point of the frame. More...
|
|
Frame3D & | focus_point (const FocusPoint &focus_point) |
| Set the focus point of the frame. More...
|
|
std::string | to_string () const |
| Return a JSON string representing the object. More...
|
|
JsonValue | to_json () const |
| Convert this object into ScenePic json. More...
|
|
Represents a frame of an animation which contains a number of transformed Mesh objects.
◆ add_label()
void scenepic::Frame3D::add_label |
( |
const std::shared_ptr< Label > & |
label, |
|
|
const Vector & |
position |
|
) |
| |
Add a label to the frame.
- Parameters
-
label | the label to add |
position | the position at which to put the label |
◆ add_mesh()
template<typename MeshType >
void scenepic::Frame3D::add_mesh |
( |
const std::shared_ptr< MeshType > & |
mesh, |
|
|
const Transform & |
transform = Transform::Identity() |
|
) |
| |
|
inline |
Add a mesh to the frame.
- Parameters
-
mesh | the mesh to add |
transform | an optional transform applied to the mesh |
- Template Parameters
-
MeshType | a type with a mesh_id method. |
◆ add_mesh_by_id()
void scenepic::Frame3D::add_mesh_by_id |
( |
const std::string & |
mesh_id, |
|
|
const Transform & |
transform = Transform::Identity() |
|
) |
| |
Add a mesh to the frame.
- Parameters
-
mesh_id | the id of the mesh to add |
transform | an optional transform applied to the mesh |
◆ add_meshes()
template<typename MeshType >
void scenepic::Frame3D::add_meshes |
( |
const std::vector< std::shared_ptr< MeshType > > & |
meshes, |
|
|
const Transform & |
transform = Transform::Identity() |
|
) |
| |
|
inline |
Add meshes to the frame.
- Parameters
-
meshes | the meshes to add |
transform | an optional transform applied to all the meshes |
- Template Parameters
-
MeshType | a type with a mesh_id method. |
◆ add_meshes_by_id()
void scenepic::Frame3D::add_meshes_by_id |
( |
const std::vector< std::string > & |
mesh_ids, |
|
|
const Transform & |
transform = Transform::Identity() |
|
) |
| |
Add meshes to the frame.
- Parameters
-
mesh_ids | the ids of the meshes to add |
transform | an optional transform applied to all the meshes |
◆ camera() [1/2]
const Camera & scenepic::Frame3D::camera |
( |
| ) |
const |
The default camera parameters for this frame.
◆ camera() [2/2]
Set the default camera parameters for this frame.
- Parameters
-
camera | the camera parameters |
◆ focus_point() [1/2]
const FocusPoint & scenepic::Frame3D::focus_point |
( |
| ) |
const |
The focus point of the frame.
◆ focus_point() [2/2]
Set the focus point of the frame.
◆ set_layer_settings()
void scenepic::Frame3D::set_layer_settings |
( |
const std::map< std::string, LayerSettings > |
layer_settings | ) |
|
Specify the visibilities and opacities of certain mesh layers.
Each Mesh object can optionally be part of a user-identified layer (see Mesh constructor). Calling set_layer_settings will result in an additional drop-down selector in the ScenePic user interface. Currently, opacity is only guaranteed to be correct for Meshes that do not overlap. If you know one mesh should be rendered before another for opacity purposes, use the renderOrder setting: low numbers will be drawn before high numbers, and layers with no renderOrder set will be drawn first. Meshes without layer ids, or with layer ids that are not specified in this dictionary, will be drawn filled, without wireframe, at opacity 1.0, and before any layers with renderOrder set.
◆ to_json()
JsonValue scenepic::Frame3D::to_json |
( |
| ) |
const |
Convert this object into ScenePic json.
- Returns
- a json value
◆ to_string()
std::string scenepic::Frame3D::to_string |
( |
| ) |
const |
Return a JSON string representing the object.
◆ Canvas3D
The documentation for this class was generated from the following file: