示例#1
0
 public FigureFacade(Device device, ShaderCache shaderCache, FigureDefinition definition, FigureModel model, ControlVertexProvider controlVertexProvider, FigureRendererLoader figureRendererLoader)
 {
     this.definition            = definition;
     this.model                 = model;
     this.controlVertexProvider = controlVertexProvider;
     this.figureRendererLoader  = figureRendererLoader;
 }
示例#2
0
    public FigureFacade(Device device, ShaderCache shaderCache, FigureDefinition definition, FigureModel model, ControlVertexProvider controlVertexProvider, FigureRendererLoader figureRendererLoader)
    {
        this.definition            = definition;
        this.model                 = model;
        this.controlVertexProvider = controlVertexProvider;
        this.figureRendererLoader  = figureRendererLoader;

        model.MaterialSetChanged += Model_MaterialSetChanged;
        SyncMaterialSet();
    }
示例#3
0
    public static ControlVertexProvider Load(Device device, ShaderCache shaderCache, FigureDefinition definition)
    {
        var shaperParameters = Persistance.Load <ShaperParameters>(definition.Directory.File("shaper-parameters.dat"));

        var occluderLoader = new OccluderLoader(device, shaderCache, definition);

        var provider = new ControlVertexProvider(
            device, shaderCache, occluderLoader,
            definition,
            shaperParameters);

        return(provider);
    }
示例#4
0
    public FigureFacade Load(FigureFacade.Recipe recipe, FigureDefinition parentDefinition)
    {
        FigureDefinition definition = FigureDefinition.Load(dataDir, recipe.name, parentDefinition);

        var model = new FigureModel(definition)
        {
            IsVisible       = recipe.isVisible,
            ShapeName       = recipe.shape,
            MaterialSetName = recipe.materialSet
        };

        var controlVertexProvider = ControlVertexProvider.Load(device, shaderCache, definition);

        var facade = new FigureFacade(device, shaderCache, definition, model, controlVertexProvider, figureRendererLoader);

        return(facade);
    }