Example #1
0
        public SimpleLiteD3d(NyARToolkitCS topLevelForm, ResourceBuilder i_resource)
        {
            NyMath.initialize();
            this._capture = i_resource.createWmCapture();
            this._capture.setOnSample(this);

            this._d3dmgr = i_resource.createD3dManager(topLevelForm);
            this._back_ground = i_resource.createBackGround(this._d3dmgr);
            this._d3dcube = new ColorCube(this._d3dmgr.d3d_device,40);


            //AR用のパターンコードを読み出
            NyARCode code = i_resource.createNyARCode();
            //ARラスタを作る(DirectShowキャプチャ仕様)。
            this.m_raster = i_resource.createARRaster();

            //1パターンのみを追跡するクラスを作成
            this.m_ar = new NyARSingleDetectMarker(i_resource.ar_param, code, 80.0, this.m_raster.getBufferType());
            //計算モードの設定
            this.m_ar.setContinueMode(false);

            ////立方体(頂点数8)の準備


            return;
        }
Example #2
0
        public SimpleLiteD3d(NyARToolkitCS topLevelForm, ResourceBuilder i_resource)
        {
            NyMath.initialize();
            this._capture = i_resource.createWmCapture();
            this._capture.setOnSample(this);

            this._d3dmgr      = i_resource.createD3dManager(topLevelForm);
            this._back_ground = i_resource.createBackGround(this._d3dmgr);
            this._d3dcube     = new ColorCube(this._d3dmgr.d3d_device, 40);


            //AR用のパターンコードを読み出
            NyARCode code = i_resource.createNyARCode();

            //ARラスタを作る(DirectShowキャプチャ仕様)。
            this.m_raster = i_resource.createARRaster();

            //1パターンのみを追跡するクラスを作成
            this.m_ar = new NyARSingleDetectMarker(i_resource.ar_param, code, 80.0, this.m_raster.getBufferType());
            //計算モードの設定
            this.m_ar.setContinueMode(false);

            ////立方体(頂点数8)の準備


            return;
        }
Example #3
0
        public Test_NyARRealityD3d_ARMarker(Form1 topLevelForm, ResourceBuilder i_resource)
        {
            this._capture = i_resource.createWmCapture();
            this._capture.setOnSample(this);

            this._d3dmgr      = i_resource.createD3dManager(topLevelForm);
            this._back_ground = i_resource.createBackGround(this._d3dmgr);
            this._d3dcube     = new ColorCube(this._d3dmgr.d3d_device, 40);


            //ARラスタを作る(DirectShowキャプチャ仕様)。
            this.m_raster = i_resource.createARRaster();
            //AR用のパターンコードを読み出


            //マーカライブラリ(ARTKId)の構築
            this._mklib = new ARTKMarkerTable(10, 16, 16, 25, 25, 4);
            //マーカテーブルの作成(1種類)
            this._mklib.addMarker(i_resource.createNyARCode(), 0, "HIRO", 80, 80);

            //Realityの準備
            this._reality        = new NyARRealityD3d(i_resource.ar_param, 10, 10000, 1, 5);
            this._reality_source = new NyARRealitySource_WMCapture(SCREEN_WIDTH, SCREEN_HEIGHT, null, 2, 100);
        }
        public Test_NyARRealityD3d_ARMarker(Form1 topLevelForm, ResourceBuilder i_resource)
        {
            this._capture = i_resource.createWmCapture();
            this._capture.setOnSample(this);

            this._d3dmgr = i_resource.createD3dManager(topLevelForm);
            this._back_ground = i_resource.createBackGround(this._d3dmgr);
            this._d3dcube = new ColorCube(this._d3dmgr.d3d_device,40);


            //ARラスタを作る(DirectShowキャプチャ仕様)。
            this.m_raster = i_resource.createARRaster();
            //AR用のパターンコードを読み出


            //マーカライブラリ(ARTKId)の構築
            this._mklib = new ARTKMarkerTable(10, 16, 16, 25, 25, 4);
            //マーカテーブルの作成(1種類)
            this._mklib.addMarker(i_resource.createNyARCode(), 0, "HIRO", 80, 80);

            //Realityの準備
            this._reality = new NyARRealityD3d(i_resource.ar_param, 10, 10000, 1, 5);
            this._reality_source = new NyARRealitySource_WMCapture(SCREEN_WIDTH, SCREEN_HEIGHT, null, 2, 100);


        }