Jump to content
  • Advertisement
Sign in to follow this  

camera and scene hierarchy

This topic is 4066 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi I've been trying to write a simple 3d engine. I have a scene manager that stores a tree of scene nodes. Each node has two matrices, one that stores it's transformation relative to it's parent and one that stores the absolute transformation. When I want the scene manager to draw the whole scene, it traverses the whole tree, multiplying the relative matrices together and storing the absolute matrices for each node (note: I guess there is a better way, but I figured I need to set up all lights before the geometry gets drawn and since the lights are also nodes, I need to get their transformations before traversing the tree a second time, drawing geometry). Now that I've gotten to the point where I want to implement a camera class (also a node), I'm quite not sure what to do. I have the absolute transformation of the camera (world space), but I guess that's not what I need. I guess what I need would be an inverse of that matrix, but I'm not sure and I don't want to implement matrix inversion algorithm unless I have to :) not to mention it maybe isn't the best method. Do I need that inverse, any ideas? PS: another way would be to not store relative transformation matrices and store the matrix in some kind of transformation batch that I could easily invert (I could traverse from the camera to the root, building the inverse matrix). That's work I'd rather spare. Whether this would be correct or not, I'm still curious about my original question. I've been looking at the Irrlicht engine as a reference throughout my efforts, but wasn't able to pick up where it does the transformations. thanks for any clarification :)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!