Exemplo n.º 1
0
        protected virtual REScene PrepareScene(Scene3D scene, Camera3D camera)
        {
            var wrappedScene = new REScene();
            var preparationContext = new RenderPreparationContext(wrappedScene);
            preparationContext.PushCoordinateSystem(camera.CoordinateSystem);
            _shapeDecorator = new Shape3DDecorator(preparationContext);

            scene.Shapes.AcceptVisitor(_shapeDecorator);
            wrappedScene.Objects.Add(_shapeDecorator.DecoratedShape);

            scene.Lights.AcceptVisitor(_shapeDecorator);
            wrappedScene.Lights.Add(_shapeDecorator.DecoratedLight);

            preparationContext.PopCoordinateSystem();
            return wrappedScene;
        }
Exemplo n.º 2
0
 public Shape3DDecorator(RenderPreparationContext context)
 {
     _context = context;
 }