From d9bff43bdefc88d7f5146cc526ceebb1d1be0ce3 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 8 Jan 2001 22:01:24 +0000 Subject: [PATCH] Tweaks. --- src/Main/main.cxx | 19 ++++++++++--------- src/Main/viewer_lookat.cxx | 4 ++-- src/Main/viewer_rph.cxx | 4 ++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 96d8fe16e..0b831e730 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -1550,16 +1550,8 @@ int main( int argc, char **argv ) { } FGPath modelpath( globals->get_options()->get_fg_root() ); - // modelpath.append( "Models" ); - // modelpath.append( "Geometry" ); - - FGPath texturepath( globals->get_options()->get_fg_root() ); - texturepath.append( "Models" ); - texturepath.append( "Textures" ); - ssgModelPath( (char *)modelpath.c_str() ); - ssgTexturePath( (char *)texturepath.c_str() ); - + // Scene graph root scene = new ssgRoot; scene->setName( "Scene" ); @@ -1624,6 +1616,15 @@ int main( int argc, char **argv ) { string acmodel_path = globals->get_props()->getStringValue("/sim/model/path", "Models/Geometry/glider.ac"); + + string full_model = globals->get_options()->get_fg_root() + "/" + + acmodel_path; + int pos = full_model.rfind("/"); + + FGPath texturepath( full_model.substr(0, pos) ); + cout << "Texture path = " << texturepath.str() << endl; + ssgTexturePath( (char *)texturepath.c_str() ); + ssgEntity *acmodel_obj = ssgLoad((char *)(acmodel_path.c_str())); // find moving parts (if this is an MDL model) diff --git a/src/Main/viewer_lookat.cxx b/src/Main/viewer_lookat.cxx index acbc0ed3f..fed2b3025 100644 --- a/src/Main/viewer_lookat.cxx +++ b/src/Main/viewer_lookat.cxx @@ -177,8 +177,8 @@ void FGViewerLookAt::update() { // THIS IS THE EXPERIMENTAL VIEWING ANGLE SHIFTER // THE MAJORITY OF THE WORK IS DONE IN GUI.CXX // this in gui.cxx for now just testing - extern float quat_mat[4][4]; - sgPreMultMat4( VIEW, quat_mat); + extern float GuiQuat_mat[4][4]; + sgPreMultMat4( VIEW, GuiQuat_mat); // !!!!!!!!!! testing // Given a vector pointing straight down (-Z), map into onto the diff --git a/src/Main/viewer_rph.cxx b/src/Main/viewer_rph.cxx index ca632928e..a1be07d04 100644 --- a/src/Main/viewer_rph.cxx +++ b/src/Main/viewer_rph.cxx @@ -303,8 +303,8 @@ void FGViewerRPH::update() { // THIS IS THE EXPERIMENTAL VIEWING ANGLE SHIFTER // THE MAJORITY OF THE WORK IS DONE IN GUI.CXX // this in gui.cxx for now just testing - extern float quat_mat[4][4]; - sgPreMultMat4( VIEW, quat_mat); + extern float GuiQuat_mat[4][4]; + sgPreMultMat4( VIEW, GuiQuat_mat); // !!!!!!!!!! testing // Given a vector pointing straight down (-Z), map into onto the -- 2.39.5