Xident wrote:
Good that i asked, now it seems to me like the physics demo was a "little hack".
That's exactly what it was! The purpose was to have a little demonstrator not a complete game engine
Concerning the attachment data:
To query all attachment data for each node you can use the following code:
Code:
int nodes = Horde3D::findNodes( RootNode, "", SceneNodeTypes::Undefined );
for (int i = 0; i < nodes; ++i)
{
NodeHandle node = Horde3D::getNodeFindResult(i);
const char* attachmentData = Horde3D::getNodeAttachmentString(node);
// ... process data
}
After calling Horde3D::render (updating your scene graph) you can check for changed transformation matrices using
Horde3D::checkNodeTransformFlag. It will return true if the world transformation has been changed (e.g. by a parent node).
This way you can synchronize the physical representation with the one from the scene graph.
To reset the internal flag that indicates the change you have to pass "true" to the function as a second parameter.
See also the
documentation for a more detailed description of the function