From 69425d545b3b27671ef92099c56a25b5976f7656 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Wed, 11 Aug 2010 22:55:46 +0100 Subject: [PATCH] Remove scaling from building XML --- buildings/house2/house2.xml | 1 - buildings/power_plant/power_plant.xml | 1 - buildings/white_house/white_house.xml | 1 - schemas/building.xsd | 1 - src/Building.cpp | 13 +++---------- 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/buildings/house2/house2.xml b/buildings/house2/house2.xml index ebb6772..551a672 100644 --- a/buildings/house2/house2.xml +++ b/buildings/house2/house2.xml @@ -2,5 +2,4 @@ House 2 house2.obj - 0.8 diff --git a/buildings/power_plant/power_plant.xml b/buildings/power_plant/power_plant.xml index 89b9d40..56d34b5 100644 --- a/buildings/power_plant/power_plant.xml +++ b/buildings/power_plant/power_plant.xml @@ -2,5 +2,4 @@ Power Plant power_plant.obj - 1.0 diff --git a/buildings/white_house/white_house.xml b/buildings/white_house/white_house.xml index 8f68e35..5ad8237 100644 --- a/buildings/white_house/white_house.xml +++ b/buildings/white_house/white_house.xml @@ -2,5 +2,4 @@ White House house.obj - 0.8 diff --git a/schemas/building.xsd b/schemas/building.xsd index 4b3c114..aa56b5a 100644 --- a/schemas/building.xsd +++ b/schemas/building.xsd @@ -5,7 +5,6 @@ - diff --git a/src/Building.cpp b/src/Building.cpp index 112099a..2959d4f 100644 --- a/src/Building.cpp +++ b/src/Building.cpp @@ -51,7 +51,6 @@ private: struct ParserState { string model_file; - float scale; } *parser_state; }; @@ -60,16 +59,12 @@ Building::Building(IResourcePtr a_res) { static IXMLParserPtr parser = makeXMLParser("schemas/building.xsd"); - parser_state = new ParserState; - parser_state->scale = 1.0f; - + parser_state = new ParserState; parser->parse(a_res->xml_file_name(), *this); Vector shift = -make_vector(0.5f, 0.0f, 0.5f); - model_ = load_model(a_res, - parser_state->model_file, - parser_state->scale, - shift); + model_ = load_model(a_res, parser_state->model_file, + 1.0f, shift); Vector dim = model_->dimensions(); debug() << name_ << " " << dim; @@ -102,8 +97,6 @@ void Building::text(const string& local_name, const string& a_string) { if (local_name == "name") name_ = a_string; - else if (local_name == "scale") - parser_state->scale = boost::lexical_cast(a_string); else if (local_name == "model") parser_state->model_file = a_string; } -- 2.39.2