public static void updateRectStatus(NyARTargetList i_list, INyARVectorReader i_vecreader, NyARRectTargetStatusPool i_stpool, LowResolutionLabelingSamplerOut.Item[] source, int[] index) { NyARTarget[] rct = i_list.getArray(); NyARTarget d_ptr; //ターゲットの更新 for (int i = i_list.getLength() - 1; i >= 0; i--) { d_ptr = rct[i]; //年齢を加算 d_ptr._status_life--; //新しいステータスの作成 NyARRectTargetStatus st = i_stpool.newObject(); if (st == null) { //失敗(作れなかった?) d_ptr._delay_tick++; continue; } int sample_index = index[i]; LowResolutionLabelingSamplerOut.Item s = sample_index < 0?null:source[sample_index]; if (!st.setValueByAutoSelect(i_vecreader, s, (NyARRectTargetStatus)d_ptr._ref_status)) { st.releaseObject(); d_ptr._delay_tick++; continue; } else { if (s != null) { d_ptr.setSampleArea(s); } } d_ptr._ref_status.releaseObject(); d_ptr._ref_status = st; d_ptr._delay_tick = 0; } }