Mercurial > mm7
comparison Vis.cpp @ 1588:e6ac4919b22c
Слияние
author | Ritor1 |
---|---|
date | Mon, 09 Sep 2013 09:13:40 +0600 |
parents | c4ab816fcc5e |
children | 2c71fa8913d2 |
comparison
equal
deleted
inserted
replaced
1587:b42e6f35e03d | 1588:e6ac4919b22c |
---|---|
1 #include <assert.h> | |
2 | |
3 #include "Vis.h" | 1 #include "Vis.h" |
4 #include "Outdoor.h" | 2 #include "Outdoor.h" |
5 #include "BSPModel.h" | 3 #include "BSPModel.h" |
6 #include "Game.h" | 4 #include "Game.h" |
7 #include "Actor.h" | 5 #include "Actor.h" |
590 // p(t) = p0 + tu; | 588 // p(t) = p0 + tu; |
591 Intersection->vWorldPosition.x = pRayStart->vWorldPosition.x + t * ray_dir_y;// add the interest to the start line( ) | 589 Intersection->vWorldPosition.x = pRayStart->vWorldPosition.x + t * ray_dir_y;// add the interest to the start line( ) |
592 Intersection->vWorldPosition.y = pRayStart->vWorldPosition.y + t * ray_dir_x; | 590 Intersection->vWorldPosition.y = pRayStart->vWorldPosition.y + t * ray_dir_x; |
593 Intersection->vWorldPosition.z = pRayStart->vWorldPosition.z + t * ray_dir_z; | 591 Intersection->vWorldPosition.z = pRayStart->vWorldPosition.z + t * ray_dir_z; |
594 | 592 |
595 IntersectPoint.x = (signed __int64)Intersection->vWorldPosition.x; | 593 IntersectPoint.x = Intersection->vWorldPosition.x; |
596 IntersectPoint.y = (signed __int64)Intersection->vWorldPosition.y; | 594 IntersectPoint.y = Intersection->vWorldPosition.y; |
597 IntersectPoint.z = (signed __int64)Intersection->vWorldPosition.z; | 595 IntersectPoint.z = Intersection->vWorldPosition.z; |
598 | 596 |
599 if ( !CheckIntersectBModel(pFace, IntersectPoint, pBModelID) ) | 597 if ( !CheckIntersectBModel(pFace, IntersectPoint, pBModelID) ) |
600 return false; | 598 return false; |
601 | 599 |
602 *pDepth = t;//Record the distance from the origin of the ray ( ) | 600 *pDepth = t;//Record the distance from the origin of the ray ( ) |
881 RenderVertexSoft v11[2]; // [sp+2Ch] [bp-74h]@1 | 879 RenderVertexSoft v11[2]; // [sp+2Ch] [bp-74h]@1 |
882 int outx; | 880 int outx; |
883 int outz; // [sp+94h] [bp-Ch]@1 | 881 int outz; // [sp+94h] [bp-Ch]@1 |
884 int outy; // [sp+98h] [bp-8h]@1 | 882 int outy; // [sp+98h] [bp-8h]@1 |
885 | 883 |
886 pRotY = pIndoorCamera->sRotationY + UnprojectX((signed __int64)fMouseX); | 884 pRotY = pIndoorCamera->sRotationY + UnprojectX(fMouseX); |
887 pStartR.z = pIndoorCamera->pos.z; | 885 pStartR.z = pIndoorCamera->pos.z; |
888 pStartR.x = pIndoorCamera->pos.x; | 886 pStartR.x = pIndoorCamera->pos.x; |
889 pStartR.y = pIndoorCamera->pos.y; | 887 pStartR.y = pIndoorCamera->pos.y; |
890 pRotX = pIndoorCamera->sRotationX + UnprojectY((signed __int64)fMouseY); | 888 pRotX = pIndoorCamera->sRotationX + UnprojectY(fMouseY); |
891 pDepth = fixpoint_from_float(fPickDepth); | 889 pDepth = fixpoint_from_float(fPickDepth); |
892 Vec3_int_::Rotate(pDepth, pRotY, pRotX, pStartR, &outx, &outy, &outz); | 890 Vec3_int_::Rotate(pDepth, pRotY, pRotX, pStartR, &outx, &outy, &outz); |
893 | 891 |
894 v11[0].flt_2C = 0.0; | 892 v11[0].flt_2C = 0.0; |
895 v11[0].vWorldPosition.x = (double)outx; | 893 v11[0].vWorldPosition.x = (double)outx; |