Commit 8495d8c4 by wester

timing

parent f105761f
...@@ -176,8 +176,9 @@ void AProceduralEntity::processNode(aiNode* node, const aiScene* scene) { ...@@ -176,8 +176,9 @@ void AProceduralEntity::processNode(aiNode* node, const aiScene* scene) {
UE_LOG(LogTemp, Warning, TEXT("Processing a node")); UE_LOG(LogTemp, Warning, TEXT("Processing a node"));
// process all the node's meshes // process all the node's meshes
for (uint32 i = 0; i < node->mNumMeshes; i++) { for (uint32 i = 0; i < node->mNumMeshes; i++) {
UE_LOG(LogTemp, Warning, TEXT("New mesh in the node"));
aiMesh* mesh = scene->mMeshes[node->mMeshes[i]]; aiMesh* mesh = scene->mMeshes[node->mMeshes[i]];
UE_LOG(LogTemp, Warning, TEXT("New mesh in the node %i"), mesh->mNumVertices);
_numVertecies += mesh->mNumVertices;
processMesh(mesh, scene); processMesh(mesh, scene);
++_meshCurrentlyProcessed; ++_meshCurrentlyProcessed;
} }
...@@ -207,7 +208,13 @@ void AProceduralEntity::loadModel(std::string path) { ...@@ -207,7 +208,13 @@ void AProceduralEntity::loadModel(std::string path) {
} }
double start = FPlatformTime::Seconds();
_numVertecies = 0;
_meshCurrentlyProcessed = 0; _meshCurrentlyProcessed = 0;
processNode(scene->mRootNode, scene); processNode(scene->mRootNode, scene);
double end = FPlatformTime::Seconds();
UE_LOG(LogTemp, Warning, TEXT("Final Number of Vertecies in Scene: %i in %f seconds"), _numVertecies, end - start);
} }
\ No newline at end of file
...@@ -43,6 +43,7 @@ private: ...@@ -43,6 +43,7 @@ private:
bool _addModifier; bool _addModifier;
int _lastModifiedTime; int _lastModifiedTime;
bool _requiresFullRecreation; bool _requiresFullRecreation;
unsigned int _numVertecies;
TArray<TArray<FVector>> _vertices; TArray<TArray<FVector>> _vertices;
TArray<TArray<int32>> _indices; TArray<TArray<int32>> _indices;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment