5#ifndef FLUTTER_IMPELLER_SCENE_IMPORTER_VERTICES_BUILDER_H_
6#define FLUTTER_IMPELLER_SCENE_IMPORTER_VERTICES_BUILDER_H_
12#include "impeller/scene/importer/scene_flatbuffers.h"
26 static std::unique_ptr<VerticesBuilder>
MakeSkinned();
49 Scalar(
const void*
source,
size_t byte_offset,
bool normalized)>;
76 const void* buffer_start,
77 size_t attribute_stride_bytes,
78 size_t attribute_count) = 0;
82 size_t destination_stride_bytes,
86 size_t attribute_stride_bytes,
87 size_t attribute_count);
123 const void* buffer_start,
124 size_t attribute_stride_bytes,
125 size_t attribute_count)
override;
128 std::vector<Vertex> vertices_;
157 const void* buffer_start,
158 size_t attribute_stride_bytes,
159 size_t attribute_count)
override;
162 std::vector<Vertex> vertices_;
virtual ~SkinnedVerticesBuilder() override
void WriteFBVertices(fb::MeshPrimitiveT &primitive) const override
void SetAttributeFromBuffer(AttributeType attribute, ComponentType component_type, const void *buffer_start, size_t attribute_stride_bytes, size_t attribute_count) override
void SetAttributeFromBuffer(AttributeType attribute, ComponentType component_type, const void *buffer_start, size_t attribute_stride_bytes, size_t attribute_count) override
virtual ~UnskinnedVerticesBuilder() override
UnskinnedVerticesBuilder()
void WriteFBVertices(fb::MeshPrimitiveT &primitive) const override
virtual ~VerticesBuilder()
std::function< Scalar(const void *source, size_t byte_offset, bool normalized)> ComponentConverter
virtual void SetAttributeFromBuffer(AttributeType attribute, ComponentType component_type, const void *buffer_start, size_t attribute_stride_bytes, size_t attribute_count)=0
static std::unique_ptr< VerticesBuilder > MakeUnskinned()
static std::unique_ptr< VerticesBuilder > MakeSkinned()
static void WriteAttribute(void *destination, size_t destination_stride_bytes, AttributeType attribute, ComponentType component_type, const void *source, size_t attribute_stride_bytes, size_t attribute_count)
std::function< void(Scalar *destination, const void *source, const ComponentProperties &component_props, const AttributeProperties &attribute_props)> AttributeWriter
virtual void WriteFBVertices(fb::MeshPrimitiveT &primitive) const =0
@ kNormal
Default priority level.
Dart_NativeFunction function
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>
static constexpr Color White()
UnskinnedVerticesBuilder::Vertex vertex
AttributeWriter write_proc
ComponentConverter convert_proc