1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     math_Transform.cpp
4 
5   Copyright (C)2009 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 12449 $
14  *---------------------------------------------------------------------------*/
15 
16 #include <nn/math.h>
17 
18 #include <nn/math/math_Transform.h>
19 
20 namespace nn { namespace math {
21 
22 /* ------------------------------------------------------------------------
23         簡易レポート用関数
24    ------------------------------------------------------------------------ */
25 
26 /*!--------------------------------------------------------------------------*
27   Name:         Transform2::Report
28 
29   @brief        Transform2 の内容をデバッグ出力に書き出します。
30 
31   @param[in]    bNewline  true なら出力の最後に改行を出力します。
32   @param[in]    name    Transform2 の名前を指定します。NULL指定可能です。
33 
34   @return       なし
35  *---------------------------------------------------------------------------*/
36 void
Report(bool bNewline,const char * name) const37 Transform2::Report(bool bNewline, const char* name) const
38 {
39     if (name) { NN_MATH_REPORT("%s", name); }
40     else { NN_MATH_REPORT("Transform2\n"); }
41 
42     NN_MATH_REPORT("Scale    <%f, %f>\n", scale.x, scale.y);
43     NN_MATH_REPORT("Rotate   <%f, %f>\n", rotate.x, rotate.y);
44     NN_MATH_REPORT("Translate<%f, %f>\n", translate.x, translate.y);
45 
46     if (bNewline) { NN_MATH_REPORT("\n"); }
47 }
48 
49 /*!--------------------------------------------------------------------------*
50   Name:         Transform3::Report
51 
52   @brief        Transform3 の内容をデバッグ出力に書き出します。
53 
54   @param[in]    bNewline  true なら出力の最後に改行を出力します。
55   @param[in]    name    Transform3 の名前を指定します。NULL指定可能です。
56 
57   @return       なし
58  *---------------------------------------------------------------------------*/
59 void
Report(bool bNewline,const char * name) const60 Transform3::Report(bool bNewline, const char* name) const
61 {
62     if (name) { NN_MATH_REPORT("%s", name); }
63     else { NN_MATH_REPORT("Transform3\n"); }
64 
65     NN_MATH_REPORT("Scale    <%f, %f, %f>\n", scale.x, scale.y, scale.z);
66     NN_MATH_REPORT("Rotate   <%f, %f, %f>\n", rotate.x, rotate.y, rotate.z);
67     NN_MATH_REPORT("Translate<%f, %f, %f>\n", translate.x, translate.y, translate.z);
68 
69     if (bNewline) { NN_MATH_REPORT("\n"); }
70 }
71 
72 
73 }  // namespace math
74 }  // namespace nn
75