1.
Node
|
Actor
|
Camera, Entity, ...
2.
Node
|
Actor -> MovableObject
|
Camera
|
Entity
|
...
In first case Node class is base of Actor, and Camera, Entity, ... are subclasses of Actor class.
In second case Node is also base of Actor, but now Camera, Entity, ... are subclasses of MovableObject which
is added to the Actor class in the list of objects.
Right now I use the first case in my engine. I think it's easier to implement and use.
For example if I want to create entity I use:
Entity ent = m_SceneMng.CreateEntity( "player", "models/player/player.mdl" ); ent.Position = new Vector3( 100, 0, 50 );
Now for the second case this would go something like this:
Actor parent = m_Scene.CreateActor( "PlayerParent" ); Entity ent = m_SceneMng.CreateEntity( "player," "models/player/player.mdl" ); parent.AttachObject( ent ); parent.Position = new Vector3( 100, 0, 50 );
I'm open for any sugestion. tnx
















