Octree – Cont’d

December 12th, 2009 by Bas

After a day of staring at the octree rendering and export code I found two tiny little bugs that caused strange errors. One of the bugs I found was that when I did something like this

Vector3 a(reader->ReadSingle(), reader->ReadSingle(), reader->ReadSingle())

The components of the vector where read in a different order! I find it very strange that the arguments of the method are executed in a different order then specified. I solved the problem by first storing the components and then passing them to the constructor, effectively forcing the execution of ReadSingle in the right order.

I also added the drawing of the octree nodes in maya so you can see the result.

4 Comments »


  1. Comment by Yorick on December 13, 2009 at 9:42 pm

    Ooooh

  2. Comment by Meindert-Jan on December 13, 2009 at 10:39 pm

    Veeeeent!

  3. Comment by Opa on December 15, 2009 at 10:57 am

    Heel leuk. Kan je het ook laten bewegen?

  4. Comment by Bas Zalmstra on December 15, 2009 at 11:38 am

    Het is allemaal realtime dus de lichtjes en de camera kunnen gewoon bewegen. Ik heb nog geen dynamische objecten gemaakt dus de omgeving beweegt niet. Dat komt natuurlijk nog.

Leave a comment