|
scenepic 1.1.0
3D Visualization Made Easy
|
Class which represents an update to an existing mesh in which only the vertex buffer is changed. More...
#include <mesh_update.h>
Public Member Functions | |
| const std::string & | base_mesh_id () const |
| The unique identifier of the original base mesh. More... | |
| const std::string & | mesh_id () const |
| The unique identifier of the newly updated mesh. More... | |
| VertexBufferRef | vertex_buffer () |
| The updated vertex buffer. 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... | |
| std::uint32_t | frame_index () const |
| The unique index of the frame or the index of its keyframe (if quantized). More... | |
| bool | is_quantized () const |
| Whether this update is quantized. More... | |
| void | quantize (std::uint32_t keyframe_index, float fixed_point_range, const ConstVertexBufferRef &keyframe_vertex_buffer) |
| Quantize the mesh update in reference to a keyframe. More... | |
| VertexBuffer | unquantize () const |
| Unquantize the buffer (for testing purposes) More... | |
| float | difference_range (const ConstVertexBufferRef &vertex_buffer) const |
| The range of differences between this frame and the current keyframe. More... | |
Static Public Attributes | |
| static const std::size_t | QuantizationBinCount |
| The number of quantization bins. More... | |
Friends | |
| class | Scene |
Class which represents an update to an existing mesh in which only the vertex buffer is changed.
By only updating a mesh the ScenePic file can become smaller, due to only needing to store the vertex buffer instead of the full mesh topology.
| const std::string & scenepic::MeshUpdate::base_mesh_id | ( | ) | const |
The unique identifier of the original base mesh.
| float scenepic::MeshUpdate::difference_range | ( | const ConstVertexBufferRef & | vertex_buffer | ) | const |
The range of differences between this frame and the current keyframe.
| vertex_buffer | the keyframe vertex buffer |
| std::uint32_t scenepic::MeshUpdate::frame_index | ( | ) | const |
The unique index of the frame or the index of its keyframe (if quantized).
| bool scenepic::MeshUpdate::is_quantized | ( | ) | const |
Whether this update is quantized.
| const std::string & scenepic::MeshUpdate::mesh_id | ( | ) | const |
The unique identifier of the newly updated mesh.
| void scenepic::MeshUpdate::quantize | ( | std::uint32_t | keyframe_index, |
| float | fixed_point_range, | ||
| const ConstVertexBufferRef & | keyframe_vertex_buffer | ||
| ) |
Quantize the mesh update in reference to a keyframe.
| keyframe_index | the index of the keyframe |
| fixed_point_range | the range to use for the fixed point representation |
| keyframe_vertex_buffer | the keyframe vertex buffer |
| JsonValue scenepic::MeshUpdate::to_json | ( | ) | const |
Convert this object into ScenePic json.
| std::string scenepic::MeshUpdate::to_string | ( | ) | const |
Return a JSON string representing the object.
| VertexBuffer scenepic::MeshUpdate::unquantize | ( | ) | const |
Unquantize the buffer (for testing purposes)
| VertexBufferRef scenepic::MeshUpdate::vertex_buffer | ( | ) |
The updated vertex buffer.
|
friend |
|
static |
The number of quantization bins.