Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualM6dEEp

Posted 08 June 2012 - 05:03 PM

http://en.wikipedia.org/wiki/Iterator_pattern

Iterators are an abstraction. They are a way of iterating and accessing various elements in a data structure without having to couple your code to that data structure's particular implementation. You are right (to some degree) that you can't use your languages iterators to traverse your octree but you can use your language's common iterator interface to make your octree conform to the API (IEnumerator iand IEnumerable and their generic equivalents in C# are examples of this pattern).

#1M6dEEp

Posted 08 June 2012 - 05:02 PM

http://en.wikipedia.org/wiki/Iterator_pattern

I
terators are an abstraction. They are a way of iterating and accessing various elements in a data structure without having to couple your code to that data structure's particular implementation. You are right (to some degree) that you can't use your languages iterators to traverse your octree but you can use your language's common iterator interface to make your octree conform to the API (IEnumerator iand IEnumerable and their generic equivalents in C# are examples of this pattern).

PARTNERS