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

narMarkerTrans.h

説明を見る。
00001 /*-----------------------------------------------------------------------*
00002   Project:  Nintendo Augmented Reality Library.
00003   File:     narMarkerTrans.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 
00022 #ifndef NAR_MARKER_TRANS_H__
00023 #define NAR_MARKER_TRANS_H__
00024 
00025 #include "narConfig.h"
00026 #include "narProjection.h"
00027 #include "narFlags.h"
00028 
00029 namespace mw { namespace nar
00030 {
00033     class MarkerTrans_cl
00034     {
00035         friend class MarkerTransCore_cl;
00036     public:
00039         MarkerTrans_cl()
00040              : mcp_Distortion( 0 )
00041         {}
00042 
00046         bool Estimate( Marker_cl & r_Marker, const Projection_cl & cr_Proj ) const;
00047 
00052         void SetMildRotation( bool b, f32 t = 0.5f )
00053         {
00054             m_Flags.Set( b, me_SwitchMildRotation );
00055             m_InterpolationCoefficient = t;
00056         }
00057 
00062         void SetAccelerationOnMildRotation( bool b, f32 t = 0.25f )
00063         {
00064             m_Flags.Set( b, me_SwitchAcceleration );
00065             m_InterpolationCoefficientOnRapidMovement = t;
00066         }
00067 
00069 
00071         const Distortion_cl * SetDistortionCorrection( const Distortion_cl * cp )
00072         {
00073             const Distortion_cl * cp_Ret = mcp_Distortion;
00074             mcp_Distortion = cp;
00075             return cp_Ret;
00076         }
00078 
00079     private:
00080         enum Switch_e
00081         {
00082             me_SwitchBase,
00083             NAR_EFLAG( me_SwitchMildRotation ),
00084             NAR_EFLAG( me_SwitchAcceleration ),
00085             me_SwitchEnd
00086         };
00087 
00089         Flags_tc< u32, Switch_e >   m_Flags;
00091         f32                         m_InterpolationCoefficient;
00093         f32                         m_InterpolationCoefficientOnRapidMovement;
00094 
00096         const Distortion_cl *       mcp_Distortion;
00097     };
00098 }
00099 }
00100 
00101 #endif

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