Fixed indentation
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
class EscapeHandler : public osgGA::GUIEventHandler
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
EscapeHandler() {}
|
||||
|
||||
bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa)
|
||||
@@ -22,7 +22,7 @@ class EscapeHandler : public osgGA::GUIEventHandler
|
||||
{
|
||||
osgViewer::View* view = dynamic_cast<osgViewer::View*>(&aa);
|
||||
if (view) view->getViewerBase()->setDone(true);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -37,9 +37,9 @@ class EscapeHandler : public osgGA::GUIEventHandler
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
osg::ArgumentParser arguments(&argc, argv);
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--login <url> <username> <password>", "Provide authentication information for http file access.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--password <password>", "Provide password for any vnc url on command line not mentioned in --login.");
|
||||
osgViewer::Viewer viewer(arguments);
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--login <url> <username> <password>", "Provide authentication information for http file access.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--password <password>", "Provide password for any vnc url on command line not mentioned in --login.");
|
||||
osgViewer::Viewer viewer(arguments);
|
||||
|
||||
osgWidget::GeometryHints hints(osg::Vec3(0.0f,0.0f,0.0f),
|
||||
osg::Vec3(1.0f,0.0f,0.0f),
|
||||
@@ -54,14 +54,14 @@ int main(int argc,char** argv)
|
||||
{
|
||||
}
|
||||
|
||||
std::string url, username, password;
|
||||
while (arguments.read("--login", url, username, password))
|
||||
{
|
||||
osgDB::Registry::instance()->getOrCreateAuthenticationMap()->addAuthenticationDetails(
|
||||
url,
|
||||
new osgDB::AuthenticationDetails(username, password)
|
||||
);
|
||||
}
|
||||
std::string url, username, password;
|
||||
while (arguments.read("--login", url, username, password))
|
||||
{
|
||||
osgDB::Registry::instance()->getOrCreateAuthenticationMap()->addAuthenticationDetails(
|
||||
url,
|
||||
new osgDB::AuthenticationDetails(username, password)
|
||||
);
|
||||
}
|
||||
|
||||
for(int i=1; i<arguments.argc(); ++i)
|
||||
{
|
||||
@@ -71,19 +71,19 @@ int main(int argc,char** argv)
|
||||
|
||||
if (!password.empty())
|
||||
{
|
||||
const osgDB::AuthenticationMap* authenticationMap = osgDB::Registry::instance()->getOrCreateAuthenticationMap();
|
||||
const osgDB::AuthenticationDetails* details = authenticationMap->getAuthenticationDetails(hostname);
|
||||
if (details == NULL)
|
||||
{
|
||||
authenticationMap->addAuthenticationDetails(hostname, new osgDB::AuthenticationDetails("", password));
|
||||
}
|
||||
const osgDB::AuthenticationMap* authenticationMap = osgDB::Registry::instance()->getOrCreateAuthenticationMap();
|
||||
const osgDB::AuthenticationDetails* details = authenticationMap->getAuthenticationDetails(hostname);
|
||||
if (details == NULL)
|
||||
{
|
||||
authenticationMap->addAuthenticationDetails(hostname, new osgDB::AuthenticationDetails("", password));
|
||||
}
|
||||
}
|
||||
|
||||
osg::ref_ptr<osgWidget::VncClient> vncClient = new osgWidget::VncClient;
|
||||
if (vncClient->connect(arguments[i], hints))
|
||||
{
|
||||
{
|
||||
group->addChild(vncClient.get());
|
||||
|
||||
|
||||
hints.position.x() += 1.1f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user