Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-01 06:12:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-01 06:12:53 +0400
commit2365c64014b3e067bb212b2061f1d14c1f944090 (patch)
treeccf060ca327a060e524ec92bba3622d9a1139a64 /source/gameengine/Ketsji/KX_Camera.cpp
parent00143a3d557d87dda2bb7074dfe2b1a3acf5f28f (diff)
whitespace bge edits
Diffstat (limited to 'source/gameengine/Ketsji/KX_Camera.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_Camera.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp
index c60c931c33b..a488d646792 100644
--- a/source/gameengine/Ketsji/KX_Camera.cpp
+++ b/source/gameengine/Ketsji/KX_Camera.cpp
@@ -271,18 +271,18 @@ void KX_Camera::ExtractFrustumSphere()
if (m_set_frustum_center)
return;
- // compute sphere for the general case and not only symmetric frustum:
- // the mirror code in ImageRender can use very asymmetric frustum.
- // We will put the sphere center on the line that goes from origin to the center of the far clipping plane
- // This is the optimal position if the frustum is symmetric or very asymmetric and probably close
- // to optimal for the general case. The sphere center position is computed so that the distance to
- // the near and far extreme frustum points are equal.
-
- // get the transformation matrix from device coordinate to camera coordinate
+ // compute sphere for the general case and not only symmetric frustum:
+ // the mirror code in ImageRender can use very asymmetric frustum.
+ // We will put the sphere center on the line that goes from origin to the center of the far clipping plane
+ // This is the optimal position if the frustum is symmetric or very asymmetric and probably close
+ // to optimal for the general case. The sphere center position is computed so that the distance to
+ // the near and far extreme frustum points are equal.
+
+ // get the transformation matrix from device coordinate to camera coordinate
MT_Matrix4x4 clip_camcs_matrix = m_projection_matrix;
clip_camcs_matrix.invert();
- if (m_projection_matrix[3][3] == MT_Scalar(0.0))
+ if (m_projection_matrix[3][3] == MT_Scalar(0.0))
{
// frustrum projection
// detect which of the corner of the far clipping plane is the farthest to the origin
@@ -302,7 +302,7 @@ void KX_Camera::ExtractFrustumSphere()
MT_Scalar len;
for (int i=0; i<4; i++)
{
- hpoint = clip_camcs_matrix*npoint;
+ hpoint = clip_camcs_matrix*npoint;
point.setValue(hpoint[0]/hpoint[3], hpoint[1]/hpoint[3], hpoint[2]/hpoint[3]);
len = point.dot(point);
if (len > F)
@@ -321,7 +321,7 @@ void KX_Camera::ExtractFrustumSphere()
farcenter *= 0.25;
// the extreme near point is the opposite point on the near clipping plane
nfar.setValue(-nfar[0], -nfar[1], -1., 1.);
- nfar = clip_camcs_matrix*nfar;
+ nfar = clip_camcs_matrix*nfar;
nearpoint.setValue(nfar[0]/nfar[3], nfar[1]/nfar[3], nfar[2]/nfar[3]);
// this is a frustrum projection
N = nearpoint.dot(nearpoint);
@@ -340,7 +340,7 @@ void KX_Camera::ExtractFrustumSphere()
z = (F-N)/(2.0*(e-s+c*(f-n)));
m_frustum_center = MT_Point3(farcenter[0]*z/e, farcenter[1]*z/e, z);
m_frustum_radius = m_frustum_center.distance(farpoint);
- }
+ }
else
{
// orthographic projection