Fixed type of osg::ApplicationUsage::set/getApplictionName(), updated

demos accordingly.

Made OsgCameraGroup set the _applicationUsage to the
osg::ApplicationUsage::instance() when no ArgumentParser is supplied.

Added export to osgProducer::ViewerEventAdapter.
This commit is contained in:
Robert Osfield 2003-04-09 08:20:08 +00:00
parent 1e689ae57a
commit b02917e7a2
5 changed files with 8 additions and 5 deletions

View File

@ -20,7 +20,7 @@ int main( int argc, char **argv )
osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setApplicatonName(arguments.getApplicationName());
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");

View File

@ -52,7 +52,7 @@ int main( int argc, char **argv )
osg::ArgumentParser arguments(&argc,argv);
// set up the usage document, in case we need to print out how to use this program.
arguments.getApplicationUsage()->setApplicatonName(arguments.getApplicationName());
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");

View File

@ -35,8 +35,8 @@ class SG_EXPORT ApplicationUsage
typedef std::map<std::string,std::string> UsageMap;
void setApplicatonName(const std::string& name) { _applicationName = name; }
const std::string& getApplicatonName() const { return _applicationName; }
void setApplicationName(const std::string& name) { _applicationName = name; }
const std::string& getApplicationName() const { return _applicationName; }
void setDescription(const std::string& desc) { _description = desc; }
const std::string& getDescription() const { return _description; }

View File

@ -19,7 +19,7 @@
namespace osgProducer {
class ViewerEventHandler : public osgGA::GUIEventHandler
class OSGPRODUCER_EXPORT ViewerEventHandler : public osgGA::GUIEventHandler
{
public:

View File

@ -89,18 +89,21 @@ std::string extractCameraConfigFile(osg::ArgumentParser& arguments)
OsgCameraGroup::OsgCameraGroup() : Producer::CameraGroup()
{
_init();
_applicationUsage = osg::ApplicationUsage::instance();
}
OsgCameraGroup::OsgCameraGroup(Producer::CameraConfig *cfg):
Producer::CameraGroup(cfg)
{
_init();
_applicationUsage = osg::ApplicationUsage::instance();
}
OsgCameraGroup::OsgCameraGroup(const std::string& configFile):
Producer::CameraGroup(findCameraConfigFile(configFile))
{
_init();
_applicationUsage = osg::ApplicationUsage::instance();
}
OsgCameraGroup::OsgCameraGroup(osg::ArgumentParser& arguments):