4#ifndef _SCENEPIC_MESH_UPDATE_H_
5#define _SCENEPIC_MESH_UPDATE_H_
81 std::uint32_t keyframe_index,
82 float fixed_point_range,
83 const ConstVertexBufferRef& keyframe_vertex_buffer);
96 std::numeric_limits<FixedPointVertexBuffer::Scalar>::max();
113 const std::vector<ConstVertexBufferRef>& buffers,
114 const std::vector<VertexBufferType>& buffer_types,
117 std::string m_base_mesh_id;
118 std::string m_mesh_id;
119 VertexBuffer m_vertex_buffer;
120 FixedPointVertexBuffer m_fp_vertex_buffer;
123 std::uint32_t m_frame_index;
124 std::uint32_t m_keyframe_index;
Representation of a JSON value according to the specification at https://www.json....
Definition: json_value.h:30
Class which represents an update to an existing mesh in which only the vertex buffer is changed.
Definition: mesh_update.h:48
const std::string & base_mesh_id() const
The unique identifier of the original base mesh.
const std::string & mesh_id() const
The unique identifier of the newly updated mesh.
VertexBufferRef vertex_buffer()
The updated vertex buffer.
JsonValue to_json() const
Convert this object into ScenePic json.
bool is_quantized() const
Whether this update is quantized.
std::string to_string() const
Return a JSON string representing the object.
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.
static const std::size_t QuantizationBinCount
The number of quantization bins.
Definition: mesh_update.h:95
float difference_range(const ConstVertexBufferRef &vertex_buffer) const
The range of differences between this frame and the current keyframe.
std::uint32_t frame_index() const
The unique index of the frame or the index of its keyframe (if quantized).
VertexBuffer unquantize() const
Unquantize the buffer (for testing purposes)
Top level container representing an entire ScenePic.
Definition: scene.h:58
Definition: audio_track.h:14
VertexBufferType & operator|=(VertexBufferType &a, VertexBufferType b)
Definition: mesh_update.h:37
VertexBufferType operator&(VertexBufferType a, VertexBufferType b)
Definition: mesh_update.h:32
VertexBufferType operator|(VertexBufferType a, VertexBufferType b)
Definition: mesh_update.h:27
VertexBufferType
Flags indicating what aspect of the vertex buffer is updated.
Definition: mesh_update.h:19