1 // model.hxx - manage a 3D aircraft model.
2 // Written by David Megginson, started 2002.
4 // This file is in the Public Domain, and comes with no warranty.
10 # error This library requires C++
22 #include <simgear/misc/sg_path.hxx>
23 #include <simgear/props/props.hxx>
26 // Has anyone done anything *really* stupid, like making min and max macros?
36 * Load a 3D model with or without XML wrapper. Note, this version
37 * Does not know about or load the panel/cockpit information. Use the
38 * "model_panel.hxx" version if you want to load an aircraft
39 * (i.e. ownship) with a panel.
41 * If the path ends in ".xml", then it will be used as a property-
42 * list wrapper to add animations to the model.
44 * Subsystems should not normally invoke this function directly;
45 * instead, they should use the FGModelLoader declared in loader.hxx.
48 sgLoad3DModel( const string& fg_root, const string &path,
49 SGPropertyNode *prop_root, double sim_time_sec,
50 ssgEntity *(*load_panel)(SGPropertyNode *) = 0 );
54 * Make an offset matrix from rotations and position offset.
57 sgMakeOffsetsMatrix( sgMat4 * result, double h_rot, double p_rot, double r_rot,
58 double x_off, double y_off, double z_off );
64 sgMakeAnimation( ssgBranch * model,
66 vector<SGPropertyNode_ptr> &name_nodes,
67 SGPropertyNode *prop_root,
68 SGPropertyNode_ptr node,
71 set<ssgBranch *> &ignore_branches );
74 * Set the filter state on models
77 sgSetModelFilter( bool filter );
80 * Check if the ssg node contains an animation
83 sgCheckAnimationBranch (ssgEntity * entity);
86 * Enable or disable Display list usage
88 extern bool sgUseDisplayList;