}
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" );
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)
// 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
// 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