#endif
#include <vector>
+#include <set>
SG_USING_STD(vector);
+SG_USING_STD(set);
#include <plib/sg.h>
#include <plib/ssg.h>
+#include <simgear/misc/sg_path.hxx>
#include <simgear/props/props.hxx>
#endif
+/**
+ * Abstract class for adding data to the scene graph. modelLoaded() is
+ * called by sgLoad3DModel() after the model was loaded, and the destructor
+ * when the branch is removed from the graph.
+ */
+class SGModelData : public ssgBase {
+public:
+ virtual ~SGModelData() {}
+ virtual void modelLoaded( const string& path, SGPropertyNode *prop,
+ ssgBranch *branch) {}
+};
+
+
/**
* Load a 3D model with or without XML wrapper. Note, this version
* Does not know about or load the panel/cockpit information. Use the
ssgBranch *
sgLoad3DModel( const string& fg_root, const string &path,
SGPropertyNode *prop_root, double sim_time_sec,
- ssgEntity *(*load_panel)(SGPropertyNode *) = 0 );
+ ssgEntity *(*load_panel)(SGPropertyNode *) = 0,
+ SGModelData *data = 0 );
/**
vector<SGPropertyNode_ptr> &name_nodes,
SGPropertyNode *prop_root,
SGPropertyNode_ptr node,
- double sim_time_sec );
+ double sim_time_sec,
+ SGPath &texture_path,
+ set<ssgBranch *> &ignore_branches );
/**
* Set the filter state on models
bool
sgSetModelFilter( bool filter );
+/**
+ * Check if the ssg node contains an animation
+ */
+bool
+sgCheckAnimationBranch (ssgEntity * entity);
+
+/**
+ * Enable or disable Display list usage
+ */
+extern bool sgUseDisplayList;
+
#endif // __MODEL_HXX