Mercurial > mm7
comparison mm7_5.cpp @ 1045:d3f4c6584ada
Intersect_Ray_Face clean
author | Ritor1 |
---|---|
date | Tue, 21 May 2013 16:13:43 +0600 |
parents | c94d6a37d298 |
children | d36681a9e4f8 |
comparison
equal
deleted
inserted
replaced
1044:a85f5cb295b7 | 1045:d3f4c6584ada |
---|---|
5352 } | 5352 } |
5353 | 5353 |
5354 //----- (0043AA99) -------------------------------------------------------- | 5354 //----- (0043AA99) -------------------------------------------------------- |
5355 void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz) | 5355 void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz) |
5356 { | 5356 { |
5357 /* int v7; // ebx@1 | |
5358 int v8; // ST14_4@1 | |
5359 int v9; // edi@1 | |
5360 int anglea; // [sp+20h] [bp+8h]@1 | |
5361 | |
5362 v7 = sRotX; | |
5363 v8 = sDepth; | |
5364 v9 = sRotY; | |
5365 anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16; | |
5366 *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(sRotY) * (signed __int64)anglea) >> 16); | |
5367 *outy = v.y + ((unsigned __int64)(stru_5C6E00->SinCos(sRotY - stru_5C6E00->uIntegerHalfPi) * (signed __int64)anglea) >> 16); | |
5368 *outz = v.z + ((unsigned __int64)(stru_5C6E00->SinCos(sRotX - stru_5C6E00->uIntegerHalfPi) * (signed __int64)sDepth) >> 16);*/ | |
5369 | |
5370 float cosf_x = cosf(3.14159265f * sRotX / 1024.0f), | 5357 float cosf_x = cosf(3.14159265f * sRotX / 1024.0f), |
5371 sinf_x = sinf(3.14159265f * sRotX / 1024.0f), | 5358 sinf_x = sinf(3.14159265f * sRotX / 1024.0f), |
5372 cosf_y = cosf(3.14159265f * sRotY / 1024.0f), | 5359 cosf_y = cosf(3.14159265f * sRotY / 1024.0f), |
5373 sinf_y = sinf(3.14159265f * sRotY / 1024.0f); | 5360 sinf_y = sinf(3.14159265f * sRotY / 1024.0f); |
5374 //sDepth = 14000000; | 5361 |
5375 *outx = v.x + ((unsigned __int64)(sinf_y * (signed __int64)((unsigned __int64)(cosf_x * (signed __int64)sDepth)>> 16))); | 5362 *outx = v.x + ((unsigned __int64)(sinf_y * (signed __int64)((unsigned __int64)(cosf_x * (signed __int64)sDepth)>> 16))); |
5376 *outy = v.y + ((unsigned __int64)(cosf_y * (signed __int64)((unsigned __int64)(cosf_x * (signed __int64)sDepth)>> 16))); | 5363 *outy = v.y + ((unsigned __int64)(cosf_y * (signed __int64)((unsigned __int64)(cosf_x * (signed __int64)sDepth)>> 16))); |
5377 *outz = v.z + ((unsigned __int64)(sinf_x * (signed __int64)sDepth) >> 16); | 5364 *outz = v.z + ((unsigned __int64)(sinf_x * (signed __int64)sDepth) >> 16); |
5378 | |
5379 } | 5365 } |
5380 | 5366 |
5381 //----- (0043AB61) -------------------------------------------------------- | 5367 //----- (0043AB61) -------------------------------------------------------- |
5382 void Vec3_int_::Normalize(int *x, int *y, int *z) | 5368 void Vec3_int_::Normalize(int *x, int *y, int *z) |
5383 { | 5369 { |