OSDN Git Service

[Backup]NyARToolkitCPP
authornyatla <nyatla@7cac0a50-4618-4814-88d0-24b83990f816>
Fri, 30 Oct 2009 16:01:08 +0000 (16:01 +0000)
committernyatla <nyatla@7cac0a50-4618-4814-88d0-24b83990f816>
Fri, 30 Oct 2009 16:01:08 +0000 (16:01 +0000)
2.4.0候補

src/jp/nyatla/nyartoolkit/processor/SingleARMarkerProcesser.java
src/jp/nyatla/nyartoolkit/processor/SingleNyIdMarkerProcesser.java

index 83769d6..1d9d5f0 100644 (file)
@@ -101,9 +101,13 @@ public abstract class SingleARMarkerProcesser
                return;\r
        }\r
 \r
+       private boolean _initialized=false;\r
 \r
        protected void initInstance(NyARParam i_param,int i_raster_type) throws NyARException\r
        {\r
+               //初期化済?\r
+               assert this._initialized==false;\r
+               \r
                NyARIntSize scr_size = i_param.getScreenSize();\r
                // 解析オブジェクトを作る\r
                this._square_detect = new NyARSquareDetector_Rle(i_param.getDistortionFactor(), scr_size);\r
@@ -113,6 +117,7 @@ public abstract class SingleARMarkerProcesser
                // 2値画像バッファを作る\r
                this._bin_raster = new NyARBinRaster(scr_size.w, scr_size.h);\r
                this._threshold_detect=new NyARRasterThresholdAnalyzer_SlidePTile(15,i_raster_type,4);\r
+               this._initialized=true;\r
                return;\r
        }\r
 \r
index 4fd58af..b9b9fd1 100644 (file)
@@ -72,8 +72,12 @@ public abstract class SingleNyIdMarkerProcesser
        {\r
                return;\r
        }\r
+       private boolean _initialized=false;\r
        protected void initInstance(NyARParam i_param,INyIdMarkerDataEncoder i_encoder,int i_raster_format) throws NyARException\r
        {\r
+               //初期化済?\r
+               assert this._initialized==false;\r
+               \r
                NyARIntSize scr_size = i_param.getScreenSize();\r
                // 解析オブジェクトを作る\r
                this._square_detect = new NyARSquareDetector_Rle(i_param.getDistortionFactor(), scr_size);\r
@@ -88,6 +92,7 @@ public abstract class SingleNyIdMarkerProcesser
                this._data_current=i_encoder.createDataInstance();\r
                this._tobin_filter = new NyARRasterFilter_ARToolkitThreshold(110,i_raster_format);\r
                this._threshold_detect=new NyARRasterThresholdAnalyzer_SlidePTile(15,i_raster_format,4);\r
+               this._initialized=true;\r
                return;\r
                \r
        }\r