GaryHuan9 / Echo

An awesome ray traced 3D renderer build in C# from scratch!
MIT License
17 stars 3 forks source link

44 feature request optimizing and documenting the polygonfileformatreader #45

Closed ClemensU42 closed 2 years ago

ClemensU42 commented 2 years ago

What is the reason for this pull request?

44

What was added, removed or changed in this pull request? improved the loading times of the PolygonFileFormatReader and added documentation. Now able to load ~4M triangles in 1.9 - 2 seconds

Contributors @ClemensU42

ClemensU42 commented 2 years ago

I have now made the Triangle struct readonly and replaced the propertiesPositions dictionary in the Header struct with readonly ints and thus decreased the loading time for ~4M triangles from 1.9 - 2 seconds to ~1 second