using namespace simgear;
-\f
-////////////////////////////////////////////////////////////////////////
-// Local static functions.
-////////////////////////////////////////////////////////////////////////
-
-/**
- * Internal method to test whether a file exists.
- *
- * TODO: this should be moved to a SimGear library of local file
- * functions.
- */
-static inline bool
-local_file_exists( const string& path ) {
- sg_gzifstream in( path );
- if ( ! in.is_open() ) {
- return false;
- } else {
- return true;
- }
-}
-
-
\f
////////////////////////////////////////////////////////////////////////
// Implementation of SGMatModel.
_models_loaded = true;
}
-osg::Node*
-SGMatModel::get_model( int index,
- SGPropertyNode *prop_root )
-{
- load_models( prop_root ); // comment this out if preloading models
- return _models[index].get();
-}
-
osg::Node*
SGMatModel::get_random_model( SGPropertyNode *prop_root )
{
int get_model_count( SGPropertyNode *prop_root );
- /**
- * Get a specific variant model for the object.
- *
- * @param index The index of the model.
- * @return The model.
- */
- osg::Node *get_model( int index, SGPropertyNode *prop_root );
-
-
/**
* Get a randomly-selected variant model for the object.
*