From: o_ggy Date: Sat, 16 Oct 2010 02:08:17 +0000 (+0900) Subject: Merge branch 'master' of o_ggy@git.sourceforge.jp:/gitroot/moflib/moflib X-Git-Url: http://git.osdn.net/view?p=moflib%2Fmoflib.git;a=commitdiff_plain;h=af30737e6141daa624d97e2ad6524a067a7984d3 Merge branch 'master' of o_ggy@git.sourceforge.jp:/gitroot/moflib/moflib Conflicts: .gitignore SettingEditorAPI/Debug/SettingEditorAPI.ilk SettingEditorAPI/SettingEditorAPI/SettingEditorAPI.vcxproj TODO.txt lib/Debug/mofmath.lib libogg-1.2.0/win32/VS2008/_UpgradeReport_Files/UpgradeReport.css libogg-1.2.0/win32/VS2008/_UpgradeReport_Files/UpgradeReport.xslt libogg-1.2.0/win32/VS2008/_UpgradeReport_Files/UpgradeReport_Minus.gif libogg-1.2.0/win32/VS2008/_UpgradeReport_Files/UpgradeReport_Plus.gif moflib/moflib/moflib.vcxproj.user nkf/nkf/Release/link.read.1.tlog nkf/nkf/nkf.vcxproj nkf/nkf/nkf.vcxproj.filters sqlite/sqlite/Release/mt.read.1.tlog sqlite/sqlite/Release/sqlite3.dll.intermediate.manifest sqlite/sqlite/sqlite.vcxproj.user src/mof/math/matrix3.hpp src/mof/math/test/testbin/Debug/make_matrix_test.ilk src/mof/math/test/testbin/Debug/matrix2_test.ilk src/mof/math/test/testbin/Debug/matrix3_test.ilk src/mof/math/test/testbin/Debug/vector2_test.ilk src/mof/math/test/testbin/Debug/vector3_test.ilk --- af30737e6141daa624d97e2ad6524a067a7984d3 diff --cc TODO.txt index 1874543,772d7bf..a6d9bae --- a/TODO.txt +++ b/TODO.txt @@@ -1,18 -1,23 +1,18 @@@ - - make_zero - test using boost::test - make_rotation make_scaling *** test - make_rotation make_scaling *** impl - doxygen - - - Windows‚ŃRƒ“ƒpƒCƒ‹‰Â”\‚É‚·‚é - *numeric -> numeric_performance - - - Visual Studio 10 on Windows---- - vcvarsall.bat - cmake .. -G "Visual Studio 10" - - TODO *test‚̏o—Í‚Ì•\Ž¦‚Ì‚³‚¹‚©‚½ - vector,matrix‚ɂ‚¢‚Äconst•Ï”‚Å‚àƒRƒ“ƒpƒCƒ‹‚Í’Ê‚é‚悤‚É‚·‚é -いらないfriend削除 -実装の理由のメモ ++ + make_zero + test using boost::test + make_rotation make_scaling *** test + make_rotation make_scaling *** impl + doxygen + + -Windows‚ŃRƒ“ƒpƒCƒ‹‰Â”\‚É‚·‚é -*testbin‚Ísrc/‚Ì’†‚Å‚¢‚¢‚©H -*testƒR[ƒh‚̃Rƒ“ƒpƒCƒ‹‚ª’Ê‚ç‚È‚¢ -*test‚ðŽÀs‚·‚é‚ɂ́H ++Windows$B$G%3%s%Q%$%k2DG=$K$9$k(B + *numeric -> numeric_performance + + + Visual Studio 10 on Windows---- + vcvarsall.bat + cmake .. -G "Visual Studio 10" + -TODO *test‚̏o—Í‚Ì•\Ž¦‚Ì‚³‚¹‚©‚½ -windows‚Ìboost/operations‚Å‚Í N = N1 * N2‚ÅcopyƒRƒ“ƒXƒgƒ‰ƒNƒ^‚ªŒÄ‚΂ê‚éH -vector,matrix‚ɂ‚¢‚Äconst•Ï”‚Å‚àƒRƒ“ƒpƒCƒ‹‚Í’Ê‚é‚悤‚É‚·‚é ++TODO *test$B$N=PNO$NI=<($N$5$;$+$?(B ++vector,matrix$B$K$D$$$F(Bconst$BJQ?t$G$b%3%s%Q%$%k$ODL$k$h$&$K$9$k(B diff --cc src/mof/math/matrix3.hpp index d87f80d,af56f75..499e408 --- a/src/mof/math/matrix3.hpp +++ b/src/mof/math/matrix3.hpp @@@ -1,83 -1,83 +1,83 @@@ - #pragma once - #include - - namespace mof - { - namespace math - { - class vector3; - - /** - * @brief 3次元同次座標変換行列クラス - */ - class matrix3 : public basic_matrix<3, matrix3, vector3> - { - public: - //{{{ constructor - /** - * @brief デフォルトコンストラクタ - * @note 効率のため,初期化は行われない - */ - matrix3() - { - } - - /** - * @brief 指定した値で初期化する. - * @tparam T 配列型(operator[]をオーバーロードしていること) - * @param[in] arr 初期化用配列 - */ - template - explicit matrix3(const T& arr) - { - for (size_t i = 0; i < size(); ++i) { - elements_[i] = arr[i]; - } - } - - /** - * @brief 指定した値で初期化する. - */ - matrix3 - ( - float m11, float m12, float m13, float m14, - float m21, float m22, float m23, float m24, - float m31, float m32, float m33, float m34 - ) - { - const float* table[] = - { - &m11, &m12, &m13, &m14, - &m21, &m22, &m23, &m24, - &m31, &m32, &m33, &m34 - }; - for (size_t i = 0; i < size(); ++i) { - elements_[i] = *table[i]; - } - } - - //}}} - //{{{ copy constructor - matrix3(const matrix3& rhs) - { - for (size_t i = 0; i < size(); ++i) { - elements_[i] = rhs.elements_[i]; - } - } - //}}} - //{{{ operator = - /** - * @note コピーのパフォーマンスのためにこの関数の定義は重要 - */ - matrix3& operator = (const matrix3& rhs) - { - for (size_t i = 0; i < size(); ++i) { - elements_[i] = rhs.elements_[i]; - } - return *this; - } - //}}} - }; - - }// namespace math - }// namespace mof + #pragma once + #include + + namespace mof + { + namespace math + { + class vector3; + + /** - * @brief 3次元同次座標変換行列クラス ++ * @brief 3次元同次座標変換行列クラス + */ + class matrix3 : public basic_matrix<3, matrix3, vector3> + { + public: + //{{{ constructor + /** - * @brief デフォルトコンストラクタ - * @note 効率のため,初期化は行われない ++ * @brief デフォルトコンストラクタ ++ * @note 効率のため,初期化は行われない + */ + matrix3() + { + } + + /** - * @brief 指定した値で初期化する. - * @tparam T 配列型(operator[]をオーバーロードしていること) - * @param[in] arr 初期化用配列 ++ * @brief 指定した値で初期化する. ++ * @tparam T 配列型(operator[]をオーバーロードしていること) ++ * @param[in] arr 初期化用配列 + */ + template + explicit matrix3(const T& arr) + { + for (size_t i = 0; i < size(); ++i) { + elements_[i] = arr[i]; + } + } + + /** - * @brief 指定した値で初期化する. ++ * @brief 指定した値で初期化する. + */ + matrix3 + ( + float m11, float m12, float m13, float m14, + float m21, float m22, float m23, float m24, + float m31, float m32, float m33, float m34 + ) + { + const float* table[] = + { + &m11, &m12, &m13, &m14, + &m21, &m22, &m23, &m24, + &m31, &m32, &m33, &m34 + }; + for (size_t i = 0; i < size(); ++i) { + elements_[i] = *table[i]; + } + } + + //}}} + //{{{ copy constructor + matrix3(const matrix3& rhs) + { + for (size_t i = 0; i < size(); ++i) { + elements_[i] = rhs.elements_[i]; + } + } + //}}} + //{{{ operator = + /** - * @note コピーのパフォーマンスのためにこの関数の定義は重要 ++ * @note コピーのパフォーマンスのためにこの関数の定義は重要 + */ + matrix3& operator = (const matrix3& rhs) + { + for (size_t i = 0; i < size(); ++i) { + elements_[i] = rhs.elements_[i]; + } + return *this; + } + //}}} + }; + + }// namespace math + }// namespace mof diff --cc src/mof/math/test/testbin/Debug/make_matrix_test.ilk index 77b8113,3a66066..0b9f021 Binary files differ diff --cc src/mof/math/test/testbin/Debug/matrix2_test.ilk index 5b3cdf1,955ebb0..39c331b Binary files differ diff --cc src/mof/math/test/testbin/Debug/matrix3_test.ilk index 3c680cb,9c186d6..e96df12 Binary files differ diff --cc src/mof/math/test/testbin/Debug/vector2_test.ilk index 78ecd14,d43e3cd..1e6815a Binary files differ diff --cc src/mof/math/test/testbin/Debug/vector3_test.ilk index 5e2851b,05b6eae..3f8f356 Binary files differ