22 if (
mesh.geometry ==
nullptr) {
25 if (
mesh.material ==
nullptr) {
29 primitives_.push_back(std::move(
mesh));
38 const std::shared_ptr<Texture>& joints)
const {
39 for (
const auto&
mesh : primitives_) {
40 mesh.geometry->SetJointsTexture(joints);
42 .label =
"Mesh Primitive",
44 .geometry =
mesh.geometry.get(),
45 .material =
mesh.material.get(),
bool Render(SceneEncoder &encoder, const Matrix &transform, const std::shared_ptr< Texture > &joints) const
std::vector< Primitive > & GetPrimitives()
void AddPrimitive(Primitive mesh_)
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
A 4x4 matrix using column-major storage.