Namespaces | |
testing | |
Classes | |
class | SkinnedVerticesBuilder |
struct | Switches |
class | UnskinnedVerticesBuilder |
class | VerticesBuilder |
Enumerations | |
enum | SourceType { SourceType::kUnknown, SourceType::kGLTF } |
Functions | |
Matrix | ToMatrix (const std::vector< double > &m) |
Matrix | ToMatrix (const fb::Matrix &m) |
Vector2 | ToVector2 (const fb::Vec2 &v) |
Vector3 | ToVector3 (const fb::Vec3 &v) |
Vector4 | ToVector4 (const fb::Vec4 &v) |
Color | ToColor (const fb::Color &c) |
fb::Matrix | ToFBMatrix (const Matrix &m) |
std::unique_ptr< fb::Matrix > | ToFBMatrixUniquePtr (const Matrix &m) |
fb::Vec2 | ToFBVec2 (const Vector2 v) |
fb::Vec3 | ToFBVec3 (const Vector3 v) |
fb::Vec4 | ToFBVec4 (const Vector4 v) |
fb::Color | ToFBColor (const Color c) |
std::unique_ptr< fb::Color > | ToFBColor (const std::vector< double > &c) |
bool | ParseGLTF (const fml::Mapping &source_mapping, fb::SceneT &out_scene) |
static bool | WithinRange (int index, size_t size) |
static bool | MeshPrimitiveIsSkinned (const tinygltf::Primitive &primitive) |
static void | ProcessMaterial (const tinygltf::Model &gltf, const tinygltf::Material &in_material, fb::MaterialT &out_material) |
static bool | ProcessMeshPrimitive (const tinygltf::Model &gltf, const tinygltf::Primitive &primitive, fb::MeshPrimitiveT &mesh_primitive) |
static void | ProcessNode (const tinygltf::Model &gltf, const tinygltf::Node &in_node, fb::NodeT &out_node) |
static void | ProcessTexture (const tinygltf::Model &gltf, const tinygltf::Texture &in_texture, fb::TextureT &out_texture) |
static void | ProcessAnimation (const tinygltf::Model &gltf, const tinygltf::Animation &in_animation, fb::AnimationT &out_animation) |
static bool | SetPermissiveAccess (const std::filesystem::path &p) |
bool | Main (const fml::CommandLine &command_line) |
static SourceType | SourceTypeFromCommandLine (const fml::CommandLine &command_line) |
template<typename SourceType > | |
static Scalar | ToScalar (const void *source, size_t index, bool normalized) |
Reads a numeric component from source and returns a 32bit float. If normalized is true , signed SourceTypes convert to a range of -1 to 1, and unsigned SourceTypes convert to a range of 0 to 1. More... | |
static void | PassthroughAttributeWriter (Scalar *destination, const void *source, const VerticesBuilder::ComponentProperties &component, const VerticesBuilder::AttributeProperties &attribute) |
A ComponentWriter which simply converts all of an attribute's components to normalized scalar form. More... | |
static void | JointsAttributeWriter (Scalar *destination, const void *source, const VerticesBuilder::ComponentProperties &component, const VerticesBuilder::AttributeProperties &attribute) |
A ComponentWriter which converts four vertex indices to scalars. More... | |
Variables | |
static const std::map< std::string, VerticesBuilder::AttributeType > | kAttributes |
static const std::map< std::string, SourceType > | kKnownSourceTypes |
static std::map< VerticesBuilder::ComponentType, VerticesBuilder::ComponentProperties > | kComponentTypes |
|
strong |
|
static |
A ComponentWriter which converts four vertex indices to scalars.
Definition at line 70 of file vertices_builder.cc.
References impeller::scene::importer::VerticesBuilder::AttributeProperties::component_count, and impeller::scene::importer::VerticesBuilder::ComponentProperties::convert_proc.
bool impeller::scene::importer::Main | ( | const fml::CommandLine & | command_line | ) |
Definition at line 41 of file scenec_main.cc.
References impeller::scene::importer::Switches::AreValid(), impeller::scene::importer::Switches::input_type, kGLTF, kUnknown, impeller::scene::importer::Switches::output_file_name, ParseGLTF(), impeller::scene::importer::Switches::PrintHelp(), SetPermissiveAccess(), impeller::scene::importer::Switches::source_file_name, impeller::compiler::Utf8FromPath(), and impeller::scene::importer::Switches::working_directory.
Referenced by main().
|
static |
bool impeller::scene::importer::ParseGLTF | ( | const fml::Mapping & | source_mapping, |
fb::SceneT & | out_scene | ||
) |
Definition at line 450 of file importer_gltf.cc.
References impeller::Matrix::MakeScale(), ProcessAnimation(), ProcessNode(), ProcessTexture(), and ToFBMatrixUniquePtr().
Referenced by Main(), and impeller::scene::importer::testing::TEST().
|
static |
A ComponentWriter which simply converts all of an attribute's components to normalized scalar form.
Definition at line 55 of file vertices_builder.cc.
References impeller::scene::importer::VerticesBuilder::AttributeProperties::component_count, impeller::scene::importer::VerticesBuilder::ComponentProperties::convert_proc, and impeller::scene::importer::VerticesBuilder::AttributeProperties::size_bytes.
|
static |
Keyframe times.
Keyframe values.
Definition at line 316 of file importer_gltf.cc.
Referenced by ParseGLTF().
|
static |
Definition at line 44 of file importer_gltf.cc.
References ToFBColor().
Referenced by ProcessMeshPrimitive().
|
static |
Indices.
Definition at line 63 of file importer_gltf.cc.
References kAttributes, impeller::scene::importer::VerticesBuilder::kFloat, impeller::scene::importer::VerticesBuilder::kJoints, impeller::scene::importer::VerticesBuilder::kSignedByte, impeller::scene::importer::VerticesBuilder::kSignedInt, impeller::scene::importer::VerticesBuilder::kSignedShort, impeller::scene::importer::VerticesBuilder::kUnsignedByte, impeller::scene::importer::VerticesBuilder::kUnsignedInt, impeller::scene::importer::VerticesBuilder::kUnsignedShort, impeller::scene::importer::VerticesBuilder::kWeights, impeller::scene::importer::VerticesBuilder::MakeSkinned(), impeller::scene::importer::VerticesBuilder::MakeUnskinned(), MeshPrimitiveIsSkinned(), ProcessMaterial(), and WithinRange().
Referenced by ProcessNode().
|
static |
Transform.
Static meshes.
Skin.
Definition at line 192 of file importer_gltf.cc.
References impeller::Matrix::IsIdentity(), impeller::Matrix::MakeRotation(), impeller::Matrix::MakeScale(), impeller::Matrix::MakeTranslation(), ProcessMeshPrimitive(), ToFBMatrix(), ToFBMatrixUniquePtr(), ToMatrix(), and WithinRange().
Referenced by ParseGLTF().
|
static |
Definition at line 278 of file importer_gltf.cc.
References WithinRange().
Referenced by ParseGLTF().
|
static |
|
static |
Color impeller::scene::importer::ToColor | ( | const fb::Color & | c | ) |
Definition at line 46 of file conversions.cc.
Referenced by impeller::scene::UnlitMaterial::MakeFromFlatbuffer(), impeller::scene::PhysicallyBasedMaterial::MakeFromFlatbuffer(), and impeller::scene::importer::testing::TEST().
fb::Color impeller::scene::importer::ToFBColor | ( | const Color | c | ) |
Definition at line 82 of file conversions.cc.
References impeller::Color::alpha, impeller::Color::blue, impeller::Color::green, and impeller::Color::red.
Referenced by ProcessMaterial(), impeller::scene::importer::UnskinnedVerticesBuilder::WriteFBVertices(), and impeller::scene::importer::SkinnedVerticesBuilder::WriteFBVertices().
std::unique_ptr< fb::Color > impeller::scene::importer::ToFBColor | ( | const std::vector< double > & | c | ) |
Definition at line 86 of file conversions.cc.
fb::Matrix impeller::scene::importer::ToFBMatrix | ( | const Matrix & | m | ) |
Impeller -> Flatbuffers
Definition at line 54 of file conversions.cc.
References impeller::Matrix::m.
Referenced by ProcessNode().
std::unique_ptr< fb::Matrix > impeller::scene::importer::ToFBMatrixUniquePtr | ( | const Matrix & | m | ) |
Definition at line 62 of file conversions.cc.
References impeller::Matrix::m.
Referenced by ParseGLTF(), and ProcessNode().
fb::Vec2 impeller::scene::importer::ToFBVec2 | ( | const Vector2 | v | ) |
Definition at line 70 of file conversions.cc.
References impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
Referenced by impeller::scene::importer::UnskinnedVerticesBuilder::WriteFBVertices(), and impeller::scene::importer::SkinnedVerticesBuilder::WriteFBVertices().
fb::Vec3 impeller::scene::importer::ToFBVec3 | ( | const Vector3 | v | ) |
Definition at line 74 of file conversions.cc.
References impeller::Vector3::x, impeller::Vector3::y, and impeller::Vector3::z.
Referenced by impeller::scene::importer::UnskinnedVerticesBuilder::WriteFBVertices(), and impeller::scene::importer::SkinnedVerticesBuilder::WriteFBVertices().
fb::Vec4 impeller::scene::importer::ToFBVec4 | ( | const Vector4 | v | ) |
Definition at line 78 of file conversions.cc.
References impeller::Vector4::w, impeller::Vector4::x, impeller::Vector4::y, and impeller::Vector4::z.
Referenced by impeller::scene::importer::UnskinnedVerticesBuilder::WriteFBVertices(), and impeller::scene::importer::SkinnedVerticesBuilder::WriteFBVertices().
Matrix impeller::scene::importer::ToMatrix | ( | const fb::Matrix & | m | ) |
Flatbuffers -> Impeller
Definition at line 26 of file conversions.cc.
References impeller::Matrix::m.
Matrix impeller::scene::importer::ToMatrix | ( | const std::vector< double > & | m | ) |
Definition at line 15 of file conversions.cc.
Referenced by impeller::scene::Skin::MakeFromFlatbuffer(), impeller::scene::Node::MakeFromFlatbuffer(), ProcessNode(), and impeller::scene::importer::testing::TEST().
|
static |
Reads a numeric component from source
and returns a 32bit float. If normalized
is true
, signed SourceTypes convert to a range of -1 to 1, and unsigned SourceTypes convert to a range of 0 to 1.
Definition at line 41 of file vertices_builder.cc.
Vector2 impeller::scene::importer::ToVector2 | ( | const fb::Vec2 & | v | ) |
Definition at line 34 of file conversions.cc.
Referenced by impeller::scene::importer::testing::TEST().
Vector3 impeller::scene::importer::ToVector3 | ( | const fb::Vec3 & | v | ) |
Definition at line 38 of file conversions.cc.
Referenced by impeller::scene::importer::testing::TEST().
Vector4 impeller::scene::importer::ToVector4 | ( | const fb::Vec4 & | v | ) |
Definition at line 42 of file conversions.cc.
Referenced by impeller::scene::importer::testing::TEST().
|
static |
Definition at line 35 of file importer_gltf.cc.
Referenced by ProcessMeshPrimitive(), ProcessNode(), and ProcessTexture().
|
static |
Definition at line 26 of file importer_gltf.cc.
Referenced by ProcessMeshPrimitive().
|
static |
Definition at line 123 of file vertices_builder.cc.
Referenced by impeller::scene::importer::VerticesBuilder::WriteAttribute().
|
static |
Definition at line 20 of file switches.cc.
Referenced by impeller::scene::importer::Switches::PrintHelp(), and SourceTypeFromCommandLine().