Rename gltf file class
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
namespace Inferno {
|
||||
|
||||
std::pair<std::shared_ptr<char[]>, std::shared_ptr<char[]>> GlTFFile::read(const std::string& path)
|
||||
std::pair<std::shared_ptr<char[]>, std::shared_ptr<char[]>> GltfFile::read(const std::string& path)
|
||||
{
|
||||
std::string extension = path.substr(path.find_first_of("."));
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Inferno {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<std::shared_ptr<char[]>, std::shared_ptr<char[]>> GlTFFile::glb(const std::string& path)
|
||||
std::pair<std::shared_ptr<char[]>, std::shared_ptr<char[]>> GltfFile::glb(const std::string& path)
|
||||
{
|
||||
// Create input stream object and open file
|
||||
std::ifstream glb(path, std::ios::in | std::ios::binary);
|
||||
@@ -73,7 +73,7 @@ namespace Inferno {
|
||||
return { jsonChunk.first, binaryChunk.first };
|
||||
}
|
||||
|
||||
std::pair<std::shared_ptr<char[]>, uint32_t> GlTFFile::readChunk(std::ifstream& ifstream, uint32_t offset, uint32_t type)
|
||||
std::pair<std::shared_ptr<char[]>, uint32_t> GltfFile::readChunk(std::ifstream& ifstream, uint32_t offset, uint32_t type)
|
||||
{
|
||||
constexpr uint32_t size = 4;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace Inferno {
|
||||
|
||||
class GlTFFile {
|
||||
class GltfFile {
|
||||
public:
|
||||
static std::pair<std::shared_ptr<char[]>, std::shared_ptr<char[]>> read(const std::string& path);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Inferno {
|
||||
Gltf::Gltf(const std::string& path)
|
||||
: m_path(path)
|
||||
{
|
||||
auto gltf = GlTFFile::read(path);
|
||||
auto gltf = GltfFile::read(path);
|
||||
ASSERT(gltf.first && gltf.second, "GlTF model was incomplete '{}'", path);
|
||||
|
||||
json json = json::parse(gltf.first.get());
|
||||
|
||||
Reference in New Issue
Block a user