Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Type which reads glTF files and merges a scene of the file into the scene graph. More...
#include <foray_modelconverter.hpp>
Classes | |
struct | IndexBindings |
Variables which determine how to map gltf-model indices to scene indices/pointers. More... | |
Public Member Functions | |
ModelConverter (scene::Scene *scene) | |
void | LoadGltfModel (osi::Utf8Path utf8Path, core::Context *context=nullptr, const ModelConverterOptions &options=ModelConverterOptions()) |
Loads glTF model and integrates it into the scene set in constructor. | |
![]() | |
NoMoveDefaults ()=default | |
NoMoveDefaults (const NoMoveDefaults &other)=delete | |
NoMoveDefaults (NoMoveDefaults &&other)=default | |
NoMoveDefaults & | operator= (const NoMoveDefaults &other)=delete |
Protected Member Functions | |
void | RecursivelyTranslateNodes (int32_t currentIndex, scene::Node *parent=nullptr) |
void | InitTransformFromGltf (scene::ncomp::Transform *transform, const std::vector< double > &matrix, const std::vector< double > &translation, const std::vector< double > &rotation, const std::vector< double > &scale) |
void | BuildGeometryBuffer () |
void | PushGltfMeshToBuffers (const tinygltf::Mesh &mesh, std::vector< scene::Primitive > &outprimitives) |
void | LoadTextures () |
void | LoadMaterials () |
void | LoadAnimations () |
void | TranslateAnimationSampler (scene::Animation &animation, const tinygltf::Animation &gltfAnimation, int32_t samplerIndex, const std::map< std::string_view, scene::EAnimationInterpolation > &interpolationMap, std::map< int, int > &samplerIndexMap) |
void | TranslateLight (scene::ncomp::PunctualLight *component, const tinygltf::Light &light) |
void | TranslateCamera (scene::ncomp::Camera *component, const tinygltf::Camera &camera) |
void | DetectAnimatedNodes () |
void | InitialUpdate () |
void | Reset () |
Static Protected Member Functions | |
static void | sTranslateSampler (const tinygltf::Sampler &tinygltfSampler, VkSamplerCreateInfo &outsamplerCI, bool &generateMipMaps) |
Protected Attributes | |
core::Context * | mContext = nullptr |
tinygltf::Model | mGltfModel = {} |
tinygltf::Scene * | mGltfScene = nullptr |
ModelConverterOptions | mOptions |
osi::Utf8Path | mUtf8Dir |
std::vector< scene::Vertex > * | mVertexBuffer = nullptr |
std::vector< uint32_t > * | mIndexBuffer = nullptr |
struct foray::gltf::ModelConverter::IndexBindings | mIndexBindings = {} |
int32_t | mNextMeshInstanceIndex = 0 |
scene::Scene * | mScene = nullptr |
scene::gcomp::MaterialManager & | mMaterialBuffer |
scene::gcomp::GeometryStore & | mGeo |
scene::gcomp::TextureManager & | mTextures |
bench::HostBenchmark | mBenchmark |
Type which reads glTF files and merges a scene of the file into the scene graph.
|
explicit |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void foray::gltf::ModelConverter::LoadGltfModel | ( | osi::Utf8Path | utf8Path, |
core::Context * | context = nullptr , |
||
const ModelConverterOptions & | options = ModelConverterOptions() |
||
) |
Loads glTF model and integrates it into the scene set in constructor.
utf8Path | Relative or absolute path to a .gltf or .glb file |
context | Set this to override use of the scene's context |
options | Set this to customize default behavior |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |