Horde3D

Next-Generation Graphics Engine
It is currently 18.04.2024, 07:13

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 08.10.2007, 16:57 
Offline

Joined: 03.10.2007, 10:31
Posts: 11
Location: Pittsburgh
So I am still trying to grasp this concept properly.

"To overcome these problems Horde3D offers a special Integration Library. With version 0.11 Horde introduces the concept of node attachments. An attachment is a derived class that you can attach to Horde scene graph nodes and which can contain all your game specific data. The key point is that this class is handled by Horde when updating the scene graph which means that you get a notification when a child or parent node is transformed. This concept makes it easy to let the graphics engine interact with e.g. a physics engine and enables you to store game specific semantics and meta data directly with the graphics objects."

So if I make an Eddie Monster class,
Do I derive it from the addNodes class? and how do have Horde update it properly? And how would I use attach node ? The only reason I am sweating this is I think I should do it right so it is as fast as possible.

_________________
I know just enough C++ to be a danger to myself and others.

http://www.kinderproductions.com/forum2/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: 08.10.2007, 21:04 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
There is no single "best" way to integrate a graphics engine with a game framework. The way presented is just one possibility. Actually the idea is quite simple: You derive your game entity classes from the NodeAttachment class and attach them to the scene graph with the NodeAttachment constructor. What happens is that Horde will call the onUpdate function of your entity when the scene node to which the entity is attached is transformed e.g. by an animation.

Another very practical thing is that you can store additional meta-information for your game (e.g. the health of a character, physics properties, etc.) in the scene graph files. The static function NodeAttachment::setFactory lets you specify a callback function which gives you that additional data. This is useful when you don't want to create your own world format, but of course you are not forced to use the meta data system.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group