Ejemplo n.º 1
0
 public DirectionalLight(FrameLightsource frameLight)
 {
     this.Position = (Point)frameLight.Parameters.Get<Vector>(FrameLightsource.DirLightDirection);
     this.Power = frameLight.Parameters.Get<RgbSpectrum>(FrameLightsource.LightsourcePower);
     this.Spectra = SPD_Data.FromSampled(SPD_Data.D5000, SpectrumType.Illuminant);
     //new SampledSpectrum(ref this.Power, SpectrumType.Illuminant);
 }
Ejemplo n.º 2
0
 public MeshLight(FrameLightsource lightsource)
 {
     MeshName = lightsource.Parameters.Get<string>(FrameLightsource.AreaLightGeometryName);
     LightName = MeshName;
     spectra = SPD_Data.FromSampled(SPD_Data.A, SpectrumType.Illuminant);
     gain = lightsource.Parameters.Get<RgbSpectrum>(FrameLightsource.LightsourcePower);
 }
Ejemplo n.º 3
0
        public InfiniteLight(FrameLightsource lightsource)
            : this(
                (RgbSpectrumTexture) (lightsource.Parameters.Get<string>(InfiniteLightMapPath).NameContains("hdr", "exr")
                                          ? ImageFactory.FreeImageLoadExrBitmap(lightsource.Parameters.Get<string>(InfiniteLightMapPath))
                                          : ImageFactory.FreeImageLoadBitmap(lightsource.Parameters.Get<string>(InfiniteLightMapPath))))
        {

        }
Ejemplo n.º 4
0
 public MeshLight(FrameLightsource lightsource)
 {
     MeshName = lightsource.Parameters.Get<string>(FrameLightsource.AreaLightGeometryName);
     LightName = MeshName;
     spectra = SPD_Data.FromSampled(SPD_Data.D5000, SpectrumType.Illuminant);//FromFile(@"F:\3D\spds\cie.stdillum.F10.spd")
     gain = lightsource.Parameters.Get<RgbSpectrum>(FrameLightsource.LightsourcePower);
     infoGain = new RgbSpectrumInfo(gain);
 }
Ejemplo n.º 5
0
 public SphereAreaLight(FrameLightsource frameLight)
 {
     this.Radius = 6f;
     this.Position = (Point)frameLight.Parameters.Get<Vector>(FrameLightsource.PointLightPosition);
     this.Power = frameLight.Parameters.Get<RgbSpectrum>(FrameLightsource.LightsourcePower) * 2.5f;
     this.Spectra = SPD_Data.FromSampled(SPD_Data.Al_k, SpectrumType.Illuminant);
     //new SampledSpectrum(ref this.Power, SpectrumType.Illuminant);
 }
Ejemplo n.º 6
0
 public PointLight(FrameLightsource frameLight)
 {
     this.Position = (Point)frameLight.Parameters.Get<Vector>(FrameLightsource.PointLightPosition);
     this.Power = frameLight.Parameters.Get<RgbSpectrum>(FrameLightsource.LightsourcePower);
 }
Ejemplo n.º 7
0
        public InfiniteLight(FrameLightsource lightsource)
            : 
            this( Load(lightsource.Parameters.Get<string>(InfiniteLightMapPath)), Load(GetTlFilename(lightsource.Parameters.Get<string>(InfiniteLightMapPath))))
        {

        }
Ejemplo n.º 8
0
 public SkyLight(FrameLightsource s)
     :this( s.Parameters.Get(SkyLightTurbulence, 2.5f),s.Parameters.Get(SkyLightSunDir, new Vector(0f,0f,1f)))
 {}