コード例 #1
0
void SimpleCameraObjectScript::onConnected(SessionEventProviderPtr from, const SpaceObjectReference& name, int64 token) {
    mID = name;
    mSelfProxy = mParent->self(mID);

    mGraphics = mParent->runSimulation(name, "ogregraphics");
    Invokable::Array args;
    args.push_back( Invokable::asAny((String)"setInputHandler") );
    args.push_back( Invokable::asAny((Invokable*)this) );
    mGraphics->invoke(args);
}
コード例 #2
0
void SimpleCameraObjectScript::onConnected(SessionEventProviderPtr from, const SpaceObjectReference& name, int64 token) {
    mID = name;
    mSelfProxy = mParent->self(mID);

    /**
       FIXME:
       lkjs;
       Right now, not cleaning up allocated strand passed into runSimulation
     */

    mGraphics = mParent->runSimulation(name, "ogregraphics", Network::IOStrandPtr(context()->ioService->createStrand("SimpleCameraObjectScript OgreRenderer")));
    Invokable::Array args;
    args.push_back( Invokable::asAny((String)"setInputHandler") );
    args.push_back( Invokable::asAny((Invokable*)this) );
    mGraphics->invoke(args);
}
コード例 #3
0
void SimpleCameraObjectScript::quitAction() {
    Invokable::Array args;
    args.push_back( Invokable::asAny((String)"quit") );
    mGraphics->invoke(args);
}
コード例 #4
0
void SimpleCameraObjectScript::toggleSuspendAction() {
    Invokable::Array args;
    args.push_back( Invokable::asAny((String)"toggleSuspend") );
    mGraphics->invoke(args);
}