Added the camera class

Added the DDS Texture Loading for future use
Added the gamepad class for future use
Added first child method to the scenegraph
Added RGB to intensity and lerp methods to the shared methods class
Added the terrain node class with normals
Fixed issue with submeshnode not passing the world transform to the actual meshes
This commit is contained in:
iDunnoDev
2022-04-18 22:33:15 +01:00
committed by iDunnoDev
parent 65255f1321
commit 7a57c73ac3
47 changed files with 4323 additions and 91 deletions

View File

@ -1,10 +1,5 @@
#include "SplitMeshNode.h"
SplitMeshNode::SplitMeshNode(wstring name, wstring modelName)
{
_modelName = modelName;
}
bool SplitMeshNode::Initialise()
{
bool currentStatus = true;
@ -16,8 +11,8 @@ bool SplitMeshNode::Initialise()
currentStatus = false;
}
else
{
Add(AddMeshNode(_mesh->GetRootNode()));
{
Add(AddMeshNode(_mesh->GetRootNode()));
}
if (currentStatus)
@ -28,10 +23,10 @@ bool SplitMeshNode::Initialise()
return currentStatus;
}
SceneGraphPointer SplitMeshNode::AddMeshNode(shared_ptr<Node> node)
SceneNodePointer SplitMeshNode::AddMeshNode(shared_ptr<Node> node)
{
unsigned int subMeshCount = (unsigned int)node->GetMeshCount();
SceneGraphPointer currentNodeGraph = make_shared<SceneGraph>(node->GetName());
SceneNodePointer currentNodeGraph = make_shared<SceneGraph>(node->GetName());
/*string nameString;
for (char x : node->GetName())
@ -46,8 +41,7 @@ SceneGraphPointer SplitMeshNode::AddMeshNode(shared_ptr<Node> node)
{
unsigned int meshIndex = node->GetMesh(i);
shared_ptr<SubMesh> subMesh = _mesh->GetSubMesh(meshIndex);
shared_ptr<SubMeshNode> subNode = make_shared<SubMeshNode>(node->GetName() + L"_" + to_wstring(i), subMesh);
subNode->SetWorldTransform(XMMatrixIdentity());
shared_ptr<SubMeshNode> subNode = make_shared<SubMeshNode>(node->GetName() + L"_" + to_wstring(i), subMesh);
currentNodeGraph->Add(subNode);
}