Question

I have a few separators such as desk, lamp, and frame in my scene graph. When I add them to a separator called, "root," are they then made into nodes? Like if I wanted to use them with a path, is there an equivalent to path->containsNode for separators?

Also, is there a way to identify a separator? Let's say that I would like to place a lamp on a desk. I think the best way would be to check if the lamp collides with a specific separator like desk?

Thanks!

Was it helpful?

Solution

The class SoSeparator inherits from [SoNode][2] via SoGroup in the C++ inheritance sense. In other words, any SoSeparator* (i.e. your lamp, desk, ...) is a node. Just use any SoSeparator* anywhere it calls for a SoNode* argument and you should be good.

Do you have a good C++ book, and a copy of The Inventor Mentor on hand?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top