0

I have created a simple scene graph for a city I am developing. There is a ground which is a plane and buildings (which are made up of a cube body and a pyramid roof). They are all of type Model and I can add them to the scenegraph as they are all of the same data type. If wanted to add something to the scene graph which was not of type Model how would I do this? e.g I wanted to add a light.

I used this to get me started: http://research.ncl.ac.uk/game/mastersdegree/graphicsforgames/scenegraphs/Tutorial%206%20-%20Scene%20Graphs.pdf

Maybe to better explain my question, what if from that tutorial I had something other than a Mesh I wanted to add to the scenegraph?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Duchain
  • 43
  • 1
  • 6
  • 1
    What about deriving from a base class/interface? Both, Model and Light, can derive from e.g. ISceneGraphElement – BDL Feb 22 '15 at 11:12
  • oh ok. Would ISceneGraphElement have anything in it or would it just be an empty abstract class purely used so that model and light can inherit from it? – Duchain Feb 22 '15 at 15:37
  • 1
    There is no answer, since it depends on what your scene graph should do. – BDL Feb 22 '15 at 15:44
  • Ok thanks, you have really helped me along here :). – Duchain Feb 22 '15 at 16:18

0 Answers0