public SDShape(STFReader stf) { stf.ReadString(); // Ignore the filename string. TODO: Check if it agrees with the SD file name? Is this important? stf.ParseBlock(new STFReader.TokenProcessor[] { new STFReader.TokenProcessor("esd_detail_level", () => { ESD_Detail_Level = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("esd_alternative_texture", () => { ESD_Alternative_Texture = stf.ReadIntBlock(null); }), new STFReader.TokenProcessor("esd_no_visual_obstruction", () => { ESD_No_Visual_Obstruction = stf.ReadBoolBlock(true); }), new STFReader.TokenProcessor("esd_snapable", () => { ESD_Snapable = stf.ReadBoolBlock(true); }), new STFReader.TokenProcessor("esd_subobj", () => { ESD_SubObj = true; stf.SkipBlock(); }), new STFReader.TokenProcessor("esd_bounding_box", () => { ESD_Bounding_Box = new ESD_Bounding_Box(stf); if (ESD_Bounding_Box.Min == null || ESD_Bounding_Box.Max == null) // ie quietly handle ESD_Bounding_Box() { ESD_Bounding_Box = null; } }), }); // TODO - some objects have no bounding box - ie JP2BillboardTree1.sd //if (ESD_Bounding_Box == null) throw new STFException(stf, "Missing ESD_Bound_Box statement"); }
public SDShape() { ESD_Bounding_Box = new ESD_Bounding_Box(); }