Merge branch 'main' into ImGui-V2

This commit is contained in:
2024-04-05 14:49:07 +02:00
49 changed files with 5607 additions and 101 deletions

View File

@@ -32,6 +32,8 @@ protected:
XMFLOAT3 position;
XMFLOAT2 texture;
XMFLOAT3 normal;
XMFLOAT3 tangent;
XMFLOAT3 binormal;
};
struct ModelType
@@ -39,6 +41,8 @@ protected:
float x, y, z;
float tu, tv;
float nx, ny, nz;
float tx, ty, tz;
float bx, by, bz;
};
struct Vertex {
@@ -53,6 +57,18 @@ protected:
float nx, ny, nz;
};
struct TempVertexType
{
float x, y, z;
float tu, tv;
float nx, ny, nz;
};
struct VectorType
{
float x, y, z;
};
struct Face {
int v1, v2, v3;
int t1, t2, t3;
@@ -64,7 +80,7 @@ public:
ModelClass(const ModelClass&);
~ModelClass();
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*, char*, char*);
bool Initialize(ID3D11Device*, ID3D11DeviceContext*, char*, char*, char*, char*);
void Shutdown();
void Render(ID3D11DeviceContext*);
@@ -75,12 +91,15 @@ private:
bool InitializeBuffers(ID3D11Device*);
void ShutdownBuffers();
void RenderBuffers(ID3D11DeviceContext*);
bool LoadTextures(ID3D11Device*, ID3D11DeviceContext*, char*, char*);
bool LoadTextures(ID3D11Device*, ID3D11DeviceContext*, char*, char*, char*);
void ReleaseTextures();
bool LoadModel(char*);
void ReleaseModel();
void CalculateModelVectors();
void CalculateTangentBinormal(TempVertexType, TempVertexType, TempVertexType, VectorType&, VectorType&);
private:
ID3D11Buffer* m_vertexBuffer, * m_indexBuffer;
int m_vertexCount, m_indexCount;