public async Task ConfigureParameterAsync(IParameterBag parameterBag, TParameter parameter) { if (ConfigureParameterAsyncHandler != null) { await ConfigureParameterAsyncHandler(parameterBag, parameter); } }
public static void AddTextPart <T>( this IParameterBag parameterBag, string value, T properties) where T : class { parameterBag.AddTextPart(value, null, properties); }
public static void AddTextPart <T>( this IParameterBag parameterBag, string value, Encoding encoding, T properties) where T : class { parameterBag.AddTextPart(value, encoding, ParseProperties(properties)); }
public RendererJobInfo(IRayDenLibraryFrame mainFrame, IParameterBag configuration, IRayDenLibraryFrame[] frames = null) : this() { this.MainFrame = mainFrame; this.CommonConfig = configuration; this.Frames = frames; this.OutputSettings = new OutputSettingsInfo(configuration); this.QualitySettings = new QualitySettingsInfo(configuration); }
public static void AddFilePart <T>( this IParameterBag parameterBag, string name, Stream stream, T properties) where T : class { parameterBag.AddFilePart(name, stream, ParseProperties(properties)); }
public override Task ConfigureParameterAsync(IParameterBag parameterBag, WabisabiLoginRequestParameter parameter) { parameterBag.Body.Add("grant_type", "password"); parameterBag.Body.Add("client_id", parameter.ClientId); parameterBag.Body.Add("username", parameter.Username); parameterBag.Body.Add("password", parameter.Password); return(Task.FromResult(0)); }
public QualitySettingsInfo(IParameterBag cfg) : base(cfg) { this.SamplesPerPixel = cfg.Get(QSSamplesPerPixel, 128); this.ShadowRaysPerLight = cfg.Get(QSShadowRaysPerLight, 1); this.LightSamplingStrategy = cfg.Get(QSLightSamplingStrategy, LightSamplingStrategy.UniformOneLight); this.SuperSamplingSize = cfg.Get(QSSuperSampling, 1); this.TextureSamplingQuality = cfg.Get(QSTextureSampling, TextureSamplingQuality.Nearest); }
public static void AddFilePart( this IParameterBag parameterBag, string name, string fileName, Stream stream, IEnumerable <KeyValuePair <string, string> > properties = null) { parameterBag.AddFilePart(name, stream, new { filename = fileName, }); }
public void OpenFrame(FrameDescription frameDescription) { this.config = frameDescription; if (GlobalConfiguration.Instance.AdaptiveFilm) this.film = new AdaptiveImageFilm(this.Width, this.Height); else this.film = new ImageFilm(this.Width, this.Height); this.integrator = //new PathTracerIntegrator() //new PathTracerDL() //new RayTracer() new SpectralRayTracer() //new SingleRandomWavelengthPathTracerIntegrator() //new WavelengthClusterPathTracerIntegrator() { Scene = new SceneManager() { w = this.Width, h = this.Height }, film = this.film, rnd = new FastRandom() }; }
protected RendererSettingsBase(IParameterBag cfg): base() { this.items = new Dictionary<string, object>(cfg.GetItems()); }
public virtual Task ConfigureParameterAsync(IParameterBag parameterBag, TParameter parameter) { return(Task.FromResult(0)); }
public virtual void Setup(IParameterBag arg) { }
public MaterialViewRayEngineConfiguration(SurfaceMaterial mat, SurfaceMaterial pm) { this.config = new ConfigurableEntity(GlobalConfiguration.Instance); this.ObjectMaterial = mat; this.PlaneMaterial = pm; }
public MaterialViewRayEngineConfiguration() { this.config = new ConfigurableEntity(GlobalConfiguration.Instance); }
public async Task AuthenticateAsync(IRestClient client, IRestRequest request, IHeaderBag headerBag, IParameterBag parameterBag) { if (request is WabisabiLoginRequest) { return; } if (AccessToken?.IsValid != true) { var result = await client.RequestAsync( new WabisabiLoginRequest(), new WabisabiLoginRequestParameter { ClientId = ClientId, Username = UserId, Password = Password }); AccessToken = result.SuccessResult; } if (AccessToken?.IsValid == true) { headerBag.Add("Authorization", string.Format("Bearer {0}", AccessToken.AccessToken)); } }
public RayEngineConfiguration() { this.config = new ConfigurableEntity(GlobalConfiguration.Instance); this.dependencyManager = new DependencyManager(); //this.dependencyContainer.Get<>() }
public EngineContext(IParameterBag b) : base(b) { }
public CorrectorEngineConfiguration() { this.config = new ConfigurableEntity(GlobalConfiguration.Instance); this.dependencyManager = new DependencyManager(); }
public EngineContextBase(IParameterBag parameterBag) { this.QualitySettings = new QualitySettingsInfo(parameterBag); this.OutputSettings = new OutputSettingsInfo(parameterBag); }
public OutputSettingsInfo(IParameterBag cfg) : base(cfg) { this.Width = cfg.Get(OSImageWidth, 512); this.Height = cfg.Get(OSImageHeight, 384); this.BitsPerPixel = cfg.Get(OSBitsPerPixel, 24); this.GammaCorrection = cfg.Get(OSGammaCorrection, false); this.ToneMap = cfg.Get(OSToneMap, false); this.ToneMapValue = cfg.Get(OSToneMapValue, 1.0f); this.FilePath = cfg.Get(OSFilePath, string.Empty); this.Save = !string.IsNullOrWhiteSpace(this.FilePath); }
public void OpenFrame(Frame frame) { this.config = frame; width = frame.Get<int>("ImageWidth"); height = frame.Get<int>("ImageHeight"); Directory.SetCurrentDirectory(frame.WorkingDir); foreach (var frameElement in frame.Elements.Where(frameElement => frameParsers.ContainsKey(frameElement.GetType()))) { frameParsers[frameElement.GetType()](frameElement); } if (Scene == null) { Scene = new RayEngineScene(scene, new DefaultMaterialContainer(new MaterialInfo(), mats), lights.ToArray()) { DefaultLightGain = frame.Get("LightGain", new RgbSpectrum(1.75f)), MaxPathDepth = frame.Get("MaxPathDepth", 15), RussianRuletteImportanceCap = frame.Get("RRImportanceCap", 0.75f), MaxPaths = frame.Get("PathBufferSize", 65536), ShadowRayCount = frame.Get("ShadowRayCount", 1), EnvironmentMap = envMap, Camera = this.Camera, AreaLightAsMesh = this.AreaLightAsMeshLight, MatLib = new MaterialLibrary() }; if (scene.Cameras != null) { this.Scene.Cameras = scene.Cameras.Select( cameraItem => new BasicPerspectiveCamera(cameraItem.Position, cameraItem.Direction, cameraItem.Up, width, height) {Fov = cameraItem.Fov}).Cast<ICamera>().ToList(); } Scene.MatLib.Populate(this.mats); RenderThreadsCount = 1; Scene.VolumeIntegrator = new SingleScatteringIntegrator(new AABB(new Vector(-4f), new Vector(4f)),0.5f, 0.25f, RgbSpectrum.UnitSpectrum()*0.65f, RgbSpectrum.Black ); } Film = new PMFilm(width, height); //new ImageFilm(width, height); this.Initialize(); }