Ejemplo n.º 1
0
 virtual void visit(Object3D &theNode)
 {
     if(theNode.enabled() || !visit_only_enabled())
     {
         m_transform_stack.push(m_transform_stack.top() * theNode.transform());
         for (Object3DPtr &child : theNode.children()){child->accept(*this);}
         m_transform_stack.pop();
     }
 }
Ejemplo n.º 2
0
void SceneTest::parent() {
    Scene3D scene;

    /* Scene parent cannot be changed */
    Object3D* scenePointer = &scene;
    Object3D object;
    scenePointer->setParent(&object);
    CORRADE_VERIFY(scene.parent() == nullptr);
    CORRADE_VERIFY(scene.children().isEmpty());
    CORRADE_VERIFY(object.children().isEmpty());
}