00001 /*-----------------------------------------------------------------------* 00002 Project: Nintendo Augmented Reality Library. 00003 File: narProjection.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_PROJECTION_H__ 00023 #define NAR_PROJECTION_H__ 00024 00025 #include "narPort.h" 00026 00027 #ifdef NAR_CTR__ 00028 namespace nn { 00029 namespace math { 00030 struct MTX44; 00031 } 00032 } 00033 #endif 00034 00035 namespace mw { namespace nar 00036 { 00037 struct Vec2F_st ; 00038 struct Vec3F_st ; 00039 class Distortion_cl; 00042 class Projection_cl 00043 { 00044 public: 00045 Projection_cl() 00046 {} 00047 00055 Projection_cl( f32 w, f32 h, f32 near, f32 far, f32 aov = 66.0 ) 00056 { 00057 Set( w, h, near, far, aov ); 00058 } 00059 00067 void Set( f32 w, f32 h, f32 near, f32 far, f32 aov = 66.0 ); 00068 #ifdef NAR_TWL__ 00069 00071 void GetMtxFx44( MtxFx44 & r_Mtx ) const ; 00072 #endif 00073 #ifdef NAR_CTR__ 00074 00076 void GetMTX44( nn::math::MTX44 & r_Mtx ) const; 00077 00085 void GetTrimmed( nn::math::MTX44 & r_Mtx, f32 l, f32 r, f32 b, f32 t, f32 n, f32 f, f32 aov = 66.f ) const; 00086 #endif 00087 00088 00093 void GetVtxOnReferencePlane( Vec3F_st & r_Vec3, const Vec2F_st & r_Vec2 ) const; 00094 00100 void GetVtxOnReferencePlane( Vec3F_st & r_Vec3, const Vec2F_st & cr_Vec2, const Distortion_cl & cr_Dist ) const; 00102 private: 00103 f32 m_00; 00104 f32 m_11; 00105 f32 m_22; 00106 f32 m_32; 00107 f32 m_HalfWidth; 00108 f32 m_HalfHeight; 00109 }; 00110 } 00111 } 00112 00113 #endif
© 2011-2012 Nintendo. All rights reserved.
CONFIDENTIAL