• メインページ
  • クラス
  • ファイル
  • ファイル一覧
  • ファイルメンバ

narMarkerDatabase.h

説明を見る。
00001 /*-----------------------------------------------------------------------*
00002   Project:  Nintendo Augmented Reality Library.
00003   File:     narMarkerDatabase.h
00004 
00005   Copyright (C)2011-2012 Nintendo Co., Ltd.  All rights reserved.
00006 
00007   These coded instructions, statements, and computer programs contain
00008   proprietary information of Nintendo and/or its licensed developers
00009   and are protected by national and international copyright laws. They
00010   may not be disclosed to third parties or copied or duplicated in any
00011   form, in whole or in part, without the prior written consent of
00012   Nintendo.
00013   The content herein is highly confidential and should be handled
00014   accordingly.
00015 *-----------------------------------------------------------------------*/
00016 
00021 #ifndef NAR_MARKER_DATABASE_H__
00022 #define NAR_MARKER_DATABASE_H__
00023 
00024 #include "narConfig.h"
00025 #include "narMarkerTemplate.h"
00026 
00027 namespace mw { namespace nar
00028 {
00029     class MarkerPattern_st;
00030 
00034     class MarkerDatabase_cl
00035     {
00036     public:
00042         MarkerDatabase_cl( f32 th = 0.5f )
00043              : m_TemplateNum( 0 ), m_Threshold( th ), mp_Template( 0 )
00044         {
00045         }
00046 
00051         bool Register( MarkerTemplate_st & r_Template );
00052 
00058         bool Unregister( MarkerTemplate_st & r_Template );
00059 
00063         void UnregisterAll()
00064         {
00065             m_TemplateNum   = 0;
00066             mp_Template     = 0;
00067         }
00068 
00072         bool IsRegistered( const MarkerTemplate_st & cr_Template );
00073 
00077         void SetThreshold( f32 th ){ m_Threshold = th; }
00078 
00082         f32 GetThreshold() const { return m_Threshold; }
00083 
00085 
00087         const MarkerTemplate_st * Find( s32 * p_Dir, f32 * p_Score, const MarkerPattern_st & cr_Pattern );
00089     private:
00090         u32                     m_TemplateNum;
00092         f32                     m_Threshold;
00093         MarkerTemplate_st *     mp_Template;
00094     };
00095 }
00096 }
00097 
00098 #endif

© 2011-2012 Nintendo Co., Ltd. All rights reserved.