Jump to content
  • Advertisement
Sign in to follow this  
justdanyul

Scene graph suggestions?

This topic is 2592 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

Hello :)

I'm trying to create a re-usable scene graph (nothing too complex), to replace a quite purpose specific one I did for a pet game project I'm working on. Basically, I figured since i'm only doing this for fun I might as well try and build one which might be useful for me in the future as well.

So here's my question. I want to be able to have the ability to reuse objects(ie. not having duplicate data). Which I did with a purpose specific "factory" node in my purpose specific one. I'm currently playing around with a implementation which have:

* vector space node
* geometry node
* renderable node (these nodes holds positional data)

So, for example, if I have

RoomSpace -> ObjectGeometry -> Object1 AND Object2 (the renderables)

The problem is, if i simply want one object I would need (since the Geometry node in itself doesn't keep positional data and doesn't render):

RoomSpace -> ObjectGeometry -> Object1

While this works, it seems a bit stupid. But i'm really struggling to come up with a better alternative. So, I thought I would try and throw the question out to some experienced people (you lot! :D). How do you all implement this?

* Note, I'm using C++ , but I don't want to use virtual functions for this set of classes(im using void pointers, type identifiers and some helper classes with static member functions to emulate polymorphism). So if you could keep that in mind when/if giving me suggestions

Share this post


Link to post
Share on other sites
Advertisement
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!