PeriDyno 1.0.0
Loading...
Searching...
No Matches
vkglTF::Model Class Reference

#include <VulkanglTFModel.h>

Collaboration diagram for vkglTF::Model:

Classes

struct  Dimensions
 
struct  Indices
 
struct  Vertices
 

Public Member Functions

 Model ()
 
 ~Model ()
 
void loadNode (vkglTF::Node *parent, const tinygltf::Node &node, uint32_t nodeIndex, const tinygltf::Model &model, std::vector< uint32_t > &indexBuffer, std::vector< Vertex > &vertexBuffer, float globalscale)
 
void loadSkins (tinygltf::Model &gltfModel)
 
void loadImages (tinygltf::Model &gltfModel)
 
void loadMaterials (tinygltf::Model &gltfModel)
 
void loadAnimations (tinygltf::Model &gltfModel)
 
void loadFromFile (std::string filename, uint32_t fileLoadingFlags=vkglTF::FileLoadingFlags::None, float scale=1.0f)
 
void bindBuffers (VkCommandBuffer commandBuffer)
 
void drawNode (Node *node, VkCommandBuffer commandBuffer, uint32_t renderFlags=0, VkPipelineLayout pipelineLayout=VK_NULL_HANDLE, uint32_t bindImageSet=1)
 
void draw (VkCommandBuffer commandBuffer, uint32_t renderFlags=0, VkPipelineLayout pipelineLayout=VK_NULL_HANDLE, uint32_t bindImageSet=1)
 
void getNodeDimensions (Node *node, glm::vec3 &min, glm::vec3 &max)
 
void getSceneDimensions ()
 
void updateAnimation (uint32_t index, float time)
 
NodefindNode (Node *parent, uint32_t index)
 
NodenodeFromIndex (uint32_t index)
 
void prepareNodeDescriptor (vkglTF::Node *node, VkDescriptorSetLayout descriptorSetLayout)
 

Public Attributes

VkDescriptorPool descriptorPool
 
struct vkglTF::Model::Vertices vertices
 
struct vkglTF::Model::Indices indices
 
std::vector< Node * > nodes
 
std::vector< Node * > linearNodes
 
std::vector< Skin * > skins
 
std::vector< Texturetextures
 
std::vector< Materialmaterials
 
std::vector< Animationanimations
 
struct vkglTF::Model::Dimensions dimensions
 
bool metallicRoughnessWorkflow = true
 
bool buffersBound = false
 
std::string path
 

Protected Attributes

dyno::VkContextctx
 

Private Member Functions

vkglTF::TexturegetTexture (uint32_t index)
 
void createEmptyTexture (VkQueue transferQueue)
 

Private Attributes

vkglTF::Texture emptyTexture
 

Detailed Description

Definition at line 256 of file VulkanglTFModel.h.

Constructor & Destructor Documentation

◆ Model()

vkglTF::Model::Model ( )

Definition at line 738 of file VulkanglTFModel.cpp.

Here is the call graph for this function:

◆ ~Model()

vkglTF::Model::~Model ( )

Definition at line 750 of file VulkanglTFModel.cpp.

Member Function Documentation

◆ bindBuffers()

void vkglTF::Model::bindBuffers ( VkCommandBuffer commandBuffer)

Definition at line 1416 of file VulkanglTFModel.cpp.

◆ createEmptyTexture()

void vkglTF::Model::createEmptyTexture ( VkQueue transferQueue)
private

Definition at line 634 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw()

void vkglTF::Model::draw ( VkCommandBuffer commandBuffer,
uint32_t renderFlags = 0,
VkPipelineLayout pipelineLayout = VK_NULL_HANDLE,
uint32_t bindImageSet = 1 )

Definition at line 1452 of file VulkanglTFModel.cpp.

Here is the call graph for this function:

◆ drawNode()

void vkglTF::Model::drawNode ( Node * node,
VkCommandBuffer commandBuffer,
uint32_t renderFlags = 0,
VkPipelineLayout pipelineLayout = VK_NULL_HANDLE,
uint32_t bindImageSet = 1 )

Definition at line 1424 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findNode()

