Commit 8495d8c4 by wester

timing

parent f105761f
......@@ -176,8 +176,9 @@ void AProceduralEntity::processNode(aiNode* node, const aiScene* scene) {
UE_LOG(LogTemp, Warning, TEXT("Processing a node"));
// process all the node's meshes
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]];
UE_LOG(LogTemp, Warning, TEXT("New mesh in the node %i"), mesh->mNumVertices);
_numVertecies += mesh->mNumVertices;
processMesh(mesh, scene);
++_meshCurrentlyProcessed;
}
......@@ -207,7 +208,13 @@ void AProceduralEntity::loadModel(std::string path) {
}
double start = FPlatformTime::Seconds();
_numVertecies = 0;
_meshCurrentlyProcessed = 0;
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:
bool _addModifier;
int _lastModifiedTime;
bool _requiresFullRecreation;
unsigned int _numVertecies;
TArray<TArray<FVector>> _vertices;
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