Code Monkey home page Code Monkey logo

Comments (4)

whiteeat avatar whiteeat commented on July 17, 2024

Agree. The mesh related code is doing a lot of things like cache iterators, and then modify the vector, then keep using the cached iterators. The code can run because it always preallocates big enough memory and only insert elements at the end of a vector. And Take the HalfEdge class for example, it uses vector iterators as class members, which is a very dangerous practice. Probably there is a lot to refactor.

from boundary-first-flattening.

rohan-sawhney avatar rohan-sawhney commented on July 17, 2024

@whiteeat yes, there is definitely room for improvement here. @kentbarber updating "end" might dynamically increase the length of the loop. I don't think this has any unindented consequences on the algorithm itself, but not sure if this is something you would like to do to squash the warning.

from boundary-first-flattening.

Lishen1 avatar Lishen1 commented on July 17, 2024

@rohan-sawhney if you need to iterate over original elements in halfEdges, better to use indexes instead of iterators. After insertian vector reallocates memory and end iterator do not point to valid memory and throw "Vector Iterators Incompatible" exeption in debug mode.

from boundary-first-flattening.

rohan-sawhney avatar rohan-sawhney commented on July 17, 2024

@Lishen1 thanks for the suggestion, the plan is to revamp the halfEdge data structure for the next release.

from boundary-first-flattening.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.