4#ifndef _SCENEPIC_FRAME3D_H_
5#define _SCENEPIC_FRAME3D_H_
33 const std::vector<std::string>& mesh_ids,
34 const Transform& transform = Transform::Identity());
41 template<
typename MeshType>
43 const std::vector<std::shared_ptr<MeshType>>& meshes,
44 const Transform& transform = Transform::Identity())
46 std::vector<std::string> mesh_ids;
50 std::back_inserter(mesh_ids),
51 [](
const std::shared_ptr<MeshType>& mesh) { mesh->mesh_id(); });
60 const std::string& mesh_id,
61 const Transform& transform = Transform::Identity());
68 template<
typename MeshType>
70 const std::shared_ptr<MeshType>& mesh,
71 const Transform& transform = Transform::Identity())
80 void add_label(
const std::shared_ptr<Label>& label,
const Vector& position);
96 const std::map<std::string, LayerSettings> layer_settings);
129 const std::string& frame_id,
133 std::string m_frame_id;
136 std::vector<JsonValue> m_frame_commands;
137 std::map<std::string, LayerSettings> m_layer_settings;
A camera type.
Definition: camera.h:15
static Camera None()
A value indicating "no camera".
Represents a ScenePic Canvas3D - a 3D viewport that can contain a number of Frame3Ds.
Definition: canvas3d.h:26
3D focus point for this frame (with optional 3D rotation for orientation lock), used in the ScenePic ...
Definition: focus_point.h:16
static FocusPoint None()
A value indicating "no focus point".
Represents a frame of an animation which contains a number of transformed Mesh objects.
Definition: frame3d.h:26
const Camera & camera() const
The default camera parameters for this frame.
void add_mesh_by_id(const std::string &mesh_id, const Transform &transform=Transform::Identity())
Add a mesh to the frame.
void add_label(const std::shared_ptr< Label > &label, const Vector &position)
Add a label to the frame.
void add_meshes(const std::vector< std::shared_ptr< MeshType > > &meshes, const Transform &transform=Transform::Identity())
Add meshes to the frame.
Definition: frame3d.h:42
const FocusPoint & focus_point() const
The focus point of the frame.
void add_meshes_by_id(const std::vector< std::string > &mesh_ids, const Transform &transform=Transform::Identity())
Add meshes to the frame.
Frame3D & focus_point(const FocusPoint &focus_point)
Set the focus point of the frame.
Frame3D & camera(const Camera &camera)
Set the default camera parameters for this frame.
JsonValue to_json() const
Convert this object into ScenePic json.
void set_layer_settings(const std::map< std::string, LayerSettings > layer_settings)
Specify the visibilities and opacities of certain mesh layers.
std::string to_string() const
Return a JSON string representing the object.
void add_mesh(const std::shared_ptr< MeshType > &mesh, const Transform &transform=Transform::Identity())
Add a mesh to the frame.
Definition: frame3d.h:69
Representation of a JSON value according to the specification at https://www.json....
Definition: json_value.h:30
Definition: audio_track.h:14