<commit_before>#include "stdafx.h"
#include "model.h"

Model::Model()
{

}

Model::~Model()
{

}

void Model::LoadModelFromFBXFile(char* fileName)
{
	auto vertices = new vector<nshade::Vertex>();
	auto indices = new vector<unsigned int>();

	auto result = nshade::FbxReader::Read(fileName, vertices, indices);

	m_pVertices = shared_ptr<vector<nshade::Vertex>>(vertices);
	m_pIndices = shared_ptr<vector<unsigned int>>(indices);
	
	CreateBuffers();
}

void Model::LoadModelFromOBJFile(char* fileName, bool isRightHand)
{
	auto vertices = new vector<nshade::Vertex>();
	auto indices = new vector<unsigned int>();

	auto result = ObjParser::Parse(GetVertices(), GetIndices(), fileName);
	
	m_pVertices = shared_ptr<vector<nshade::Vertex>>(vertices);
	m_pIndices = shared_ptr<vector<unsigned int>>(indices);

	CreateBuffers();
}

void Model::AssignMaterial(Material* pMaterial)
{	
	m_pMaterial = shared_ptr<Material>(pMaterial);
}

void Model::CreateBuffers()
{
	// Check if Material		== null
	// Check if Shaders			== null
	// Check if VertexShader	== null
	// If null, assign standard shader
	GetMaterial()->Shaders->VertexShader->SetBuffers(m_pVertices, m_pIndices);
}<commit_msg>fixed compilation bug<commit_after>#include "stdafx.h"
#include "model.h"

Model::Model()
{

}

Model::~Model()
{

}

void Model::LoadModelFromFBXFile(char* fileName)
{
	auto vertices = new vector<nshade::Vertex>();
	auto indices = new vector<unsigned int>();

	auto result = nshade::FbxReader::Read(fileName, vertices, indices);

	m_pVertices = shared_ptr<vector<nshade::Vertex>>(vertices);
	m_pIndices = shared_ptr<vector<unsigned int>>(indices);
	
	CreateBuffers();
}

void Model::LoadModelFromOBJFile(char* fileName, bool isRightHand)
{
	auto vertices = new vector<nshade::Vertex>();
	auto indices = new vector<unsigned int>();

	auto result = ObjParser::Parse(GetVertices(), GetIndices(), fileName);
	
	m_pVertices = shared_ptr<vector<nshade::Vertex>>(vertices);
	m_pIndices = shared_ptr<vector<unsigned int>>(indices);

	CreateBuffers();
}

void Model::AssignMaterial(Material* pMaterial)
{	
	m_pMaterial = shared_ptr<Material>(pMaterial);
}

void Model::CreateBuffers()
{
	// Check if Material		== null
	// Check if Shaders			== null
	// Check if VertexShader	== null
	// If null, assign standard shader
	GetMaterial()->Shaders->VertexShader->SetBuffers(GetVertices(), GetIndices());
}
{'fraction_non_alphanumeric': 0.15092748735244518, 'fraction_numerical': 0.0, 'mean_word_length': 6.3467492260061915, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3668079', 'n_tokens_mistral': 811, 'n_tokens_neox': 803, 'n_words': 162}