diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-09 22:28:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-09 22:28:30 +0400 |
commit | 89a963fb7fdff543b77de790355b9dac3019bd33 (patch) | |
tree | 4e1d2245e20f8c21625e99d771776f66c233a0de /source/gameengine/Ketsji | |
parent | de4bd55e01bc574c13977537ace1a0901dcfcaf0 (diff) |
style cleanup: comment blocks
Diffstat (limited to 'source/gameengine/Ketsji')
25 files changed, 191 insertions, 191 deletions
diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h index 2c6316ea32b..7b1779fed10 100644 --- a/source/gameengine/Ketsji/BL_Material.h +++ b/source/gameengine/Ketsji/BL_Material.h @@ -24,11 +24,11 @@ struct EnvMap; // -- /** max units - this will default to users available units - to build with more available, just increment this value - although the more you add the slower the search time will be. - we will go for eight, which should be enough -*/ + * this will default to users available units + * to build with more available, just increment this value + * although the more you add the slower the search time will be. + * we will go for eight, which should be enough + */ #define MAXTEX 8 //match in RAS_TexVert & RAS_OpenGLRasterizer // different mapping modes diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp index 3febff92e18..9940b400527 100644 --- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp +++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp @@ -235,9 +235,9 @@ void KX_BulletPhysicsController::setRigidBody(bool rigid) } /* This function dynamically adds the collision shape of another controller to - the current controller shape provided it is a compound shape. - The idea is that dynamic parenting on a compound object will dynamically extend the shape -*/ + * the current controller shape provided it is a compound shape. + * The idea is that dynamic parenting on a compound object will dynamically extend the shape + */ void KX_BulletPhysicsController::AddCompoundChild(KX_IPhysicsController* child) { if (child == NULL || !IsCompound()) @@ -308,8 +308,8 @@ void KX_BulletPhysicsController::AddCompoundChild(KX_IPhysicsController* chil } /* Reverse function of the above, it will remove a shape from a compound shape - provided that the former was added to the later using AddCompoundChild() -*/ + * provided that the former was added to the later using AddCompoundChild() + */ void KX_BulletPhysicsController::RemoveCompoundChild(KX_IPhysicsController* child) { if (child == NULL || !IsCompound()) diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index 14a307794db..7a2d71f56ff 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -133,8 +133,8 @@ const MT_Quaternion KX_Camera::GetCameraOrientation() const /** -* Sets the projection matrix that is used by the rasterizer. -*/ + * Sets the projection matrix that is used by the rasterizer. + */ void KX_Camera::SetProjectionMatrix(const MT_Matrix4x4 & mat) { m_projection_matrix = mat; @@ -146,8 +146,8 @@ void KX_Camera::SetProjectionMatrix(const MT_Matrix4x4 & mat) /** -* Sets the modelview matrix that is used by the rasterizer. -*/ + * Sets the modelview matrix that is used by the rasterizer. + */ void KX_Camera::SetModelviewMatrix(const MT_Matrix4x4 & mat) { m_modelview_matrix = mat; @@ -158,8 +158,8 @@ void KX_Camera::SetModelviewMatrix(const MT_Matrix4x4 & mat) /** -* Gets the projection matrix that is used by the rasterizer. -*/ + * Gets the projection matrix that is used by the rasterizer. + */ const MT_Matrix4x4& KX_Camera::GetProjectionMatrix() const { return m_projection_matrix; @@ -168,8 +168,8 @@ const MT_Matrix4x4& KX_Camera::GetProjectionMatrix() const /** -* Gets the modelview matrix that is used by the rasterizer. -*/ + * Gets the modelview matrix that is used by the rasterizer. + */ const MT_Matrix4x4& KX_Camera::GetModelviewMatrix() const { return m_modelview_matrix; @@ -187,9 +187,9 @@ void KX_Camera::InvalidateProjectionMatrix(bool valid) } -/* -* These getters retrieve the clip data and the focal length -*/ +/** + * These getters retrieve the clip data and the focal length + */ float KX_Camera::GetLens() const { return m_camdata.m_lens; @@ -200,17 +200,17 @@ float KX_Camera::GetScale() const return m_camdata.m_scale; } -/* -* Gets the horizontal size of the sensor - for camera matching. -*/ +/** + * Gets the horizontal size of the sensor - for camera matching. + */ float KX_Camera::GetSensorWidth() const { return m_camdata.m_sensor_x; } -/* -* Gets the vertical size of the sensor - for camera matching. -*/ +/** + * Gets the vertical size of the sensor - for camera matching. + */ float KX_Camera::GetSensorHeight() const { return m_camdata.m_sensor_y; diff --git a/source/gameengine/Ketsji/KX_Camera.h b/source/gameengine/Ketsji/KX_Camera.h index 38fc170e371..7481b2eb7f0 100644 --- a/source/gameengine/Ketsji/KX_Camera.h +++ b/source/gameengine/Ketsji/KX_Camera.h @@ -63,12 +63,13 @@ protected: // Never used, I think... // void MoveTo(const MT_Point3& movevec) // { - /*MT_Transform camtrans; +#if 0 + MT_Transform camtrans; camtrans.invert(m_trans1); MT_Matrix3x3 camorient = camtrans.getBasis(); camtrans.translate(camorient.inverse()*movevec); m_trans1.invert(camtrans); - */ +#endif // } /** @@ -185,8 +186,8 @@ public: bool hasValidProjectionMatrix() const; /** Sets the validity of the projection matrix. Call this if you change camera - data (eg lens, near plane, far plane) and require the projection matrix to be - recalculated. + * data (eg lens, near plane, far plane) and require the projection matrix to be + * recalculated. */ void InvalidateProjectionMatrix(bool valid = false); diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index 1361a6122ad..b683fcb8036 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -186,7 +186,7 @@ static void Kx_VecUpMat3(float vec[3], float mat[][3], short axis) mat[coz][2]= vec[2]; if (Kx_Normalize((float *)mat[coz]) == 0.f) { /* this is a very abnormal situation: the camera has reach the object center exactly - We will choose a completely arbitrary direction */ + * We will choose a completely arbitrary direction */ mat[coz][0] = 1.0f; mat[coz][1] = 0.0f; mat[coz][2] = 0.0f; @@ -239,9 +239,9 @@ bool KX_CameraActuator::Update(double curtime, bool frame) /* CONSTRAINT 6: again: fixed height relative to floor below actor */ /* CONSTRAINT 7: track to floor below actor */ /* CONSTRAINT 8: look a little bit left or right, depending on how the - - character is looking (horizontal x) - */ + * + * character is looking (horizontal x) + */ /* ...and then set the camera position. Since we assume the parent of */ /* this actuator is always a camera, just set the parent position and */ diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index f78ff0081b7..322d6e60071 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -147,8 +147,8 @@ bool KX_ConstraintActuator::RayHit(KX_ClientObjectInfo* client, KX_RayCast* resu return true; } -/* this function is used to pre-filter the object before casting the ray on them. - This is useful for "X-Ray" option when we want to see "through" unwanted object. +/* This function is used to pre-filter the object before casting the ray on them. + * This is useful for "X-Ray" option when we want to see "through" unwanted object. */ bool KX_ConstraintActuator::NeedRayCast(KX_ClientObjectInfo* client) { diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index 610200cc235..28e7f221ce4 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -464,7 +464,7 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, if (objprop->m_dyna && !objprop->m_angular_rigidbody) { - /* +#if 0 //setting the inertia could achieve similar results to constraint the up //but it is prone to instability, so use special 'Angular' constraint btVector3 inertia = physicscontroller->GetRigidBody()->getInvInertiaDiagLocal(); @@ -473,7 +473,7 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, physicscontroller->GetRigidBody()->setInvInertiaDiagLocal(inertia); physicscontroller->GetRigidBody()->updateInertiaTensor(); - */ +#endif //env->createConstraint(physicscontroller,0,PHY_ANGULAR_CONSTRAINT,0,0,0,0,0,1); diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index 6bd30685696..6e989dd4d7d 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -1,26 +1,26 @@ /* ------------------------------------------------------------------------------ - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. - -Contributor(s): Dalai Felinto - -This code is originally inspired on some of the ideas and codes from Paul Bourke. -Developed as part of a Research and Development project for SAT - La Société des arts technologiques. ------------------------------------------------------------------------------ -*/ + * ----------------------------------------------------------------------------- + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place - Suite 330, Boston, MA 02111-1307, USA, or go to + * http://www.gnu.org/copyleft/lesser.txt. + * + * Contributor(s): Dalai Felinto + * + * This code is originally inspired on some of the ideas and codes from Paul Bourke. + * Developed as part of a Research and Development project for SAT - La Société des arts technologiques. + * ----------------------------------------------------------------------------- + */ /** \file gameengine/Ketsji/KX_Dome.cpp * \ingroup ketsji @@ -218,20 +218,20 @@ void KX_Dome::CreateGLImages(void) void KX_Dome::ClearGLImages(void) { glDeleteTextures(m_numimages, (GLuint*)&domefacesId); -/* +#if 0 for (int i=0;i<m_numimages;i++) if(glIsTexture(domefacesId[i])) glDeleteTextures(1, (GLuint*)&domefacesId[i]); -*/ +#endif } void KX_Dome::CalculateImageSize(void) { -/* -- determine the minimum buffer size -- reduce the buffer for better performace -- create a power of 2 texture bigger than the buffer -*/ + /* + * - determine the minimum buffer size + * - reduce the buffer for better performace + * - create a power of 2 texture bigger than the buffer + */ canvaswidth = m_canvas->GetWidth(); canvasheight = m_canvas->GetHeight(); @@ -453,28 +453,28 @@ void KX_Dome::GLDrawWarpQuads(void) bool KX_Dome::ParseWarpMesh(STR_String text) { -/* -//Notes about the supported data format: -File example:: - mode - width height - n0_x n0_y n0_u n0_v n0_i - n1_x n1_y n1_u n1_v n1_i - n2_x n1_y n2_u n2_v n2_i - n3_x n3_y n3_u n3_v n3_i - (...) -First line is the image type the mesh is support to be applied to: 2 = fisheye, 1=radial -Tthe next line has the mesh dimensions -Rest of the lines are the nodes of the mesh. Each line has x y u v i - (x,y) are the normalised screen coordinates - (u,v) texture coordinates - i a multiplicative intensity factor - -x varies from -screen aspect to screen aspect -y varies from -1 to 1 -u and v vary from 0 to 1 -i ranges from 0 to 1, if negative don't draw that mesh node -*/ + /* + * //Notes about the supported data format: + * File example:: + * mode + * width height + * n0_x n0_y n0_u n0_v n0_i + * n1_x n1_y n1_u n1_v n1_i + * n2_x n1_y n2_u n2_v n2_i + * n3_x n3_y n3_u n3_v n3_i + * (...) + * First line is the image type the mesh is support to be applied to: 2 = fisheye, 1=radial + * Tthe next line has the mesh dimensions + * Rest of the lines are the nodes of the mesh. Each line has x y u v i + * (x,y) are the normalised screen coordinates + * (u,v) texture coordinates + * i a multiplicative intensity factor + * + * x varies from -screen aspect to screen aspect + * y varies from -1 to 1 + * u and v vary from 0 to 1 + * i ranges from 0 to 1, if negative don't draw that mesh node + */ int i; int nodeX=0, nodeY=0; @@ -532,16 +532,16 @@ i ranges from 0 to 1, if negative don't draw that mesh node void KX_Dome::CreateMeshDome180(void) { -/* -1)- Define the faces of half of a cube - - each face is made out of 2 triangles -2) Subdivide the faces - - more resolution == more curved lines -3) Spherize the cube - - normalize the verts -4) Flatten onto xz plane - - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image -*/ + /* + * 1)- Define the faces of half of a cube + * - each face is made out of 2 triangles + * 2) Subdivide the faces + * - more resolution == more curved lines + * 3) Spherize the cube + * - normalize the verts + * 4) Flatten onto xz plane + * - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image + */ int i,j; float uv_ratio = (float)(m_buffersize-1) / m_imagesize; @@ -711,16 +711,16 @@ void KX_Dome::CreateMeshDome180(void) void KX_Dome::CreateMeshDome250(void) { -/* -1)- Define the faces of a cube without the back face - - each face is made out of 2 triangles -2) Subdivide the faces - - more resolution == more curved lines -3) Spherize the cube - - normalize the verts -4) Flatten onto xz plane - - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image -*/ + /* + * 1)- Define the faces of a cube without the back face + * - each face is made out of 2 triangles + * 2) Subdivide the faces + * - more resolution == more curved lines + * 3) Spherize the cube + * - normalize the verts + * 4) Flatten onto xz plane + * - transform it onto an equidistant spherical projection techniques to transform the sphere onto a dome image + */ int i,j; float uv_height, uv_base; @@ -730,20 +730,20 @@ void KX_Dome::CreateMeshDome250(void) float uv_ratio = (float)(m_buffersize-1) / m_imagesize; m_radangle = m_angle * M_PI/180.0;//calculates the radians angle, used for flattening -/* -verts_height is the exactly needed height of the cube faces (not always 1.0). -When we want some horizontal information (e.g. for horizontal 220deg domes) we don't need to create and tesselate the whole cube. -Therefore the lateral cube faces could be small, and the tesselate mesh would be completely used. -(if we always worked with verts_height = 1.0, we would be discarding a lot of the calculated and tesselated geometry). - -So I came out with this formula: -verts_height = tan((rad_ang/2) - (MT_PI/2))*sqrt(2.0); - -Here we take half the sphere(rad_ang/2) and subtract a quarter of it (MT_PI/2) -Therefore we have the length in radians of the dome/sphere over the horizon. -Once we take the tangent of that angle, you have the verts coordinate corresponding to the verts on the side faces. -Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on the diagonal of the original cube. -*/ + /* + * verts_height is the exactly needed height of the cube faces (not always 1.0). + * When we want some horizontal information (e.g. for horizontal 220deg domes) we don't need to create and tesselate the whole cube. + * Therefore the lateral cube faces could be small, and the tesselate mesh would be completely used. + * (if we always worked with verts_height = 1.0, we would be discarding a lot of the calculated and tesselated geometry). + * + * So I came out with this formula: + * verts_height = tan((rad_ang/2) - (MT_PI/2))*sqrt(2.0); + * + * Here we take half the sphere(rad_ang/2) and subtract a quarter of it (MT_PI/2) + * Therefore we have the length in radians of the dome/sphere over the horizon. + * Once we take the tangent of that angle, you have the verts coordinate corresponding to the verts on the side faces. + * Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on the diagonal of the original cube. + */ verts_height = tan((rad_ang/2) - (MT_PI/2))*M_SQRT2; uv_height = uv_ratio * ((verts_height/2) + 0.5); @@ -995,16 +995,16 @@ Then we need to multiply it by sqrt(2.0) to get the coordinate of the verts on t void KX_Dome::CreateMeshPanorama(void) { -/* -1)- Define the faces of a cube without the top and bottom faces - - each face is made out of 2 triangles -2) Subdivide the faces - - more resolution == more curved lines -3) Spherize the cube - - normalize the verts t -4) Flatten onto xz plane - - use spherical projection techniques to transform the sphere onto a flat panorama -*/ + /* + * 1)- Define the faces of a cube without the top and bottom faces + * - each face is made out of 2 triangles + * 2) Subdivide the faces + * - more resolution == more curved lines + * 3) Spherize the cube + * - normalize the verts t + * 4) Flatten onto xz plane + * - use spherical projection techniques to transform the sphere onto a flat panorama + */ int i,j; float uv_ratio = (float)(m_buffersize-1) / m_imagesize; @@ -1432,10 +1432,10 @@ void KX_Dome::SplitFace(vector <DomeFace>& face, int *nfaces) void KX_Dome::CalculateFrustum(KX_Camera * cam) { - /* +#if 0 // manually creating a 90deg Field of View Frustum - the original formula: + // the original formula: top = tan(fov*3.14159/360.0) * near [for fov in degrees] fov*0.5 = arctan ((top-bottom)*0.5 / near) [for fov in radians] bottom = -top @@ -1446,7 +1446,7 @@ void KX_Dome::CalculateFrustum(KX_Camera * cam) glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(90.0,1.0,cam->GetCameraNear(),cam->GetCameraFar()); - */ +#endif RAS_FrameFrustum m_frustrum; //90 deg. Frustum @@ -1469,10 +1469,10 @@ void KX_Dome::CalculateFrustum(KX_Camera * cam) void KX_Dome::CalculateCameraOrientation() { /* -Uses 4 cameras for angles up to 180deg -Uses 5 cameras for angles up to 250deg -Uses 6 cameras for angles up to 360deg -*/ + * Uses 4 cameras for angles up to 180deg + * Uses 5 cameras for angles up to 250deg + * Uses 6 cameras for angles up to 360deg + */ int i; float deg45 = MT_PI / 4; MT_Scalar c = cos(deg45); diff --git a/source/gameengine/Ketsji/KX_Dome.h b/source/gameengine/Ketsji/KX_Dome.h index 922e2d4efb3..d4524d23d7d 100644 --- a/source/gameengine/Ketsji/KX_Dome.h +++ b/source/gameengine/Ketsji/KX_Dome.h @@ -26,8 +26,8 @@ Developed as part of a Research and Development project for SAT - La Soci�t� * \ingroup ketsji */ -#if !defined KX_DOME_H -#define KX_DOME_H +#ifndef __KX_DOME_H__ +#define __KX_DOME_H__ #include "KX_Scene.h" #include "KX_Camera.h" @@ -196,5 +196,4 @@ public: #endif }; -#endif - +#endif /* __KX_DOME_H__ */ diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp index 3739ad0d712..5a67b052a2b 100644 --- a/source/gameengine/Ketsji/KX_FontObject.cpp +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -92,8 +92,8 @@ KX_FontObject::KX_FontObject( void* sgReplicationInfo, m_fontid = GetFontId(text->vfont); /* initialize the color with the object color and store it in the KX_Object class - This is a workaround waiting for the fix: - [#25487] BGE: Object Color only works when it has a keyed frame */ + * This is a workaround waiting for the fix: + * [#25487] BGE: Object Color only works when it has a keyed frame */ copy_v4_v4(m_color, (const float*) ob->col); this->SetObjectColor((const MT_Vector4&) m_color); } diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h index 2466a32dad4..affa882427f 100644 --- a/source/gameengine/Ketsji/KX_FontObject.h +++ b/source/gameengine/Ketsji/KX_FontObject.h @@ -69,13 +69,13 @@ protected: class RAS_IRenderTools* m_rendertools; //needed for drawing routine -/* +#if 0 // WHY COMMENTED? - campbell #ifdef WITH_CXX_GUARDEDALLOC public: void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_FontObject"); } void operator delete( void *mem ) { MEM_freeN(mem); } #endif -*/ +#endif #ifdef WITH_PYTHON static PyObject* pyattr_get_text(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 5c758379727..5db9958f269 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -540,8 +540,8 @@ void KX_GameObject::ApplyRotation(const MT_Vector3& drot,bool local) /** -GetOpenGL Matrix, returns an OpenGL 'compatible' matrix -*/ + * GetOpenGL Matrix, returns an OpenGL 'compatible' matrix + */ double* KX_GameObject::GetOpenGLMatrix() { // todo: optimize and only update if necessary @@ -2901,7 +2901,7 @@ bool KX_GameObject::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void } /* this function is used to pre-filter the object before casting the ray on them. - This is useful for "X-Ray" option when we want to see "through" unwanted object. + * This is useful for "X-Ray" option when we want to see "through" unwanted object. */ bool KX_GameObject::NeedRayCast(KX_ClientObjectInfo* client) { diff --git a/source/gameengine/Ketsji/KX_IPhysicsController.h b/source/gameengine/Ketsji/KX_IPhysicsController.h index 5fc9f5c2473..68577f09414 100644 --- a/source/gameengine/Ketsji/KX_IPhysicsController.h +++ b/source/gameengine/Ketsji/KX_IPhysicsController.h @@ -41,11 +41,11 @@ struct KX_ClientObjectInfo; /** - Physics Controller, a special kind of Scene Graph Transformation Controller. - It get's callbacks from Physics in case a transformation change took place. - Each time the scene graph get's updated, the controller get's a chance - in the 'Update' method to reflect changed. -*/ + * Physics Controller, a special kind of Scene Graph Transformation Controller. + * It get's callbacks from Physics in case a transformation change took place. + * Each time the scene graph get's updated, the controller get's a chance + * in the 'Update' method to reflect changed. + */ class KX_IPhysicsController : public SG_Controller diff --git a/source/gameengine/Ketsji/KX_ISceneConverter.h b/source/gameengine/Ketsji/KX_ISceneConverter.h index dce97ea039f..50390005f2b 100644 --- a/source/gameengine/Ketsji/KX_ISceneConverter.h +++ b/source/gameengine/Ketsji/KX_ISceneConverter.h @@ -49,11 +49,11 @@ public: virtual ~KX_ISceneConverter () {}; /* - scenename: name of the scene to be converted, - if the scenename is empty, convert the 'default' scene (whatever this means) - destinationscene: pass an empty scene, everything goes into this - dictobj: python dictionary (for pythoncontrollers) - */ + * scenename: name of the scene to be converted, + * if the scenename is empty, convert the 'default' scene (whatever this means) + * destinationscene: pass an empty scene, everything goes into this + * dictobj: python dictionary (for pythoncontrollers) + */ virtual void ConvertScene( class KX_Scene* destinationscene, class RAS_IRenderTools* rendertools, diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index a8b7a362bd9..58cdfc28742 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -40,13 +40,13 @@ class KX_IpoActuator : public SCA_IActuator Py_Header private: /** Computes the IPO start time from the current time - and the current frame. */ + * and the current frame. */ void SetStartTime(float curtime); /** Computes the current frame from the current time - and the IPO start time. */ + * and the IPO start time. */ void SetLocalTime(float curtime); /** Ensures the current frame is between the start and - end frames. */ + * end frames. */ bool ClampLocalTime(); protected: diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 1381dcb3607..facac230e05 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -599,9 +599,9 @@ else KX_Scene* scene = *sceneit; /* Suspension holds the physics and logic processing for an - * entire scene. Objects can be suspended individually, and - * the settings for that preceed the logic and physics - * update. */ + * entire scene. Objects can be suspended individually, and + * the settings for that preceed the logic and physics + * update. */ m_logger->StartLog(tc_logic, m_kxsystem->GetTimeInSeconds(), true); m_sceneconverter->resetNoneDynamicObjectToIpo();//this is for none dynamic objects with ipo @@ -1340,8 +1340,8 @@ void KX_KetsjiEngine::RenderFonts(KX_Scene* scene) } /* -To run once per scene -*/ + * To run once per scene + */ void KX_KetsjiEngine::PostRenderScene(KX_Scene* scene) { // We need to first make sure our viewport is correct (enabling multiple viewports can mess this up) diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index c8a916e85b6..0d81883104b 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -142,11 +142,11 @@ bool KX_MouseFocusSensor::RayHit(KX_ClientObjectInfo* client_info, KX_RayCast* r KX_GameObject* hitKXObj = client_info->m_gameobject; /* Is this me? In the ray test, there are a lot of extra checks - * for aliasing artefacts from self-hits. That doesn't happen - * here, so a simple test suffices. Or does the camera also get - * self-hits? (No, and the raysensor shouldn't do it either, since - * self-hits are excluded by setting the correct ignore-object.) - * Hitspots now become valid. */ + * for aliasing artefacts from self-hits. That doesn't happen + * here, so a simple test suffices. Or does the camera also get + * self-hits? (No, and the raysensor shouldn't do it either, since + * self-hits are excluded by setting the correct ignore-object.) + * Hitspots now become valid. */ KX_GameObject* thisObj = (KX_GameObject*) GetParent(); if ((m_focusmode == 2) || hitKXObj == thisObj) { diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h index f8f5426dc8d..db9e3697492 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h @@ -120,7 +120,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor private: /** * The focus mode. 1 for handling focus, 0 for not handling, 2 for focus on any object - */ + */ int m_focusmode; /** diff --git a/source/gameengine/Ketsji/KX_NearSensor.h b/source/gameengine/Ketsji/KX_NearSensor.h index 1327f0aea37..8655d93d406 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.h +++ b/source/gameengine/Ketsji/KX_NearSensor.h @@ -55,7 +55,7 @@ public: bool bFindMaterial, const STR_String& touchedpropname, PHY_IPhysicsController* ctrl); -/* +#if 0 public: KX_NearSensor(class SCA_EventManager* eventmgr, class KX_GameObject* gameobj, @@ -64,7 +64,7 @@ public: bool bFindMaterial, const STR_String& touchedpropname, class KX_Scene* scene); -*/ +#endif virtual ~KX_NearSensor(); virtual void SynchronizeTransform(); virtual CValue* GetReplica(); diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index cbf08a674ef..82016e2fff3 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -2025,7 +2025,7 @@ PyObject* initRasterizer(RAS_IRasterizer* rasty,RAS_ICanvas* canvas) PyObject* item; /* Use existing module where possible - * be careful not to init any runtime vars after this */ + * be careful not to init any runtime vars after this */ m = PyImport_ImportModule( "Rasterizer" ); if(m) { Py_DECREF(m); diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp index e367ef83eb8..6a60fc08244 100644 --- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp +++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp @@ -168,9 +168,9 @@ void initPyTypes(void) { /* - initPyObjectPlusType(BL_ActionActuator::Parents); - ..... -*/ + * initPyObjectPlusType(BL_ActionActuator::Parents); + * ..... + */ /* For now just do PyType_Ready */ PyObject *mod= PyModule_New("GameTypes"); diff --git a/source/gameengine/Ketsji/KX_RadarSensor.h b/source/gameengine/Ketsji/KX_RadarSensor.h index f647189ab35..903413ca89b 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.h +++ b/source/gameengine/Ketsji/KX_RadarSensor.h @@ -36,8 +36,8 @@ #include "MT_Point3.h" /** -* Radar 'cone' sensor. Very similar to a near-sensor, but instead of a sphere, a cone is used. -*/ + * Radar 'cone' sensor. Very similar to a near-sensor, but instead of a sphere, a cone is used. + */ class KX_RadarSensor : public KX_NearSensor { protected: diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index 0cc0e7318c1..58ca847b617 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -151,7 +151,7 @@ bool KX_RaySensor::RayHit(KX_ClientObjectInfo* client, KX_RayCast* result, void } /* this function is used to pre-filter the object before casting the ray on them. - This is useful for "X-Ray" option when we want to see "through" unwanted object. + * This is useful for "X-Ray" option when we want to see "through" unwanted object. */ bool KX_RaySensor::NeedRayCast(KX_ClientObjectInfo* client) { diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 2763dea04ec..74a0abe526d 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1574,8 +1574,8 @@ void KX_Scene::LogicEndFrame() /** - * UpdateParents: SceneGraph transformation update. - */ + * UpdateParents: SceneGraph transformation update. + */ void KX_Scene::UpdateParents(double curtime) { // we use the SG dynamic list diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 9f12d9473bc..7e3378bd13f 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -160,8 +160,8 @@ protected: // Used to deregister objects that are deleted class KX_BlenderSceneConverter* m_sceneConverter; /** - * physics engine abstraction - */ + * physics engine abstraction + */ //e_PhysicsEngine m_physicsEngine; //who needs this ? class PHY_IPhysicsEnvironment* m_physicsEnvironment; @@ -582,8 +582,8 @@ public: void SetNodeTree(SG_Tree* root); /** - * 2D Filters - */ + * 2D Filters + */ void Update2DFilter(std::vector<STR_String>& propNames, void* gameObj, RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text); void Render2DFilters(RAS_ICanvas* canvas); |