我要发帖 回复

正式会员

1

主题

22

积分

0

专家分

:

私信
发表时间 : 2010-4-20 19:57:51 | 浏览 : 1251    评论 : 4
我的程序如下:
#include <vsgu.h>
#include <vp.h>
#include <vpApp.h>
#include "vuAllocTracer.h"
#include "vpObject.h"
#include "vpPathWayPointSet.h"
#include "vpPathNavigator.h"
#include "vpPathWay.h"
#include "vpInputMouse.h"
vuAllocTracer tracer(true, true);



class myApp : public vpApp {

public:

        /**
         * Constructor
         */
    myApp() {}

        /**
         * Destructor
         */
    ~myApp()
        {
                // unreference member variables which cache Vega Prime class instances
    }

        /**
         * Configure my app
         */
    int configure()
    {
        // configure vega prime system first
        vpApp::configure();

                // Init waypoints for path specification
                vpPathWayPointSet* waypoints = new vpPathWayPointSet("Obs_WayPointSet.way");
                waypoints->ref();

                vpPathNavigator* navigator   = new vpPathNavigator("Obs_Navigator.nav");
                navigator->ref();

        vpObserver* obs = vpObserver::find( "myObserver" );
        if (obs)
        {
            obs->setStrategy(navigator);
            obs->setStrategyEnable(true);
        }

        return vsgu::SUCCESS;
    }
};



int main(int argc, char *argv[])
{
    // initialize vega prime
    vp::initialize(argc, argv);


    // create a vpApp instance
    vpApp *app = new vpApp;

    // load acf file
    if (argc <= 1)
        app->define("ok all model.acf");
    else
        app->define(argv[1]);
        
    // configure my app
    app->configure();

    // runtime loop
    app->run();
   
    // unref my app instance
    app->unref();
   
    // shutdown vega prime
    vp::shutdown();

    return 0;
}


  想用程序控制实现Observer沿着Obs_Navegator设定的路径运动,但是没做到,想请教哪位高手解决一下。谢谢啊!

最近VR访客

jor_dan 评论于2010-4-20 19:58:20
急!!!
becalm 评论于2010-5-27 17:36:30
我也刚接触,不太懂,友情帮顶!
sichuanwww 评论于2010-9-16 08:31:08
看看例子。
努力挣钱,快乐生活!
gubingjie 评论于2011-8-30 05:51:47
我知道怎么解决。。你自定义的函数没被调用。

手机版|VR开发网 统计 津ICP备18009691号
网安备12019202000257

GMT+8, 2023-3-20 04:50 PM

返回顶部