/// <summary> /// Required parameters: /// (Location) lens_sphere_location, /// (double) lens_sphere_radius /// (double) lens_sphere_radians_min /// (double) lens_sphere_radians_max /// (UnitVector) orientation_from_sphere_center /// </summary> /// <param name='shadowObject'> /// Shadow object containing parameters from summary. /// </param> protected void shadowFac_SphereCenter_And_Radians(ShadowScientrace.ShadowObject3d shadowObject) { //User values(s) Scientrace.Location lens_sphere_location = (Scientrace.Location)shadowObject.getObject("lens_sphere_location"); double lens_sphere_radius = (double)shadowObject.getObject("lens_sphere_radius"); double lens_sphere_radians_min = (double)shadowObject.getObject("lens_sphere_radians_min"); double lens_sphere_radians_max = (double)shadowObject.getObject("lens_sphere_radians_max"); Scientrace.UnitVector orientation_from_sphere_center = (Scientrace.UnitVector)shadowObject.getObject("orientation_from_sphere_center"); bool double_convex_ring = shadowObject.getNBool("double_convex")==true; //construct! this.paramInit(lens_sphere_location, lens_sphere_radius, lens_sphere_radians_min, lens_sphere_radians_max, orientation_from_sphere_center, double_convex_ring); }
/// <summary> /// Required parameters: /// (Location) lens_plano_center, /// (double) lens_sphere_radius /// (double) lens_sphere_radians_min /// (double) lens_sphere_radians_max /// (UnitVector) orientation_from_sphere_center /// </summary> /// <param name='shadowObject'> /// Shadow object containing parameters from summary. /// </param> protected void shadowFac_PlanoCenter_And_Radians(ShadowScientrace.ShadowObject3d shadowObject) { //User values(s) Scientrace.Location lens_plano_center = (Scientrace.Location)shadowObject.getObject("lens_plano_center"); double lens_sphere_radius = (double)shadowObject.getObject("lens_sphere_radius"); double lens_sphere_radians_min = (double)shadowObject.getObject("lens_sphere_radians_min"); double lens_sphere_radians_max = (double)shadowObject.getObject("lens_sphere_radians_max"); Scientrace.UnitVector orientation_from_sphere_center = (Scientrace.UnitVector)shadowObject.getObject("orientation_from_sphere_center"); bool double_convex_ring = shadowObject.getNBool("double_convex")==true; //Derived value(s) Scientrace.Location lens_sphere_location = lens_plano_center - (orientation_from_sphere_center*lens_sphere_radius*Math.Cos(lens_sphere_radians_max)); /*double rmin = Math.Sin(lens_sphere_radians_min)*lens_sphere_radius; double rmax = Math.Sin(lens_sphere_radians_max)*lens_sphere_radius; Console.WriteLine("Ring got radius "+lens_sphere_radius+" at"+lens_sphere_location+" radmin/max:{"+lens_sphere_radians_min+"}/{"+lens_sphere_radians_max+"}."); Console.WriteLine("Ring got rmin/rmax "+rmin+" / "+rmax); */ //Console.WriteLine("Lens sphere: "+lens_sphere_location.tricon()+" Plano center: "+lens_plano_center.trico()); //construct! this.paramInit(lens_sphere_location, lens_sphere_radius, lens_sphere_radians_min, lens_sphere_radians_max, orientation_from_sphere_center, double_convex_ring); }