diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-22 12:15:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-22 12:15:51 +0400 |
commit | ddc2dbc2a47ed2439a62e82ad6fba7d8c9dcae28 (patch) | |
tree | a7ca593a96652e6f0a784b5c6e37ab2c35b07159 /source/gameengine/BlenderRoutines | |
parent | 30fd258a0b407419a369fbb2818c49df6b70968e (diff) |
style cleanup
Diffstat (limited to 'source/gameengine/BlenderRoutines')
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp index 96cc84879c1..e32239b148d 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp @@ -164,11 +164,11 @@ bool KX_BlenderRenderTools::RayHit(KX_ClientObjectInfo* client, KX_RayCast* resu left = (dir.cross(resultnormal)).safe_normalized(); // for the up vector, we take the 'resultnormal' returned by the physics - double maat[16]={ - left[0], left[1], left[2], 0, - dir[0], dir[1], dir[2], 0, - resultnormal[0],resultnormal[1],resultnormal[2], 0, - 0, 0, 0, 1}; + double maat[16] = {left[0], left[1], left[2], 0, + dir[0], dir[1], dir[2], 0, + resultnormal[0], resultnormal[1], resultnormal[2], 0, + 0, 0, 0, 1}; + glTranslated(resultpoint[0],resultpoint[1],resultpoint[2]); //glMultMatrixd(oglmatrix); glMultMatrixd(maat); @@ -227,16 +227,17 @@ void KX_BlenderRenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmat left *= size[0]; dir *= size[1]; up *= size[2]; - double maat[16]={ - left[0], left[1],left[2], 0, - dir[0], dir[1],dir[2],0, - up[0],up[1],up[2],0, - 0,0,0,1}; - glTranslated(objpos[0],objpos[1],objpos[2]); - glMultMatrixd(maat); - - } else - { + + double maat[16] = {left[0], left[1], left[2], 0, + dir[0], dir[1], dir[2], 0, + up[0], up[1], up[2], 0, + 0, 0, 0, 1}; + + glTranslated(objpos[0],objpos[1],objpos[2]); + glMultMatrixd(maat); + + } + else { if (objectdrawmode & RAS_IPolyMaterial::SHADOW) { // shadow must be cast to the ground, physics system needed here! |