Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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))))
        {

        }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #6
0
 public PointLight(FrameLightsource frameLight)
 {
     this.Position = (Point)frameLight.Parameters.Get<Vector>(FrameLightsource.PointLightPosition);
     this.Power = frameLight.Parameters.Get<RgbSpectrum>(FrameLightsource.LightsourcePower);
 }
Beispiel #7
0
        public InfiniteLight(FrameLightsource lightsource)
            : 
            this( Load(lightsource.Parameters.Get<string>(InfiniteLightMapPath)), Load(GetTlFilename(lightsource.Parameters.Get<string>(InfiniteLightMapPath))))
        {

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