CHAPTER 2 ■ SETTING UP DIFFERENT CAMERA MODES IN YOUR 3D WORLD
98
shared between all nodes and is always incremented, each new DrawableModel will receive a
differentIDnumber,whichis1morethantheIDnumberofthepreviousDrawableModel. Next,
the newly created DrawableModel is added to the octree.
ThisIDisreturnedtothemainprogram,whichisquiteimportant,asyou’llseeinthe
“UpdatingtheWorldMatrixofaCertainModel”section.
Thatwillbeallregardingthestructureofyouroctree!Attheendofthisrecipe,you’llfind
somecodethatrendersthebordersofeachcubesoyoucanactuallyseewhat’shappening.
There’sonelastpartoffunctionalityyouneedtoadd:thefunctionalitythatletsyoudrawthe
whole tree. This ...