/* CONSTRUCTORS */ public FlatSurfaceObject3d(ShadowScientrace.ShadowObject3d aShadowObject) : base(aShadowObject) { //only front surface by default: //this.x3d_fill = aShadowObject.getBool("x3d_fill", this.x3d_fill); this.x3d_fill_emissive_color = aShadowObject.getColorFromHTML("x3d_fill_emissive_color_html", this.x3d_fill_emissive_color); this.x3d_fill_diffuse_color = aShadowObject.getColorFromHTML("x3d_fill_diffuse_color_html", this.x3d_fill_diffuse_color); this.x3d_fill_bitmap = aShadowObject.getString("x3d_fill_bitmap"); this.x3d_fill_both_sides = aShadowObject.getBool("x3d_fill_both_sides", this.x3d_fill_both_sides); //this.x3d_fill_diffuse = aShadowObject.getBool("x3d_fill_diffuse", this.x3d_fill_diffuse); this.x3d_fill_normal = aShadowObject.getVector("x3d_fill_normal", this.x3d_fill_normal); }
/// <summary> /// Required parameters: /// (Location) corner_location, /// (NonzeroVector) length /// (NonzeroVector) width /// (NonzeroVector) height /// (boolean) perfect_front (default true) /// </summary> /// <param name='shadowObject'> /// Shadow object containing parameters from summary. /// </param> protected void shadowFac_Width_Height_And_Length(ShadowScientrace.ShadowObject3d shadowObject) { //User values(s) Scientrace.Location corner_location = shadowObject.getLocation("corner_location"); Scientrace.NonzeroVector length = shadowObject.getNzVector("length"); Scientrace.NonzeroVector width = shadowObject.getNzVector("width"); Scientrace.NonzeroVector height = shadowObject.getNzVector("height"); bool perfect_top = shadowObject.getBool("perfect_top") == true; //Derived value(s) //none //initialize! this.paramInit(corner_location, width, height, length); //add some additional parameters this.perfectTop = perfect_top; }