code cleanup: float formatting was confusing in some cases - eg: (0.,0.,0.)
authorCampbell Barton <ideasman42@gmail.com>
Wed, 11 Apr 2012 08:15:13 +0000 (08:15 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 11 Apr 2012 08:15:13 +0000 (08:15 +0000)
30 files changed:
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/intern/CCGSubSurf.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenlib/intern/math_base.c
source/blender/blenlib/intern/noise.c
source/blender/blenloader/intern/readfile.c
source/blender/bmesh/intern/bmesh_operator_api.h
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/screen/area.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/nodes/composite/nodes/node_composite_tonemap.c
source/blender/render/intern/source/convertblender.c
source/gameengine/Converter/BL_DeformableGameObject.h
source/gameengine/GamePlayer/ghost/GPG_System.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
source/gameengine/Ketsji/KX_RayCast.cpp
source/gameengine/Ketsji/KX_SteeringActuator.cpp
source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp
source/gameengine/Ketsji/KX_TimeLogger.cpp
source/gameengine/Physics/Bullet/CcdGraphicController.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
source/gameengine/SceneGraph/SG_BBox.cpp
source/gameengine/SceneGraph/SG_BBox.h

index 08f9dfb05f3e98f96a2d589ad8405330405bae17..3e0180a84aac3b664d49dc30d9d9e3ebcefbc2ae 100644 (file)
@@ -64,7 +64,7 @@ struct BVHTreeRayHit;
 #define LOOP_EXISTING_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & PARS_UNEXIST))
 #define LOOP_SHOWN_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & (PARS_UNEXIST|PARS_NO_DISP)))
 /* OpenMP: Can only advance one variable within loop definition. */
-#define LOOP_DYNAMIC_PARTICLES for(p=0; p<psys->totpart; p++ ) if((pa=psys->particles+p)->state.time > 0.f)
+#define LOOP_DYNAMIC_PARTICLES for(p=0; p<psys->totpart; p++ ) if((pa=psys->particles+p)->state.time > 0.0f)
 
 #define PSYS_FRAND_COUNT       1024
 #define PSYS_FRAND(seed)       psys->frand[(seed) % PSYS_FRAND_COUNT]
index f00752171023ca5fbc014be9a8eda75267846e45..9b55785d1a499d62f669a014da19a6f35ab2ab80 100644 (file)
@@ -744,7 +744,7 @@ static void _face_calcIFNo(CCGFace *f, int lvl, int S, int x, int y, float *no,
        length = sqrtf(no[0] * no[0] + no[1] * no[1] + no[2] * no[2]);
 
        if (length > EPSILON) {
-               float invLength = 1.f/length;
+               float invLength = 1.0f / length;
 
                no[0] *= invLength;
                no[1] *= invLength;
index 78668a5a2e41f9190153dce975c12f6563937dd9..c77e384a2640bd9ab7989df19d503a6eef70efaa 100644 (file)
@@ -546,8 +546,8 @@ void init_pose_itasc(bItasc *itasc)
                itasc->numstep = 4;
                itasc->precision = 0.005f;
                itasc->flag = ITASC_AUTO_STEP|ITASC_INITIAL_REITERATION;
-               itasc->feedback = 20.f;
-               itasc->maxvel = 50.f;
+               itasc->feedback = 20.0f;
+               itasc->maxvel = 50.0f;
                itasc->solver = ITASC_SOLVER_SDLS;
                itasc->dampmax = 0.5;
                itasc->dampeps = 0.15;
index c62653b29e77c5ba82153f75aff4399cd8fcb8d0..237d268e307f1677caf6918737398159387f3f54 100644 (file)
@@ -847,8 +847,8 @@ Object *add_only_object(int type, const char *name)
        ob->init_state=1;
        ob->state=1;
        /* ob->pad3 == Contact Processing Threshold */
-       ob->m_contactProcessingThreshold = 1.;
-       ob->obstacleRad = 1.;
+       ob->m_contactProcessingThreshold = 1.0f;
+       ob->obstacleRad = 1.0f;
        
        /* NT fluid sim defaults */
        ob->fluidsimSettings = NULL;
index 10cc64890b97aa5567daafc2e77c3a148f29f60e..99fc2242f9fc93526f216f1d249ca22ce69ca37e 100644 (file)
@@ -592,7 +592,7 @@ void calc_sequence(Scene *scene, Sequence *seq)
 
                if (seq->seq1) {
                        /* XXX These resets should not be necessary, but users used to be able to
-                        *     edit effect's length, leading to strange results. See #29190. */
+                        *     edit effect's length, leading to strange results. See [#29190] */
                        seq->startofs = seq->endofs = seq->startstill = seq->endstill = 0;
                        seq->start = seq->startdisp = MAX3(seq->seq1->startdisp, seq->seq2->startdisp, seq->seq3->startdisp);
                        seq->enddisp = MIN3(seq->seq1->enddisp, seq->seq2->enddisp, seq->seq3->enddisp);
index 00cac3b58d7f13e5634c367cfbdb440fd6a08644..9d13397859d87c84e5d11c8c8d0df41d8d668a1f 100644 (file)
@@ -134,7 +134,7 @@ struct Scene;
 struct DerivedMesh;
 struct SmokeModifierData;
 
-#define TRI_UVOFFSET (1./4.)
+#define TRI_UVOFFSET (1.0 / 4.0)
 
 /* forward declerations */
 static void calcTriangleDivs(Object *ob, MVert *verts, int numverts, MFace *tris, int numfaces, int numtris, int **tridivs, float cell_len);
@@ -949,8 +949,8 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd)
                                                if (usqr>maxusqr) {                                                                     
                                                // cutoff at maxVelVal                                                                  
                                                for (int jj=0; jj<3; jj++) {                                                                            
-                                               if (objvel[jj]>0.) objvel[jj] =  maxVelVal;                                                                             
-                                               if (objvel[jj]<0.) objvel[jj] = -maxVelVal;                                                                     
+                                               if (objvel[jj] > 0.0) objvel[jj] =  maxVelVal;
+                                               if (objvel[jj] < 0.0) objvel[jj] = -maxVelVal;
                                                }                                                               
                                                } 
                                                }                                                               
index 9efcb3dbcaecdaa84fb0682fab872a17c3fc1c35..6bb238ac612ef2f17af382b7300c571190f16079 100644 (file)
@@ -37,8 +37,8 @@
 /* from python 3.1 pymath.c */
 double copysign(double x, double y)
 {
-       /* use atan2 to distinguish -0. from 0. */
-       if (y > 0. || (y == 0. && atan2(y, -1.) > 0.)) {
+       /* use atan2 to distinguish -0.0 from 0.0 */
+       if (y > 0.0 || (y == 0.0 && atan2(y, -1.0) > 0.0)) {
                return fabs(x);
        }
        else {
index f1749d0b7cd1fa3e7424b548134e686347de800d..5db42c35f5cee628073ac7e19c739ff68a16205f 100644 (file)
@@ -1002,11 +1002,11 @@ static float turbulence_perlin(float *point, float lofreq, float hifreq)
        p[2] = point[2];
 
        t = 0;
-       for (freq = lofreq ; freq < hifreq ; freq *= 2.) {
+       for (freq = lofreq ; freq < hifreq ; freq *= 2.0) {
                t += fabsf(noise3_perlin(p)) / freq;
-               p[0] *= 2.;
-               p[1] *= 2.;
-               p[2] *= 2.;
+               p[0] *= 2.0f;
+               p[1] *= 2.0f;
+               p[2] *= 2.0f;
        }
        return t - 0.3; /* readjust to make mean value = 0.0 */
 }
index 46ff416f4ab4b25950be0c4087a60640bc125e0f..5114be4f785cf5f527c9953d6864f0cbba1d699a 100644 (file)
@@ -10778,7 +10778,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                Object *ob;
                World *wrld;
                for (ob = main->object.first; ob; ob= ob->id.next) {
-                       ob->m_contactProcessingThreshold = 1.; //pad3 is used for m_contactProcessingThreshold
+                       ob->m_contactProcessingThreshold = 1.0f; //pad3 is used for m_contactProcessingThreshold
                        if (ob->parent) {
                                /* check if top parent has compound shape set and if yes, set this object
                                   to compound shaper as well (was the behavior before, now it's optional) */
index 7cba66995c920bfd5f880886a41ddd481c4be356..b01b80f1ef4579d1fa009d3f5c1fbaa22f7a456b 100644 (file)
@@ -90,7 +90,7 @@ BLI_INLINE void  _bmo_elem_flag_set(      BMesh *bm, BMFlagLayer *oflags, const
 BLI_INLINE void  _bmo_elem_flag_toggle(   BMesh *bm, BMFlagLayer *oflags, const short oflag);
 
 /* slot type arrays are terminated by the last member
- * having a slot type of 0.*/
+ * having a slot type of 0 */
 enum {
        BMO_OP_SLOT_SENTINEL = 0,
        BMO_OP_SLOT_BOOL = 1,
index 8f0ea378a2afa7c266ec1be71fd0dbeb8285ff6a..7726e707f08b96ec54e118490d12700b9eadb9ec 100644 (file)
@@ -196,9 +196,9 @@ static void gp_draw_stroke_point (bGPDspoint *points, short thickness, short dfl
                        gluQuadricDrawStyle(qobj, GLU_FILL); 
                        
                        /* need to translate drawing position, but must reset after too! */
-                       glTranslatef(co[0],  co[1], 0.); 
+                       glTranslatef(co[0], co[1], 0.0);
                        gluDisk(qobj, 0.0,  thickness, 32, 1); 
-                       glTranslatef(-co[0],  -co[1], 0.);
+                       glTranslatef(-co[0], -co[1], 0.0);
                        
                        gluDeleteQuadric(qobj);
                }
index 43b917c21862d4df80b821d8c4d9743484a17c02..bed17048ea1a78c293b6dcda49ac23f5878e72f9 100644 (file)
@@ -204,8 +204,8 @@ static void region_draw_azone_icon(AZone *az)
                
        qobj = gluNewQuadric();
        
-       glPushMatrix();         
-       glTranslatef(midx, midy, 0.); 
+       glPushMatrix();
+       glTranslatef(midx, midy, 0.0);
        
        /* outlined circle */
        glEnable(GL_LINE_SMOOTH);
index 37b284a030d92549d9f3715080bb0194f64813c6..0467579d0f21e6967ed78e7eb478c477a47e7726 100644 (file)
@@ -1051,7 +1051,7 @@ static void draw_default_sensor_header(bSensor *sens,
        /* Pulsing and frequency */
        uiBlockBeginAlign(block);
        uiDefIconButBitS(block, TOG, SENS_PULSE_REPEAT, 1, ICON_DOTSUP,
-                        (short)(x + 10 + 0. * (w-20)), (short)(y - 21), (short)(0.1 * (w-20)), 19,
+                        (short)(x + 10 + 0.0 * (w - 20)), (short)(y - 21), (short)(0.1 * (w - 20)), 19,
                         &sens->pulse, 0.0, 0.0, 0, 0,
                         "Activate TRUE level triggering (pulse mode)");
 
index 97e52a21e251536869616c0d8d8167c373a17336..29b12708e2da3a44a56387f4d9deaeff0f34a710 100644 (file)
@@ -5624,7 +5624,7 @@ static void draw_empty_cone(float size)
        radius = size;
        glTranslatef(cent, cent, cent);
        glScalef(radius, size * 2.0f, radius);
-       glRotatef(-90., 1.0, 0.0, 0.0);
+       glRotatef(-90.0, 1.0, 0.0, 0.0);
        gluCylinder(qobj, 1.0, 0.0, 1.0, 8, 1);
 
        glPopMatrix();
index 2289216c2a8e957cefed561e83a29dc33a123518..0e520a511fe2c8f8ab8bb9454a98d6002c2be526 100644 (file)
@@ -166,7 +166,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
        float d /*, d0 */ /* UNUSED */, dd, ds;
        float *points = NULL;
        int numpoints = 0;
-       float cor[3] = {1., 1., 1.};
+       float cor[3] = {1.0f, 1.0f, 1.0f};
        int gl_depth = 0, gl_blend = 0;
 
        /* draw slices of smoke is adapted from c++ code authored
index 9e5bd1c860c322f7f27dc09262d45e94c6cf1335..95a9d58c36e7e025c6c14a17b0501fc2fc0b7d46 100644 (file)
@@ -119,7 +119,7 @@ void circf(float x, float y, float rad)
        
        glPushMatrix(); 
        
-       glTranslatef(x,  y, 0.); 
+       glTranslatef(x, y, 0.0);
        
        gluDisk(qobj, 0.0,  rad, 32, 1);
        
@@ -136,7 +136,7 @@ void circ(float x, float y, float rad)
        
        glPushMatrix(); 
        
-       glTranslatef(x,  y, 0.); 
+       glTranslatef(x, y, 0.0);
        
        gluDisk(qobj, 0.0,  rad, 32, 1);
        
index baa5ba046ddc2af5d79acc98e3c79831571965e9..0696c2ba848bea2200de6ea478f8c6995cbe57c0 100644 (file)
@@ -118,9 +118,9 @@ static void tonemap(NodeTonemap* ntm, CompBuf* dst, CompBuf* src)
                        dp[x][1] /= ((dg == 0.f) ? 1.f : dg);
                        dp[x][2] /= ((db == 0.f) ? 1.f : db);
                        if (igm != 0.f) {
-                               dp[x][0] = pow((double)MAX2(dp[x][0], 0.), igm);
-                               dp[x][1] = pow((double)MAX2(dp[x][1], 0.), igm);
-                               dp[x][2] = pow((double)MAX2(dp[x][2], 0.), igm);
+                               dp[x][0] = pow((double)MAX2(dp[x][0], 0.0), igm);
+                               dp[x][1] = pow((double)MAX2(dp[x][1], 0.0), igm);
+                               dp[x][2] = pow((double)MAX2(dp[x][2], 0.0), igm);
                        }
                }
        }
index 9b12d556320a79224936083891b0e036bb10eb31..21cfb8b6db75ba4df68590d31da583de708c424c 100644 (file)
@@ -5478,8 +5478,8 @@ static int load_fluidsimspeedvectors(Render *re, ObjectInstanceRen *obi, float *
                        ver++;
 
                // get fluid velocity
-               fsvec[3] = 0.
-               //fsvec[0] = fsvec[1] = fsvec[2] = fsvec[3] = 0.; fsvec[2] = 2.; // NT fixed test
+               fsvec[3] = 0.0f;
+               //fsvec[0] = fsvec[1] = fsvec[2] = fsvec[3] = 0.0; fsvec[2] = 2.0f; // NT fixed test
                for (j=0;j<3;j++) fsvec[j] = velarray[a].vel[j];
                
                /* (bad) HACK insert average velocity if none is there (see previous comment) */
index b86069bca1b2770ba835646576fb216e65c23223..d0fe741672deb6c4441ba113d6f6e83b05cd03dd 100644 (file)
@@ -70,7 +70,7 @@ public:
                KX_GameObject(sgReplicationInfo,callbacks),
                m_pDeformer(NULL),
                m_activeAct(NULL),
-               m_lastframe(0.),
+               m_lastframe(0.0),
                m_blendobj(blendobj),
                m_activePriority(9999)
        {
index d5e450296796683f337a0e5f0c9b1637558d7683..6710572d843328b92f6e12608b1ed44423002539 100644 (file)
@@ -46,7 +46,7 @@ double GPG_System::GetTimeInSeconds()
 {
        GHOST_TInt64 millis = (GHOST_TInt64)m_system->getMilliSeconds();
        double time = (double)millis;
-       time /= 1000.;
+       time /= 1000.0f;
        return time;
 }
 
index 0aaedd4d83b084903f053b4fd24c520a2735680e..a9602d164300187e37ebe4f914bd80db41669f15 100644 (file)
@@ -306,14 +306,14 @@ void KX_Camera::ExtractFrustumSphere()
                MT_Vector4 nfar;    // far point in device normalized coordinate
                MT_Point3 farpoint; // most extreme far point in camera coordinate
                MT_Point3 nearpoint;// most extreme near point in camera coordinate
-               MT_Point3 farcenter(0.,0.,0.);// center of far cliping plane in camera coordinate
+               MT_Point3 farcenter(0.0, 0.0, 0.0);// center of far cliping plane in camera coordinate
                MT_Scalar F=-1.0, N; // square distance of far and near point to origin
                MT_Scalar f, n;     // distance of far and near point to z axis. f is always > 0 but n can be < 0
                MT_Scalar e, s;     // far and near clipping distance (<0)
                MT_Scalar c;        // slope of center line = distance of far clipping center to z axis / far clipping distance
                MT_Scalar z;        // projection of sphere center on z axis (<0)
                // tmp value
-               MT_Vector4 npoint(1., 1., 1., 1.);
+               MT_Vector4 npoint(1.0, 1.0, 1.0, 1.0);
                MT_Vector4 hpoint;
                MT_Point3 point;
                MT_Scalar len;
@@ -337,7 +337,7 @@ void KX_Camera::ExtractFrustumSphere()
                // the far center is the average of the far clipping points
                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.setValue(-nfar[0], -nfar[1], -1.0, 1.0);
                nfar = clip_camcs_matrix*nfar;
                nearpoint.setValue(nfar[0]/nfar[3], nfar[1]/nfar[3], nfar[2]/nfar[3]);
                // this is a frustrum projection
@@ -362,7 +362,7 @@ void KX_Camera::ExtractFrustumSphere()
        {
                // orthographic projection
                // The most extreme points on the near and far plane. (normalized device coords)
-               MT_Vector4 hnear(1., 1., 1., 1.), hfar(-1., -1., -1., 1.);
+               MT_Vector4 hnear(1.0, 1.0, 1.0, 1.0), hfar(-1.0, -1.0, -1.0, 1.0);
                
                // Transform to hom camera local space
                hnear = clip_camcs_matrix*hnear;
@@ -389,7 +389,7 @@ bool KX_Camera::PointInsideFrustum(const MT_Point3& x)
        
        for ( unsigned int i = 0; i < 6 ; i++ )
        {
-               if (m_planes[i][0]*x[0] + m_planes[i][1]*x[1] + m_planes[i][2]*x[2] + m_planes[i][3] < 0.)
+               if (m_planes[i][0] * x[0] + m_planes[i][1] * x[1] + m_planes[i][2] * x[2] + m_planes[i][3] < 0.0)
                        return false;
        }
        return true;
@@ -407,7 +407,7 @@ int KX_Camera::BoxInsideFrustum(const MT_Point3 *box)
                // 8 box vertices.
                for (unsigned int v = 0; v < 8 ; v++)
                {
-                       if (m_planes[p][0]*box[v][0] + m_planes[p][1]*box[v][1] + m_planes[p][2]*box[v][2] + m_planes[p][3] < 0.)
+                       if (m_planes[p][0] * box[v][0] + m_planes[p][1] * box[v][1] + m_planes[p][2] * box[v][2] + m_planes[p][3] < 0.0)
                                behindCount++;
                }
                
index f9d60c57adc0aa499c08a0d98065ca062a5d0c58..b8169899c78bce411a81d6100a388efd4b0158d7 100644 (file)
@@ -343,7 +343,7 @@ void KX_ObstacleSimulation::DrawObstacles()
        if (!m_enableVisualization)
                return;
        static const MT_Vector3 bluecolor(0,0,1);
-       static const MT_Vector3 normal(0.,0.,1.);
+       static const MT_Vector3 normal(0.0, 0.0, 1.0);
        static const int SECTORS_NUM = 32;
        for (size_t i=0; i<m_obstacles.size(); i++)
        {
index 29e9fb5bca04ac3ae955c83d099c3b7951c30a6e..459600f2e3487345f636ef641ab71f7d34564a9a 100644 (file)
@@ -103,7 +103,7 @@ bool KX_RayCast::RayTest(PHY_IPhysicsEnvironment* physics_environment, const MT_
                // Note that retrieving in a single shot multiple hit points would be possible 
                // but it would require some change in Bullet.
                prevpoint = callback.m_hitPoint;
-               /* We add 0.001 of fudge, so that if the margin && radius == 0., we don't endless loop. */
+               /* We add 0.001 of fudge, so that if the margin && radius == 0.0, we don't endless loop. */
                MT_Scalar marg = 0.001 + hit_controller->GetMargin();
                marg *= 2.f;
                /* Calculate the other side of this object */
index f3aecd9e0ba147e8cd430ec207d2714a90a5e254..dd2ff2e305a3f2da9cca71436aa3dba4b7190bc2 100644 (file)
@@ -266,11 +266,11 @@ bool KX_SteeringActuator::Update(double curtime, bool frame)
                        if (m_simulation && m_obstacle /*&& !newvel.fuzzyZero()*/)
                        {
                                if (m_enableVisualization)
-                                       KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(1.,0.,0.));
+                                       KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(1.0, 0.0, 0.0));
                                m_simulation->AdjustObstacleVelocity(m_obstacle, m_mode!=KX_STEERING_PATHFOLLOWING ? m_navmesh : NULL, 
                                                                newvel, m_acceleration*delta, m_turnspeed/180.0f*M_PI*delta);
                                if (m_enableVisualization)
-                                       KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(0.,1.,0.));
+                                       KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(0.0, 1.0, 0.0));
                        }
 
                        HandleActorFace(newvel);
index 2b09fe09fc1af6a152297ffb790acf2bee6ef890..13717993c4cf6c5a63b866cbf1a4a0dc8651a636 100644 (file)
@@ -120,7 +120,7 @@ double KX_TimeCategoryLogger::GetAverage(TimeCategory tc)
 
 double KX_TimeCategoryLogger::GetAverage(void)
 {
-       double time = 0.;
+       double time = 0.0;
 
        KX_TimeLoggerMap::iterator it;
        for (it = m_loggers.begin(); it != m_loggers.end(); it++) {
index e0aea45291c6bed0007b6f51c301d688b7ebe7a3..1a0d3d28d4c64649816267843b369323ad403f1b 100644 (file)
@@ -87,7 +87,7 @@ void KX_TimeLogger::NextMeasurement(double now)
        EndLog(now);
 
        // Add a new measurement at the front
-       double m = 0.;
+       double m = 0.0;
        m_measurements.push_front(m);
 
        // Remove measurement if we grow beyond the maximum size
@@ -102,7 +102,7 @@ void KX_TimeLogger::NextMeasurement(double now)
 
 double KX_TimeLogger::GetAverage(void) const
 {
-       double avg = 0.;
+       double avg = 0.0;
 
        unsigned int numMeasurements = m_measurements.size();
        if (numMeasurements > 1) {
index 92cba6e9afc5ff61fa8f1ac1572d0ebba5446096..36e7b0d482f80cc6a660d894ee1f5e9e4d0801cb 100644 (file)
@@ -86,12 +86,12 @@ void CcdGraphicController::getAabb(btVector3& aabbMin, btVector3& aabbMax)
        btVector3 tmpAabbMin = m_localAabbMin * scale;
        btVector3 tmpAabbMax = m_localAabbMax * scale;
 
-       localAabbMin[0] = (scale.getX() >= 0.) ? tmpAabbMin[0] : tmpAabbMax[0];
-       localAabbMin[1] = (scale.getY() >= 0.) ? tmpAabbMin[1] : tmpAabbMax[1];
-       localAabbMin[2] = (scale.getZ() >= 0.) ? tmpAabbMin[2] : tmpAabbMax[2];
-       localAabbMax[0] = (scale.getX() <= 0.) ? tmpAabbMin[0] : tmpAabbMax[0];
-       localAabbMax[1] = (scale.getY() <= 0.) ? tmpAabbMin[1] : tmpAabbMax[1];
-       localAabbMax[2] = (scale.getZ() <= 0.) ? tmpAabbMin[2] : tmpAabbMax[2];
+       localAabbMin[0] = (scale.getX() >= 0.0) ? tmpAabbMin[0] : tmpAabbMax[0];
+       localAabbMin[1] = (scale.getY() >= 0.0) ? tmpAabbMin[1] : tmpAabbMax[1];
+       localAabbMin[2] = (scale.getZ() >= 0.0) ? tmpAabbMin[2] : tmpAabbMax[2];
+       localAabbMax[0] = (scale.getX() <= 0.0) ? tmpAabbMin[0] : tmpAabbMax[0];
+       localAabbMax[1] = (scale.getY() <= 0.0) ? tmpAabbMin[1] : tmpAabbMax[1];
+       localAabbMax[2] = (scale.getZ() <= 0.0) ? tmpAabbMin[2] : tmpAabbMax[2];
 
        btVector3 localHalfExtents = btScalar(0.5)*(localAabbMax-localAabbMin);
        btVector3 localCenter = btScalar(0.5)*(localAabbMax+localAabbMin);
index d1713462224331bf378682666a0ce7f53c909076..7db433b5b4fa768839879ed6f8576d6b9b94eb76 100644 (file)
@@ -393,7 +393,7 @@ void RAS_OpenGLRasterizer::FlushDebugShapes()
                glBegin(GL_LINE_LOOP);
                glColor4f(m_debugShapes[i].m_color[0],m_debugShapes[i].m_color[1],m_debugShapes[i].m_color[2],1.f);
 
-               static const MT_Vector3 worldUp(0.,0.,1.);
+               static const MT_Vector3 worldUp(0.0, 0.0, 1.0);
                MT_Vector3 norm = m_debugShapes[i].m_param;
                MT_Matrix3x3 tr;
                if (norm.fuzzyZero() || norm == worldUp)
@@ -414,7 +414,7 @@ void RAS_OpenGLRasterizer::FlushDebugShapes()
                for (int j = 0; j<n; j++)
                {
                        MT_Scalar theta = j*M_PI*2/n;
-                       MT_Vector3 pos(cos(theta)*rad, sin(theta)*rad, 0.);
+                       MT_Vector3 pos(cos(theta) * rad, sin(theta) * rad, 0.0);
                        pos = pos*tr;
                        pos += m_debugShapes[i].m_pos;
                        const MT_Scalar* posPtr = &pos.x();
index b1e3a3216ed29a876e571ac0a7b0d6fbc8087954..4b2fc5410fa8cbd84808c1f3940ced4d7401219c 100644 (file)
@@ -37,8 +37,8 @@
  #include "SG_Node.h"
  
 SG_BBox::SG_BBox() :
-       m_min(0., 0., 0.),
-       m_max(0., 0., 0.)
+       m_min(0.0, 0.0, 0.0),
+       m_max(0.0, 0.0, 0.0)
 {
 }
 
index 5096d65558e2cfe90e5f656f2b120426763bac07..33e29b85a5fac0cbb7285e5d44851a2047de6e9b 100644 (file)
@@ -81,7 +81,7 @@ public:
        /**
         * Scales the bounding box about the optional point.
         */
-       void scale(const MT_Vector3 &size, const MT_Point3 &point = MT_Point3(0., 0., 0.));
+       void scale(const MT_Vector3 &size, const MT_Point3 &point = MT_Point3(0.0, 0.0, 0.0));
 #endif
        SG_BBox transform(const MT_Transform &world) const;
        /**