Hey
It appears that there is no function to get a node's parent, is there a way to get access to the node.Parent attribute without having to add a getParent function to ISceneNode?
Also, before I get the parent node, how can I check whether the node has a parent? It would only cause error's if I try to store a non-existant parent into a node, once I try to use that node it will cause a crash.
Cheers.
Getting node parent
Hi Tyn,
seems there is no other way to get the parent than implementing getParent() in ISceneNode. But it's easy (no other file has to be changed) and works well. I wonder why it's not in there by default. Maybe Niko just forgot.
ISceneNode.h
Also checkin if there is a parent has same easyness:
greets,
jox
seems there is no other way to get the parent than implementing getParent() in ISceneNode. But it's easy (no other file has to be changed) and works well. I wonder why it's not in there by default. Maybe Niko just forgot.
ISceneNode.h
Code: Select all
virtual ISceneNode* getParent() {
return Parent;
}
Code: Select all
if (node->getParent()) {
...
}
jox