vkglTF::Node * vkglTF::Model::findNode ( Node * parent,
uint32_t index )

Definition at line 1555 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNodeDimensions()

void vkglTF::Model::getNodeDimensions ( Node * node,
glm::vec3 & min,
glm::vec3 & max )

Definition at line 1464 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSceneDimensions()

void vkglTF::Model::getSceneDimensions ( )

Definition at line 1483 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTexture()

vkglTF::Texture * vkglTF::Model::getTexture ( uint32_t index)
private

Definition at line 625 of file VulkanglTFModel.cpp.

Here is the caller graph for this function:

◆ loadAnimations()

void vkglTF::Model::loadAnimations ( tinygltf::Model & gltfModel)

Definition at line 1065 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromFile()

void vkglTF::Model::loadFromFile ( std::string filename,
uint32_t fileLoadingFlags = vkglTF::FileLoadingFlags::None,
float scale = 1.0f )

Definition at line 1177 of file VulkanglTFModel.cpp.

Here is the call graph for this function:

◆ loadImages()

void vkglTF::Model::loadImages ( tinygltf::Model & gltfModel)

Definition at line 1004 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadMaterials()

void vkglTF::Model::loadMaterials ( tinygltf::Model & gltfModel)

Definition at line 1015 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadNode()

void vkglTF::Model::loadNode ( vkglTF::Node * parent,
const tinygltf::Node & node,
uint32_t nodeIndex,
const tinygltf::Model & model,
std::vector< uint32_t > & indexBuffer,
std::vector< Vertex > & vertexBuffer,
float globalscale )

Definition at line 774 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadSkins()

void vkglTF::Model::loadSkins ( tinygltf::Model & gltfModel)

Definition at line 972 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nodeFromIndex()

vkglTF::Node * vkglTF::Model::nodeFromIndex ( uint32_t index)

Definition at line 1569 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepareNodeDescriptor()

void vkglTF::Model::prepareNodeDescriptor ( vkglTF::Node * node,
VkDescriptorSetLayout descriptorSetLayout )

Definition at line 1580 of file VulkanglTFModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateAnimation()

void vkglTF::Model::updateAnimation ( uint32_t index,
float time )

Definition at line 1495 of file VulkanglTFModel.cpp.

Member Data Documentation

◆ animations

std::vector<Animation> vkglTF::Model::animations

Definition at line 305 of file VulkanglTFModel.h.

◆ buffersBound

bool vkglTF::Model::buffersBound = false

Definition at line 316 of file VulkanglTFModel.h.

◆ ctx

dyno::VkContext* vkglTF::Model::ctx
protected

Definition at line 282 of file VulkanglTFModel.h.

◆ descriptorPool

VkDescriptorPool vkglTF::Model::descriptorPool

Definition at line 285 of file VulkanglTFModel.h.

◆ dimensions

struct vkglTF::Model::Dimensions vkglTF::Model::dimensions

◆ emptyTexture

vkglTF::Texture vkglTF::Model::emptyTexture
private

Definition at line 278 of file VulkanglTFModel.h.

◆ indices

struct vkglTF::Model::Indices vkglTF::Model::indices

◆ linearNodes

std::vector<Node*> vkglTF::Model::linearNodes

Definition at line 299 of file VulkanglTFModel.h.

◆ materials

std::vector<Material> vkglTF::Model::materials

Definition at line 304 of file VulkanglTFModel.h.

◆ metallicRoughnessWorkflow

bool vkglTF::Model::metallicRoughnessWorkflow = true

Definition at line 315 of file VulkanglTFModel.h.

◆ nodes

std::vector<Node*> vkglTF::Model::nodes

Definition at line 298 of file VulkanglTFModel.h.

◆ path

std::string vkglTF::Model::path

Definition at line 317 of file VulkanglTFModel.h.

◆ skins

std::vector<Skin*> vkglTF::Model::skins

Definition at line 301 of file VulkanglTFModel.h.

◆ textures

std::vector<Texture> vkglTF::Model::textures

Definition at line 303 of file VulkanglTFModel.h.

◆ vertices

struct vkglTF::Model::Vertices vkglTF::Model::vertices

The documentation for this class was generated from the following files: