virtual ~FGODGauge();
/**
- * Replace an opengl texture name inside the aircraft scene graph.
+ * Replace an opengl texture name inside a given branch of the scene graph.
* This is to replace a static texture by a dynamic one
- * @param name texture filename
- * @param new_texture dynamic texture to replace the old one
+ *
+ * @param branch Scene graph branch to use for search
+ * @param name texture filename
+ * @param new_texture dynamic texture to replace the old one
* @return A list of groups which override the given texture
*/
static
- simgear::canvas::Placements set_texture( const char * name,
+ simgear::canvas::Placements set_texture( osg::Node* branch,
+ const char * name,
osg::Texture2D* new_texture );
/**
* Replace an opengl texture name inside the aircraft scene graph.
+ * This is to replace a static texture by a dynamic one
+ *
+ * @param branch Scene graph branch to search for matching
+ * @param name texture filename
+ * @param new_texture dynamic texture to replace the old one
+ * @return A list of groups which override the given texture
+ */
+ static
+ simgear::canvas::Placements
+ set_aircraft_texture( const char * name,
+ osg::Texture2D* new_texture );
+
+ /**
+ * Replace an opengl texture name inside a given branch of the scene graph.
* This is to replace a static texture by a dynamic one. The replacement
* is base on certain filtering criteria which have to be stored in string
* value childs of the placement node. Recognized nodes are:
* - texture Match the name of the texture
* - node Match the name of the object
* - parent Match any of the object parents names (all the tree upwards)
+ *
* @param placement the node containing the replacement criteria
* @param new_texture dynamic texture to replace the old one
* @param an optional cull callback which will be installed on any matching
*/
static
simgear::canvas::Placements
- set_texture( SGPropertyNode* placement,
+ set_texture( osg::Node* branch,
+ SGPropertyNode* placement,
osg::Texture2D* new_texture,
- osg::NodeCallback* cull_callback = 0 );
+ osg::NodeCallback* cull_callback = 0,
+ const simgear::canvas::CanvasWeakPtr& canvas =
+ simgear::canvas::CanvasWeakPtr() );
+
+ /**
+ * Replace an opengl texture name inside the aircraft scene graph.
+ *
+ * @param placement the node containing the replacement criteria
+ * @param new_texture dynamic texture to replace the old one
+ * @param an optional cull callback which will be installed on any matching
+ * object
+ * @return A list of groups which override the given texture
+ */
+ static
+ simgear::canvas::Placements
+ set_aircraft_texture( SGPropertyNode* placement,
+ osg::Texture2D* new_texture,
+ osg::NodeCallback* cull_callback = 0,
+ const simgear::canvas::CanvasWeakPtr& canvas =
+ simgear::canvas::CanvasWeakPtr() );
};