Tuesday, October 9, 2007

Week 5 - hybridbuilder

We got the hybridbuilder to work. Some different implementations was tried, including a one were we gave a set of faces in as parameter in the constructor, but that didn't work well. The problem was when we tried to apply the visitor pattern - it couldn't differenciate between the first traverse, when converted the geometry nodes to quadnodes, and the second traverse, when finding the leafs in the quadnode tree (also geometrynodes), and transforming those into BSPnodes.
The solution was to give the hybridbuilder a quadnode as parameter, and the letting the visitorpattern find the geometrynodes and converting them to BSPnodes.

The result, a quadnode, was given to the physics module as a parameter, and that seems to work.

No comments: