123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- #include "CFTTCamera.h"
- #include "CFTTMatrix32.h"
- #include "Matrix.h"
- #include "FTTGraphics.h"
- #include "CFTTShaderBuiltInConstants.h"
- CFTTVector32 CFTTCamera::s_tPosition;
- CFTTMatrix32 CFTTCamera::s_tOrientation;
- float CFTTCamera::s_fNearPlane;
- float CFTTCamera::s_fPerspectiveYOffset;
- float CFTTCamera::s_fPerspectiveXOffset;
- float CFTTCamera::s_fFieldOfView;
- float CFTTCamera::s_fFarPlane;
- float CFTTCamera::s_fOrthoLeft;
- float CFTTCamera::s_fOrthoRight;
- float CFTTCamera::s_fOrthoBottom;
- float CFTTCamera::s_fOrthoTop;
- bool CFTTCamera::s_bProjectionMatrixChanged;
- bool CFTTCamera::s_bViewMatrixChanged;
- int CFTTCamera::s_iViewportWidth;
- int CFTTCamera::s_iViewportHeight;
- bool CFTTCamera::s_bOrthagonal;
- float CFTTCamera::s_fWidthOverHeight;
- CFTTMatrix32 CFTTCamera::s_matProjRender;
- CFTTMatrix32 CFTTCamera::s_matProjCanonical;
- CFTTMatrix32 CFTTCamera::s_matView;
- CFTTMatrix32 CFTTCamera::s_matViewProjRender;
- CFTTMatrix32 CFTTCamera::s_matViewProjCanonical;
- CFTTFrustum32 CFTTCamera::s_tFrustum;
- CFTTSphere32 CFTTCamera::s_tFrustumBoundingSphere;
- CFTTCone32 CFTTCamera::s_tFrustumBoundingCone;
- //-------------------------------------------------------------------------------------------------
- //00266900 //^_- 经过单元测试,功能正常
- CFTTMatrix32 MakeProjectionMatrixOrtho32(float a2, float a3, float a4, float a5, float a6, float a7, EScreenRotation a8, bool a9, bool a10) {
- CFTTMatrix32 ret;
- return ret;
- }
- //-------------------------------------------------------------------------------------------------
- //002666C4 ^_^
- CFTTMatrix32 MakeProjectionMatrix32(float a2, float a3, float a4, float a5, float a6, float a7, EScreenRotation a8, bool a9, bool a10) {
- CFTTMatrix32 ret;
- return ret;
- }
- //-------------------------------------------------------------------------------------------------
- //002665E4 //^_- 经过单元测试,功能正常
- CFTTMatrix32 MakeOrientationMatrix32(CFTTVector32 const &a2, CFTTVector32 const *a3) {
- //以下指令不一样
- CFTTMatrix32 ret;
- return ret;
- }
- //-------------------------------------------------------------------------------------------------
- //001FF48C
- void CFTTCamera::Initialise() {
- }
- //-------------------------------------------------------------------------------------------------
- //001FF490 ^_- 经过单元测试,功能正常
- void CFTTCamera::Reset() {
- }
- //-------------------------------------------------------------------------------------------------
- //001FF588
- void CFTTCamera::Shutdown() {
- }
- //-------------------------------------------------------------------------------------------------
- //001FF58C ^_^ 经过单元测试,功能正常
- void CFTTCamera::ApplyCameraSettings() {
- LOGE("CFTTCamera::ApplyCameraSettings");
- }
- //-------------------------------------------------------------------------------------------------
- //001FF5B4//^_- 经过单元测试,功能正常
- void CFTTCamera::EvaluateMatricesAndFrustum() {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFA3C ^_^ 经过单元测试,功能正常
- void CFTTCamera::SetPosition(CFTTVector32 const &a1) {
- LOGE("%x%x%x",a1.float_0,a1.float_4,a1.float_8);
- }
- //-------------------------------------------------------------------------------------------------
- //001FFA64 ^_^ 经过单元测试,功能正常
- void CFTTCamera::GetPosition(CFTTVector32 &a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFA7C ^_^
- void CFTTCamera::SetFrustum(CFTTFrustum32 a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFAA4 ^_^
- void CFTTCamera::GetFrustum(CFTTFrustum32 &a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFAB8 ^_^
- void CFTTCamera::GetFrustumSphere(CFTTSphere32 &a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFAD0 ^_^
- void CFTTCamera::GetFrustumCone(CFTTCone32 &a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFAE0 ^_^
- void CFTTCamera::SetOrientation(CFTTMatrix32 const &a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFB04 ^_^ 经过单元测试,功能正常
- void CFTTCamera::SetDirection(CFTTVector32 const &a1, CFTTVector32 const *a2) {
- LOGE("%x%x%x",a1.float_0,a1.float_4,a1.float_8);
- LOGE("%x",a2);
- LOGE("%x%x%x",a2->float_0,a2->float_4,a2->float_8);
- }
- //-------------------------------------------------------------------------------------------------
- //001FFB38 ^_^
- void CFTTCamera::GetOrientation(CFTTMatrix32 &a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFB48 ^_- 经过单元测试,功能正常
- void CFTTCamera::GetForwardDirection(CFTTVector32 &a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFB6C ^_-
- void CFTTCamera::GetUpDirection(CFTTVector32 &a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFB90 ^_-
- void CFTTCamera::GetRightDirection(CFTTVector32 &a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFBB4 ^_^ 经过单元测试,功能正常
- void CFTTCamera::LookAt(CFTTVector32 const &a1, CFTTVector32 const *a2) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFC8C ^_^
- void CFTTCamera::LookAt(CFTTVector32 const &a1, CFTTVector32 const &a2, float a3, CFTTVector32 const *a4) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFCF8 ^_^ 经过单元测试,功能正常
- void CFTTCamera::SetOrthographic(float a1, float a2, float a3, float a4, float a5, float a6) {
- LOGE("CFTTCamera::SetOrthographic=%x%x%x%x%x%x",a1,a2,a3,a4,a5,a6);
- }
- //-------------------------------------------------------------------------------------------------
- //001FFDD8 ^_^ 经过单元测试,功能正常
- void CFTTCamera::SetNearAndFarPlanes(float a1, float a2) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFE28 ^_^ 经过单元测试,功能正常
- void CFTTCamera::SetFOV(float a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFE5C ^_^ 经过单元测试,功能正常
- void CFTTCamera::SetOrthographic(float a1, float a2, bool a3) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFEB0 ^_^ 经过单元测试,功能正常
- bool CFTTCamera::GetOrthoSettings(float &a1, float &a2, float &a3, float &a4) {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- //001FFEFC ^_^ 经过单元测试,功能正常
- void CFTTCamera::GetViewport(int &a1, int &a2) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFF1C ^_^ 经过单元测试,功能正常
- void CFTTCamera::SetViewport(int a1, int a2, float a3) {
- LOGE("%x%x%X",a1,a2,a3);
- }
- //-------------------------------------------------------------------------------------------------
- //001FFF88 ^_^
- bool CFTTCamera::IsOrthographic() {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- //001FFFA8 ^_^
- float CFTTCamera::GetFOV() {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- //001FFFB8 ^_^ 经过单元测试,功能正常
- void CFTTCamera::GetNearAndFarPlanes(float &a1, float &a2) {
- }
- //-------------------------------------------------------------------------------------------------
- //001FFFD8 ^_^ 经过单元测试,功能正常
- void CFTTCamera::SetPerspectiveOffsets(float fXOffset, float fYOffset) {
- }
- //-------------------------------------------------------------------------------------------------
- //00200028 ^_^
- void CFTTCamera::GetPerspectiveOffsets(float &a1, float &a2) {
- }
- //-------------------------------------------------------------------------------------------------
- //00200048 ^_^
- bool CFTTCamera::IsSphereInFrustum(CFTTSphere32 const &a1, bool *a2) {
- return false;
- }
- //-------------------------------------------------------------------------------------------------
- //002001DC ^_^
- bool CFTTCamera::IsAABBInFrustum( CFTTAABB32 const& a1, bool *a2) {
- int result; // r0
- return result;
- }
- //-------------------------------------------------------------------------------------------------
- //002002D0^_-模块测试可以正常运行
- int CFTTCamera::WorldSpaceToScreenSpace(CFTTVector32 const &a1, CFTTVector32 &a2, bool a3) {
- int ret = 0;
- return ret;
- }
- //-------------------------------------------------------------------------------------------------
- //0020040C^_- 局部变量的栈位置不一样,应该是声明的位置不一样造成的。 其它都一样 模块测试可以正常运行
- void CFTTCamera::ScreenSpaceToWorldSpace(float a1, float a2, CFTTVector32 &a3, CFTTVector32 &a4) {
- }
- //-------------------------------------------------------------------------------------------------
- //002004F8 ^_^
- CFTTMatrix32 CFTTCamera::GetCanonicalToRenderMat() {
- CFTTMatrix32 ret;
- return ret;
- }
- //-------------------------------------------------------------------------------------------------
|