Is this what it should end up looking like (there is a transform node in front of each node)?
Scene|-->terrain (the class instance - no need to worry about nodes - quadtree takes care of that)| |---->Player| | |->backpack| | |->Weapon 1| | | |->cool fx for weapon| | |->Weapon 2|| |----->Static object| | |----->Particle fx|| |------>torch (player pickupable object)| | |-->Fire fx| | |-->Smoke fx| | |-->light source
Quadtree|------>node 1| |---->node 2| | |-->pointer list (pointer to player scene graph data so using render() would recursivly render all children of player as well)| | |--> Also in pointer list is static object|| |---->node 3| | |-->pointer list that stores pointer to torch node struct/class
Thus, if the player aquires the torch, then the torch gets re-parented to player, and the children of torch go with it.
Scene|-->terrain (the class instance - no need to worry about nodes - quadtree takes care of that)| |---->Player| | |->backpack| | |->Weapon 1| | | |->cool fx for weapon| | |->Weapon 2| | || | |->torch (player pickupable object)| | |-->Fire fx| | |-->Smoke fx| | |-->light source|| |----->Static object| | |----->Particle fx
If the player moves around, it is solely on the quadtree to worry about.
Am I presenting this in a correct way now?How would I sort for render states? When rendering, would I insert the pointers to the objects that need to be rendered into a list, then iterate through the list looking for the same texture / shader / state(alpha), render and delete them from the list and then get a new type, and do this until the list is empty?