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; }
public Shape3DDecorator(RenderPreparationContext context) { _context = context; }