#ifndef _OD_GAUGE_HXX
#define _OD_GAUGE_HXX
+#include <Canvas/canvas_fwd.hpp>
+#include <Canvas/placement.hxx>
+
#include <osg/NodeCallback>
#include <osg/Group>
}
class SGPropertyNode;
-typedef std::vector<osg::ref_ptr<osg::Group> > Placements;
/**
* Owner Drawn Gauge helper class.
*/
class FGODGauge
{
-public:
+ public:
FGODGauge();
virtual ~FGODGauge();
int coverage_samples = 0,
int color_samples = 0 );
+ /**
+ * Enable/Disable updating the texture (If disabled the contents of the
+ * texture remains with the outcome of the last rendering pass)
+ */
+ void setRender(bool render);
+
/**
* Say if we can render to a texture.
* @return true if rtt is available
* @param new_texture dynamic texture to replace the old one
* @return A list of groups which override the given texture
*/
- Placements set_texture(const char * name, osg::Texture2D* new_texture);
+ static
+ canvas::Placements set_texture( const char * name,
+ osg::Texture2D* new_texture );
/**
* Replace an opengl texture name inside the aircraft scene graph.
* object
* @return A list of groups which override the given texture
*/
- Placements set_texture( const SGPropertyNode* placement,
- osg::Texture2D* new_texture,
- osg::NodeCallback* cull_callback = 0 );
+ static
+ canvas::Placements set_texture( const SGPropertyNode* placement,
+ osg::Texture2D* new_texture,
+ osg::NodeCallback* cull_callback = 0 );
/**
* Get the OSG camera for drawing this gauge.
// Real initialization function. Bad name.
void allocRT(osg::NodeCallback* camera_cull_callback = 0);
-private:
+ private:
int _size_x,
_size_y,
_view_width,