lmlange

Hi All

Im petty new with XNA(and 3d in generel), and trying to build my first XNA application.

Im building my application around a scenegraph, where sofare I add a model as ground and a few moveable models.

How can i implement a DOF-node(Scene transformation Node) in XNA, so when i set and move that matrix, all sub models gets moved

thx




Re: XNA Framework Scenegraph

DigitalPenguin

Thats actually the point of a scenegraph... each child object inherits it's parents properties including it's tranformation. Just multiply your child object's matracie by the it's parents. For example, if you just have the 'ground' object and a single child, just multiple the childs's transformation by the grounds.

If you create a DOF node, each object should inherit from it. You can add the functionality I mentioned above to the dof class.

Also, in the end, your going to want to transform all objects by the camera's transformation. I'm still learning xna so I don't know the exact code for this but you normally want to update the camera's transformation before rendering the scene.

Good luck!





Re: XNA Framework Scenegraph

lmlange

Hi DigitalPenguin

thx alot, im going to play abit around with that.

lmlange