public tree_class(terraincomposer_save script, bool new_filter) { this.interface_display = true; this.swap_text = "S"; this.color_tree = new Color((float)1, (float)1, (float)1, (float)1); this.precolor_range = new precolor_range_class(1, false); this.link_start = true; this.link_end = true; this.width_start = (float)1; this.width_end = 2.5f; this.height_start = (float)1; this.height_end = 2.5f; this.unlink = 0.25f; this.random_position = true; this.distance_include_scale = true; this.distance_include_scale_group = true; this.objects_placed = new List<distance_class>(); this.prefilter = new prefilter_class(); this.ray_length = (float)20; this.cast_height = (float)20; this.ray_radius = (float)1; this.ray_direction = new Vector3((float)0, (float)-1, (float)0); if (new_filter) { script.add_filter(0, this.prefilter); script.filter[script.filter.Count - 1].type = condition_type_enum.Random; script.add_subfilter(0, script.filter[script.filter.Count - 1].presubfilter); script.subfilter[script.subfilter.Count - 1].type = condition_type_enum.Random; script.subfilter[script.subfilter.Count - 1].from_tree = true; } this.precolor_range.color_range[0].color_start = new Color(0.75f, 0.75f, 0.75f); this.precolor_range.color_range[0].color_end = new Color((float)1, (float)1, (float)1); }
public tree_class(terraincomposer_save script, bool new_filter) { this.interface_display = true; this.swap_text = "S"; this.color_tree = new Color((float)1, (float)1, (float)1, (float)1); this.precolor_range = new precolor_range_class(1, false); this.link_start = true; this.link_end = true; this.width_start = (float)1; this.width_end = 2.5f; this.height_start = (float)1; this.height_end = 2.5f; this.unlink = 0.25f; this.random_position = true; this.distance_include_scale = true; this.distance_include_scale_group = true; this.objects_placed = new List <distance_class>(); this.prefilter = new prefilter_class(); this.ray_length = (float)20; this.cast_height = (float)20; this.ray_radius = (float)1; this.ray_direction = new Vector3((float)0, (float)-1, (float)0); if (new_filter) { script.add_filter(0, this.prefilter); script.filter[script.filter.Count - 1].type = condition_type_enum.Random; script.add_subfilter(0, script.filter[script.filter.Count - 1].presubfilter); script.subfilter[script.subfilter.Count - 1].type = condition_type_enum.Random; script.subfilter[script.subfilter.Count - 1].from_tree = true; } this.precolor_range.color_range[0].color_start = new Color(0.75f, 0.75f, 0.75f); this.precolor_range.color_range[0].color_end = new Color((float)1, (float)1, (float)1); }
public override void clear_tree(terraincomposer_save script) { int count = this.tree.Count; for (int i = 0; i < count; i++) { this.erase_tree(this.tree.Count - 1, script); } }
public override void erase_tree(int tree_number, terraincomposer_save script) { if (this.tree.Count > 0) { script.erase_filters(this.tree[tree_number].prefilter); this.tree.RemoveAt(tree_number); this.tree_value.erase_value(tree_number); this.set_tree_text(); } }
public override void add_tree(int tree_number, terraincomposer_save script, bool new_filter) { this.tree.Insert(tree_number, new tree_class(script, new_filter)); this.tree_value.add_value(tree_number, (float)50); this.set_tree_text(); }