public void SetAmbientLight(Altaxo.Drawing.AxoColor colorBelow, Altaxo.Drawing.AxoColor colorAbove, double lightAmplitude, VectorD3D directionBelowToAbove) { directionBelowToAbove = directionBelowToAbove.Normalized; HemisphericLightBelowToAboveVector.Set(new Vector3((float)directionBelowToAbove.X, (float)directionBelowToAbove.Y, (float)directionBelowToAbove.Z)); HemisphericLightColorBelow.Set(ToVector3(colorBelow, lightAmplitude)); HemisphericLightColorAbove.Set(ToVector3(colorAbove, lightAmplitude)); }
public void SetCapsuleLight(int idx, Altaxo.Drawing.AxoColor color, double colorAmplitude, PointD3D position, double range, VectorD3D capsuleDirection, double capsuleLength) { if (range <= 0) { throw new ArgumentOutOfRangeException(nameof(range)); } SetSingleLight(idx, color, colorAmplitude, position, capsuleDirection, 1 / range, capsuleLength, 0, 1); }
public void SetSpotLight(int idx, Altaxo.Drawing.AxoColor color, double colorAmplitude, PointD3D position, VectorD3D directionToLight, double range, double cosOuterCone, double cosInnerConeRcp) { if (range <= 0) { throw new ArgumentOutOfRangeException(nameof(range)); } SetSingleLight(idx, color, colorAmplitude, position, directionToLight, 1 / range, 0, cosOuterCone, cosInnerConeRcp); }
public void SetPointLight(int idx, Altaxo.Drawing.AxoColor color, double colorAmplitude, PointD3D position, double range) { if (range <= 0) { throw new ArgumentOutOfRangeException(nameof(range)); } SetSingleLight(idx, color, colorAmplitude, position, new VectorD3D(1, 0, 0), 1 / range, 0, -1, 1E18); }
public static System.Windows.Media.Color ToWpf(this Altaxo.Drawing.AxoColor c) { if (c.IsFromArgb) { return(Color.FromArgb(c.A, c.R, c.G, c.B)); } else { return(Color.FromScRgb(c.ScA, c.ScR, c.ScG, c.ScB)); } }
private void SetSingleLight(int idx, Altaxo.Drawing.AxoColor color, double colorAmplitude, PointD3D position, VectorD3D direction, double lightRangeRcp, double capsuleLength, double spotCosOuterCone, double spotCosInnerConeRcp) { var sl = new SingleLight() { Color = ToVector3(color, colorAmplitude), Position = ToVector3(position), Direction = ToVector3(direction), LightRangeRcp = (float)lightRangeRcp, CapsuleLength = (float)capsuleLength, SpotCosOuterCone = (float)spotCosOuterCone, SpotCosInnerConeRcp = (float)spotCosInnerConeRcp }; _singleLights[idx] = sl; }
public void SetSceneBackColor(Altaxo.Drawing.AxoColor sceneBackColor) { _scene.SetSceneBackColor(sceneBackColor); }
public void SetDirectionalLight(int idx, Altaxo.Drawing.AxoColor color, double colorAmplitude, VectorD3D directionToLight) { directionToLight = directionToLight.Normalized; SetSingleLight(idx, color, colorAmplitude, (PointD3D)(directionToLight * 1E7), directionToLight, 0, 0, 0, 1); }
public static System.Drawing.Color ToGdi(this Altaxo.Drawing.AxoColor c) { return(System.Drawing.Color.FromArgb(c.A, c.R, c.G, c.B)); }