alecjacobson / computer-graphics-bounding-volume-hierarchy

Computer Graphics Assignment about Bounding Volume Hierarchies
123 stars 45 forks source link

About making a compare function in priority queue #29

Closed Xeroken closed 5 years ago

Xeroken commented 5 years ago

How do we create a compare function object to use in the priority queue? I keep getting told that it requires a class 'Compare' field.

Marina-t commented 5 years ago

can use a class or a lambda expression. I found these 2 resources helpful: https://stackoverflow.com/questions/16111337/declaring-a-priority-queue-in-c-with-a-custom-comparator http://neutrofoton.github.io/blog/2016/12/29/c-plus-plus-priority-queue-with-comparator/