From: Dae Young Ryu Date: Wed, 13 Nov 2013 02:18:58 +0000 (+0900) Subject: class name changed _Matrix3Df -> _Matrix4f X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab02215b1ee404d9b0f60dfe5e0be5b3db518814;p=framework%2Fosp%2Fuifw.git class name changed _Matrix3Df -> _Matrix4f Change-Id: I4b06f4da2e65abb27bbd6042a8a60ee935b03d2a Signed-off-by: Dae Young Ryu --- diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 4b06671..8273743 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -265,7 +265,7 @@ SET (${this_target}_SOURCE_FILES FUi_CardLayoutImpl.cpp FUiInputConnection.cpp # FUi_InputConnectionImpl.cpp - FUi_Matrix3Df.cpp + FUi_Matrix4f.pp FUi_TouchEventManagerImpl.cpp FUiTouchEventManager.cpp FUiSystemUtil.cpp diff --git a/src/ui/FUi_Matrix3Df.cpp b/src/ui/FUi_Matrix4f.cpp similarity index 90% rename from src/ui/FUi_Matrix3Df.cpp rename to src/ui/FUi_Matrix4f.cpp index 3f693b0..79b6e5c 100644 --- a/src/ui/FUi_Matrix3Df.cpp +++ b/src/ui/FUi_Matrix4f.cpp @@ -16,7 +16,7 @@ // /** - * @file FUi_Matrix3Df.cpp + * @file FUi_Matrix4f.cpp * @brief Header file of _Matrix3Df class * * This file contains declarations _Matrix3Df class. @@ -24,7 +24,7 @@ #include #include "FUi_Math.h" -#include "FUi_Matrix3Df.h" +#include "FUi_Matrix4f.h" #define PI 3.141592653f @@ -44,19 +44,19 @@ float identityTransform[4][4] = namespace Tizen { namespace Ui { namespace Animations { -_Matrix3Df::_Matrix3Df(void) +_Matrix4f::_Matrix4f(void) { LoadIdentity(); } -_Matrix3Df::_Matrix3Df(const float* pValues) +_Matrix4f::_Matrix4f(const float* pValues) { memcpy(__m, pValues, sizeof(__m)); __complexity = GenericMatrix; } -_Matrix3Df& -_Matrix3Df::Assign(const _Matrix3Df& rhs) +_Matrix4f& +_Matrix4f::Assign(const _Matrix4f& rhs) { memcpy(__m, rhs.__m, sizeof(__m)); __complexity = rhs.__complexity; @@ -64,8 +64,8 @@ _Matrix3Df::Assign(const _Matrix3Df& rhs) return *this; } -_Matrix3Df& -_Matrix3Df::operator =(const _Matrix3Df& rhs) +_Matrix4f& +_Matrix4f::operator =(const _Matrix4f& rhs) { if (&rhs != this) return Assign(rhs); @@ -74,7 +74,7 @@ _Matrix3Df::operator =(const _Matrix3Df& rhs) } bool -_Matrix3Df::operator ==(const _Matrix3Df& rhs) const +_Matrix4f::operator ==(const _Matrix4f& rhs) const { return (__m[0][0] == rhs.__m[0][0] && __m[0][1] == rhs.__m[0][1] && @@ -95,7 +95,7 @@ _Matrix3Df::operator ==(const _Matrix3Df& rhs) const } bool -_Matrix3Df::operator !=(const _Matrix3Df& rhs) const +_Matrix4f::operator !=(const _Matrix4f& rhs) const { return (__m[0][0] != rhs.__m[0][0] || __m[0][1] != rhs.__m[0][1] || @@ -116,7 +116,7 @@ _Matrix3Df::operator !=(const _Matrix3Df& rhs) const } void -_Matrix3Df::Optimize(void) +_Matrix4f::Optimize(void) { if (__m[3][3] != 1.0f) { @@ -150,8 +150,8 @@ _Matrix3Df::Optimize(void) __complexity = ScaleMatrix; } -_Matrix3Df& -_Matrix3Df::operator *=(const _Matrix3Df& rhs) +_Matrix4f& +_Matrix4f::operator *=(const _Matrix4f& rhs) { if (__complexity == IdentityMatrix) { @@ -169,22 +169,22 @@ _Matrix3Df::operator *=(const _Matrix3Df& rhs) return *this; } -_Matrix3Df& -_Matrix3Df::MultiplyMatrix(const _Matrix3Df& matrix) +_Matrix4f& +_Matrix4f::MultiplyMatrix(const _Matrix4f& matrix) { *this = *this * matrix; return *this; } -_Matrix3Df& -_Matrix3Df::Concatenate(const _Matrix3Df* matrix) +_Matrix4f& +_Matrix4f::Concatenate(const _Matrix4f* matrix) { return Concatenate(*matrix); } -_Matrix3Df& -_Matrix3Df::Concatenate(const _Matrix3Df& matrix) +_Matrix4f& +_Matrix4f::Concatenate(const _Matrix4f& matrix) { *this = matrix * *this; @@ -192,7 +192,7 @@ _Matrix3Df::Concatenate(const _Matrix3Df& matrix) } float -_Matrix3Df::GetDeterminant(void) const +_Matrix4f::GetDeterminant(void) const { float a0, a1, a2, a3, a4, a5; float b0, b1, b2, b3, b4, b5; @@ -218,7 +218,7 @@ _Matrix3Df::GetDeterminant(void) const } bool -_Matrix3Df::IsInvertible(void) const +_Matrix4f::IsInvertible(void) const { if (__complexity == IdentityMatrix) return true; @@ -230,7 +230,7 @@ _Matrix3Df::IsInvertible(void) const } bool -_Matrix3Df::Invert(void) +_Matrix4f::Invert(void) { // TODO: // Optimize using NEON @@ -301,14 +301,14 @@ _Matrix3Df::Invert(void) } void -_Matrix3Df::LoadIdentity(void) +_Matrix4f::LoadIdentity(void) { memcpy(__m, identityTransform, sizeof(__m)); __complexity = IdentityMatrix; } void -_Matrix3Df::Transpose(void) +_Matrix4f::Transpose(void) { int i, j; float tmp; @@ -327,7 +327,7 @@ _Matrix3Df::Transpose(void) } void -_Matrix3Df::Translate(float tx, float ty, float tz) +_Matrix4f::Translate(float tx, float ty, float tz) { if (__complexity == IdentityMatrix) { @@ -371,7 +371,7 @@ _Matrix3Df::Translate(float tx, float ty, float tz) } void -_Matrix3Df::Scale(float sx, float sy, float sz) +_Matrix4f::Scale(float sx, float sy, float sz) { #ifndef GEM_SIMD if (sx != 1.0f) @@ -411,9 +411,9 @@ _Matrix3Df::Scale(float sx, float sy, float sz) } void -_Matrix3Df::Shear(float xy, float yz, float zx, float yx, float zy, float xz) +_Matrix4f::Shear(float xy, float yz, float zx, float yx, float zy, float xz) { - _Matrix3Df ShearMatrix; + _Matrix4f ShearMatrix; // refer: http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q43 @@ -439,7 +439,7 @@ _Matrix3Df::Shear(float xy, float yz, float zx, float yx, float zy, float xz) } void -_Matrix3Df::Rotate(float angle, float x, float y, float z) +_Matrix4f::Rotate(float angle, float x, float y, float z) { #if 1 if (angle == 0.0f) @@ -543,7 +543,7 @@ _Matrix3Df::Rotate(float angle, float x, float y, float z) mat[3][3] = 1.0f; } - *this *= _Matrix3Df((const float*)mat); + *this *= _Matrix4f((const float*)mat); #else _Matrix3Df rotMat; float sinAngle, cosAngle; @@ -604,9 +604,9 @@ _Matrix3Df::Rotate(float angle, float x, float y, float z) } void -_Matrix3Df::MakeOrthogonal(float left, float right, float bottom, float top, float n, float f) +_Matrix4f::MakeOrthogonal(float left, float right, float bottom, float top, float n, float f) { - _Matrix3Df mat; + _Matrix4f mat; float w, h, d; //memcpy(mat.__m, identityTransform, sizeof(mat.__m)); @@ -638,9 +638,9 @@ _Matrix3Df::MakeOrthogonal(float left, float right, float bottom, float top, flo } void -_Matrix3Df::MakeFrustum(float left, float right, float bottom, float top, float nearZ, float farZ) +_Matrix4f::MakeFrustum(float left, float right, float bottom, float top, float nearZ, float farZ) { - _Matrix3Df mat; + _Matrix4f mat; float w, h, d; //memcpy(mat.__m, identityTransform, sizeof(mat.__m)); @@ -672,7 +672,7 @@ _Matrix3Df::MakeFrustum(float left, float right, float bottom, float top, float } void -_Matrix3Df::MakePerspective(float fovy, float aspect, float nearZ, float farZ) +_Matrix4f::MakePerspective(float fovy, float aspect, float nearZ, float farZ) { float frustumW, frustumH; @@ -683,9 +683,9 @@ _Matrix3Df::MakePerspective(float fovy, float aspect, float nearZ, float farZ) } void -_Matrix3Df::MakeLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) +_Matrix4f::MakeLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) { - _Matrix3Df mat; + _Matrix4f mat; float x[3], y[3], z[3]; float mag; @@ -759,8 +759,8 @@ _Matrix3Df::MakeLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float Translate(-eyeX, -eyeY, -eyeZ); } -_Matrix3Df& -_Matrix3Df::MakeTransformAtAnchor(float x, float y, float z) +_Matrix4f& +_Matrix4f::MakeTransformAtAnchor(float x, float y, float z) { *this = _Matrix3DfTr(x, y, z) * (*this) * _Matrix3DfTr(-x, -y, -z); @@ -768,7 +768,7 @@ _Matrix3Df::MakeTransformAtAnchor(float x, float y, float z) } float -_Matrix3Df::Normalize(void) +_Matrix4f::Normalize(void) { float w; @@ -788,7 +788,7 @@ _Matrix3Df::Normalize(void) } void -_Matrix3Df::Transform(float* pX, float* pY, float* pZ) const +_Matrix4f::Transform(float* pX, float* pY, float* pZ) const { #ifndef GEM_SIMD float x, y, z, w; @@ -851,7 +851,7 @@ _Matrix3Df::Transform(float* pX, float* pY, float* pZ) const } void -_Matrix3Df::CopyFrom(const Tizen::Graphics::FloatMatrix4& matrix) +_Matrix4f::CopyFrom(const Tizen::Graphics::FloatMatrix4& matrix) { __m[0][0] = matrix.matrix[0][0]; __m[0][1] = matrix.matrix[0][1]; __m[0][2] = matrix.matrix[0][2]; __m[0][3] = matrix.matrix[0][3]; __m[1][0] = matrix.matrix[1][0]; __m[1][1] = matrix.matrix[1][1]; __m[1][2] = matrix.matrix[1][2]; __m[1][3] = matrix.matrix[1][3]; diff --git a/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp b/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp index 66527de..bd728ce 100644 --- a/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp +++ b/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp @@ -39,7 +39,7 @@ #include #include "FUi_ControlImpl.h" -#include "FUi_Matrix3Df.h" +#include "FUi_Matrix4f.h" #include "FUiAnim_FrameAnimatorImpl.h" #include "FUiAnim_VisualElementAnimationImpl.h" diff --git a/src/ui/animations/FUiAnim_GlRenderManager.cpp b/src/ui/animations/FUiAnim_GlRenderManager.cpp index 457061e..7bd519a 100644 --- a/src/ui/animations/FUiAnim_GlRenderManager.cpp +++ b/src/ui/animations/FUiAnim_GlRenderManager.cpp @@ -156,7 +156,7 @@ _GlRenderManager::_RenderObject::Release(void) } void -_GlRenderManager::_RenderObject::SetObject(_GlNode* pNode, const _Matrix3Df& mvp, bool useStencil, unsigned int stencilIndex, bool colorMask) +_GlRenderManager::_RenderObject::SetObject(_GlNode* pNode, const _Matrix4f& mvp, bool useStencil, unsigned int stencilIndex, bool colorMask) { int vertexIndex = 0, textureIndex = 0; @@ -175,7 +175,7 @@ _GlRenderManager::_RenderObject::SetObject(_GlNode* pNode, const _Matrix3Df& mvp __colorMask = colorMask; - __modelview = _GlRenderManager::GetInstance()->__view * _Matrix3Df(pNode->__transform); + __modelview = _GlRenderManager::GetInstance()->__view * _Matrix4f(pNode->__transform); __invModelview.Assign(__modelview); __invModelview.Invert(); @@ -629,7 +629,7 @@ _GlRenderManager::WakeUp(void) } int -_GlRenderManager::FindRenderObject(_GlNode* pNode, const _Matrix3Df& mvp, bool useStencil, unsigned int stencilIndex, bool colorMask) +_GlRenderManager::FindRenderObject(_GlNode* pNode, const _Matrix4f& mvp, bool useStencil, unsigned int stencilIndex, bool colorMask) { if (unlikely(__queueCount == 0)) { @@ -686,7 +686,7 @@ _GlRenderManager::EnqueueRenderObject(_GlNode* pNode, bool useStencil, unsigned { int index; - _Matrix3Df mvp = __viewProjection * _Matrix3Df(pNode->__transform); + _Matrix4f mvp = __viewProjection * _Matrix4f(pNode->__transform); index = FindRenderObject(pNode, mvp, useStencil, stencilIndex, colorMask); @@ -1056,8 +1056,8 @@ _GlRenderManager::CompositeLayer(_GlLayer* pLayer) FloatMatrix4 viewMatrix = pRoot->GetViewMatrix(); FloatMatrix4 projMatrix = pRoot->GetProjectionMatrix(); - _Matrix3Df proj(projMatrix); - _Matrix3Df view(viewMatrix); + _Matrix4f proj(projMatrix); + _Matrix4f view(viewMatrix); __viewProjection = proj * view; diff --git a/src/ui/animations/FUiAnim_GlRenderManager.h b/src/ui/animations/FUiAnim_GlRenderManager.h index 8b458fa..6ca8ab0 100644 --- a/src/ui/animations/FUiAnim_GlRenderManager.h +++ b/src/ui/animations/FUiAnim_GlRenderManager.h @@ -34,7 +34,7 @@ #include "FUiAnim_Waiter.h" #include "FUi_Colorf.h" -#include "FUi_Matrix3Df.h" +#include "FUi_Matrix4f.h" #include "FUi_Rectanglef.h" namespace Tizen { namespace Ui { namespace Animations @@ -120,7 +120,7 @@ private: bool Animate(void); - int FindRenderObject(_GlNode* pNode, const _Matrix3Df& mvp, bool useStencil, unsigned int stencilIndex, bool colorMask); + int FindRenderObject(_GlNode* pNode, const _Matrix4f& mvp, bool useStencil, unsigned int stencilIndex, bool colorMask); void EnqueueRenderObject(_GlNode* pNode, bool useStencil, unsigned int stencilIndex, bool colorMask); void FlushRenderQueue(void); @@ -149,7 +149,7 @@ private: result Construct(void); result Release(void); - void SetObject(_GlNode* pNode, const _Matrix3Df& mvp, bool useStencil, unsigned int stencilIndex, bool colorMask); + void SetObject(_GlNode* pNode, const _Matrix4f& mvp, bool useStencil, unsigned int stencilIndex, bool colorMask); void ResetObject(void); void AddVertices(_GlNode* pNode); @@ -165,9 +165,9 @@ private: bool __isMesh; - _Matrix3Df __mvp; - _Matrix3Df __modelview; - _Matrix3Df __invModelview; + _Matrix4f __mvp; + _Matrix4f __modelview; + _Matrix4f __invModelview; _Colorf __objectColor; float __opacity; @@ -216,8 +216,8 @@ private: pid_t __threadId; _GlContext* __pGlContext; - _Matrix3Df __view; - _Matrix3Df __viewProjection; + _Matrix4f __view; + _Matrix4f __viewProjection; _RenderObject* __pRenderQueue; int __queueCount; diff --git a/src/ui/animations/FUiAnim_Ray.cpp b/src/ui/animations/FUiAnim_Ray.cpp index 10910ce..46a7315 100644 --- a/src/ui/animations/FUiAnim_Ray.cpp +++ b/src/ui/animations/FUiAnim_Ray.cpp @@ -11,7 +11,7 @@ #include "FUiAnim_VisualElementImpl.h" #include "FBaseLog.h" -#include "FUi_Matrix3Df.h" +#include "FUi_Matrix4f.h" #include "FUiAnim_NativeLayer.h" #include "FUiAnim_RootVisualElement.h" #include "FUiAnim_VisualElementSharedData.h" @@ -256,7 +256,7 @@ _Ray::CreatePVInv(const _VisualElementImpl* pRootVe, _Math::Matrix4& pvInv, Floa frame.x = 0.0f; frame.y = 0.0f; - _Matrix3Df viewport; + _Matrix4f viewport; viewport.MakeOrthogonal(0.0f, bounds.width, 0.0f, bounds.height, -bounds.height, bounds.height); viewport.Translate(0.0f, bounds.height, 0.0f); viewport.Scale(1.0f, -1.0f, 1.0f); diff --git a/src/ui/animations/FUiAnim_TransformMatrix3Df.cpp b/src/ui/animations/FUiAnim_TransformMatrix3Df.cpp index eeda088..448133d 100644 --- a/src/ui/animations/FUiAnim_TransformMatrix3Df.cpp +++ b/src/ui/animations/FUiAnim_TransformMatrix3Df.cpp @@ -803,7 +803,7 @@ _ViewMatrix4f::_ViewMatrix4f(void) } _ViewMatrix4f::_ViewMatrix4f(const _ViewMatrix4f& rhs) - : _Matrix3Df(rhs) + : _Matrix4f(rhs) { __isCustomView = rhs.__isCustomView; __needUpdatMatrix = rhs.__needUpdatMatrix; @@ -963,7 +963,7 @@ _ViewMatrix4f::SetDefault(void) _ViewMatrix4f& _ViewMatrix4f::operator =(const _ViewMatrix4f & rhs) { - _Matrix3Df::operator= (rhs); + _Matrix4f::operator= (rhs); __isCustomView = rhs.__isCustomView; __needUpdatMatrix = true; @@ -1000,7 +1000,7 @@ _ProjectionMatrix4f::_ProjectionMatrix4f(void) } _ProjectionMatrix4f::_ProjectionMatrix4f(const _ProjectionMatrix4f& rhs) - : _Matrix3Df(rhs) + : _Matrix4f(rhs) { __type = rhs.__type; __needUpdatMatrix = rhs.__needUpdatMatrix; @@ -1166,7 +1166,7 @@ _ProjectionMatrix4f::SetDefault(void) _ProjectionMatrix4f& _ProjectionMatrix4f::operator =(const _ProjectionMatrix4f & rhs) { - _Matrix3Df::operator= (rhs); + _Matrix4f::operator= (rhs); __type = rhs.__type; __needUpdatMatrix = true; diff --git a/src/ui/animations/FUiAnim_VisualElementImpl.cpp b/src/ui/animations/FUiAnim_VisualElementImpl.cpp index 070c714..2628bc1 100644 --- a/src/ui/animations/FUiAnim_VisualElementImpl.cpp +++ b/src/ui/animations/FUiAnim_VisualElementImpl.cpp @@ -65,7 +65,7 @@ #include "FUiAnim_MeshImpl.h" #include "FUiAnim_VisualElementSharedData.h" #include "FUiAnim_RootVisualElement.h" -#include "FUi_Matrix3Df.h" +#include "FUi_Matrix4f.h" #include "FGrpFloatRectangle.h" #include "FUiAnim_NativeLayer.h" #include "math/FUiAnim_MathVector3.h" @@ -97,7 +97,7 @@ #include "FUiAnim_Ray.h" #include "FUiAnim_Plane.h" #include "FUiAnimBoundingVolume.h" -//#include "FUi_Matrix3Df.h" +//#include "FUi_Matrix4f.h" //#include "FGrpFloatRectangle.h" //#include "FUiAnim_NativeLayer.h" diff --git a/src/ui/inc/FUiAnim_TransformMatrix3Df.h b/src/ui/inc/FUiAnim_TransformMatrix3Df.h index 0a6cc2a..84f4dbe 100644 --- a/src/ui/inc/FUiAnim_TransformMatrix3Df.h +++ b/src/ui/inc/FUiAnim_TransformMatrix3Df.h @@ -29,7 +29,7 @@ #include #include -#include "FUi_Matrix3Df.h" +#include "FUi_Matrix4f.h" namespace Tizen { namespace Ui { namespace Animations { @@ -201,7 +201,7 @@ private: }; // _TransformMatrix3Df -class _ViewMatrix4f : public _Matrix3Df +class _ViewMatrix4f : public _Matrix4f { public: _ViewMatrix4f(void); @@ -251,7 +251,7 @@ private: float __upZ; }; -class _ProjectionMatrix4f : public _Matrix3Df +class _ProjectionMatrix4f : public _Matrix4f { public: diff --git a/src/ui/inc/FUi_Matrix3Df.h b/src/ui/inc/FUi_Matrix4f.h similarity index 85% rename from src/ui/inc/FUi_Matrix3Df.h rename to src/ui/inc/FUi_Matrix4f.h index 142fd8e..e480eea 100644 --- a/src/ui/inc/FUi_Matrix3Df.h +++ b/src/ui/inc/FUi_Matrix4f.h @@ -16,7 +16,7 @@ // /** - * @file FUi_Matrix3Df.h + * @file FUi_Matrix4f.h * @brief Header file of _Matrix3Df class * * This file contains declarations _Matrix3Df class. @@ -31,7 +31,7 @@ namespace Tizen { namespace Ui { namespace Animations { -class _OSP_EXPORT_ _Matrix3Df +class _OSP_EXPORT_ _Matrix4f { public: enum @@ -42,28 +42,28 @@ public: GenericMatrix = 0x0008 }; - _Matrix3Df(void); - _Matrix3Df(const _Matrix3Df& rhs) + _Matrix4f(void); + _Matrix4f(const _Matrix4f& rhs) { memcpy(__m, rhs.__m, sizeof(__m)); __complexity = rhs.__complexity; } - _Matrix3Df(const Tizen::Graphics::FloatMatrix4& rhs) + _Matrix4f(const Tizen::Graphics::FloatMatrix4& rhs) { memcpy(__m, rhs.matrix, sizeof(__m)); __complexity = GenericMatrix; } - explicit _Matrix3Df(const float* pValues); + explicit _Matrix4f(const float* pValues); - _Matrix3Df& Assign(const _Matrix3Df& rhs); + _Matrix4f& Assign(const _Matrix4f& rhs); - bool operator ==(const _Matrix3Df& rhs) const; - bool operator !=(const _Matrix3Df& rhs) const; - virtual _Matrix3Df& operator =(const _Matrix3Df& rhs); - virtual _Matrix3Df& operator *=(const _Matrix3Df& rhs); + bool operator ==(const _Matrix4f& rhs) const; + bool operator !=(const _Matrix4f& rhs) const; + virtual _Matrix4f& operator =(const _Matrix4f& rhs); + virtual _Matrix4f& operator *=(const _Matrix4f& rhs); - friend _Matrix3Df operator *(const _Matrix3Df& matrix1, const _Matrix3Df& matrix2); + friend _Matrix4f operator *(const _Matrix4f& matrix1, const _Matrix4f& matrix2); void Optimize(void); bool IsIdentity(void) const { return __complexity == IdentityMatrix;} @@ -74,9 +74,9 @@ public: void LoadIdentity(void); void Transpose(void); - _Matrix3Df& MultiplyMatrix(const _Matrix3Df& matrix); - _Matrix3Df& Concatenate(const _Matrix3Df* matrix); - _Matrix3Df& Concatenate(const _Matrix3Df& matrix); + _Matrix4f& MultiplyMatrix(const _Matrix4f& matrix); + _Matrix4f& Concatenate(const _Matrix4f* matrix); + _Matrix4f& Concatenate(const _Matrix4f& matrix); float GetDeterminant(void) const; bool IsInvertible(void) const; @@ -90,7 +90,7 @@ public: void MakeFrustum(float left, float right, float bottom, float top, float n, float f); void MakePerspective(float fovy, float aspect, float nearZ, float farZ); void MakeLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ); - _Matrix3Df& MakeTransformAtAnchor(float x, float y, float z); + _Matrix4f& MakeTransformAtAnchor(float x, float y, float z); float Normalize(void); void Transform(float* pX, float* pY, float* pZ) const; @@ -117,28 +117,28 @@ protected: }; // _Matrix3Df -inline _Matrix3Df -operator *(const _Matrix3Df& matrix1, const _Matrix3Df& matrix2) +inline _Matrix4f +operator *(const _Matrix4f& matrix1, const _Matrix4f& matrix2) { - if (matrix1.__complexity == _Matrix3Df::IdentityMatrix) + if (matrix1.__complexity == _Matrix4f::IdentityMatrix) return matrix2; - if (matrix2.__complexity == _Matrix3Df::IdentityMatrix) + if (matrix2.__complexity == _Matrix4f::IdentityMatrix) return matrix1; - if (matrix1.__complexity == _Matrix3Df::TranslationMatrix) + if (matrix1.__complexity == _Matrix4f::TranslationMatrix) { - if (matrix2.__complexity == _Matrix3Df::TranslationMatrix) + if (matrix2.__complexity == _Matrix4f::TranslationMatrix) { - _Matrix3Df ret; + _Matrix4f ret; ret.__m[3][0] = matrix2.__m[3][0] + matrix1.__m[3][0] * matrix2.__m[3][3]; ret.__m[3][1] = matrix2.__m[3][1] + matrix1.__m[3][1] * matrix2.__m[3][3]; ret.__m[3][2] = matrix2.__m[3][2] + matrix1.__m[3][2] * matrix2.__m[3][3]; ret.__m[3][3] = matrix1.__m[3][3] * matrix2.__m[3][3]; - ret.__complexity = _Matrix3Df::TranslationMatrix; + ret.__complexity = _Matrix4f::TranslationMatrix; return ret; } @@ -218,10 +218,10 @@ operator *(const _Matrix3Df& matrix1, const _Matrix3Df& matrix2) (matrix1.__m[2][3] * matrix2.__m[3][2]) + (matrix1.__m[3][3] * matrix2.__m[3][3]); - return _Matrix3Df((const float*)m); + return _Matrix4f((const float*)m); } -class _Matrix3DfTr : public _Matrix3Df +class _Matrix3DfTr : public _Matrix4f { public: _Matrix3DfTr(float tx, float ty, float tz) @@ -238,7 +238,7 @@ public: } }; // _Matrix3DfTr -class _Matrix3DfRot : public _Matrix3Df +class _Matrix3DfRot : public _Matrix4f { public: _Matrix3DfRot(float angle, float x, float y, float z)