Revision: 24463
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24463
Author:   blendix
Date:     2009-11-10 21:40:18 +0100 (Tue, 10 Nov 2009)

Log Message:
-----------
Math Lib

* Pre-conversion commit removing old arithb.c code, this will not compile,
  next commit fixes that.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/anim.c
    trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c
    trunk/blender/source/blender/blenkernel/intern/modifier.c
    trunk/blender/source/blender/blenlib/BLI_math_rotation.h
    trunk/blender/source/blender/blenlib/intern/math_base.c
    trunk/blender/source/blender/blenlib/intern/math_color.c
    trunk/blender/source/blender/blenlib/intern/math_geom.c
    trunk/blender/source/blender/blenlib/intern/math_rotation.c
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
    trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp

Removed Paths:
-------------
    trunk/blender/source/blender/blenlib/BLI_arithb.h
    trunk/blender/source/blender/blenlib/intern/arithb.c

Modified: trunk/blender/source/blender/blenkernel/intern/anim.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/anim.c       2009-11-10 
20:34:35 UTC (rev 24462)
+++ trunk/blender/source/blender/blenkernel/intern/anim.c       2009-11-10 
20:40:18 UTC (rev 24463)
@@ -704,7 +704,7 @@
                                                
                                                /* scale */
                                                if(par->transflag & 
OB_DUPLIFACES_SCALE) {
-                                                       float size= 
v4?AreaQ3Dfl(v1, v2, v3, v4):AreaT3Dfl(v1, v2, v3);
+                                                       float size= v4? 
AreaQ3Dfl(v1, v2, v3, v4): AreaT3Dfl(v1, v2, v3);
                                                        size= sqrt(size) * 
par->dupfacesca;
                                                        Mat3MulFloat(mat[0], 
size);
                                                }

Modified: trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c      
2009-11-10 20:34:35 UTC (rev 24462)
+++ trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c      
2009-11-10 20:40:18 UTC (rev 24463)
@@ -405,12 +405,9 @@
                                                /* TODO make this better (cache 
facenormals as layer?) */
                                                float nor[3];
                                                if(mface->v4) {
-                                                       
CalcNormFloat4(mvert[mface->v1].co, mvert[mface->v2].co,
-                                                                               
   mvert[mface->v3].co, mvert[mface->v4].co,
-                                                                               
   nor);
+                                                       
CalcNormFloat4(mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co, 
mvert[mface->v4].co, nor);
                                                } else {
-                                                       
CalcNormFloat(mvert[mface->v1].co, mvert[mface->v2].co,
-                                                                               
  mvert[mface->v3].co, nor);
+                                                       
CalcNormFloat(mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co, 
nor);
                                                }
                                                glNormal3fv(nor);
                                        }
@@ -579,12 +576,9 @@
                                        else {
                                                float nor[3];
                                                if(mf->v4) {
-                                                       
CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co,
-                                                                               
   mv[mf->v3].co, mv[mf->v4].co,
-                                                                               
   nor);
+                                                       
CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co, mv[mf->v4].co, nor);
                                                } else {
-                                                       
CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co,
-                                                                               
  mv[mf->v3].co, nor);
+                                                       
CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co, nor);
                                                }
                                                glNormal3fv(nor);
                                        }
@@ -754,12 +748,9 @@
                                        else {
                                                float nor[3];
                                                if(mf->v4) {
-                                                       
CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co,
-                                                                               
   mv[mf->v3].co, mv[mf->v4].co,
-                                                                               
   nor);
+                                                       
CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co, mv[mf->v4].co, nor);
                                                } else {
-                                                       
CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co,
-                                                                               
  mv[mf->v3].co, nor);
+                                                       
CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co, nor);
                                                }
                                                glNormal3fv(nor);
                                        }
@@ -929,12 +920,9 @@
                                        /* TODO ideally a normal layer should 
always be available */
                                        float nor[3];
                                        if(mface->v4) {
-                                               
CalcNormFloat4(mvert[mface->v1].co, mvert[mface->v2].co,
-                                                                          
mvert[mface->v3].co, mvert[mface->v4].co,
-                                                                          nor);
+                                               
CalcNormFloat4(mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co, 
mvert[mface->v4].co, nor);
                                        } else {
-                                               
CalcNormFloat(mvert[mface->v1].co, mvert[mface->v2].co,
-                                                                         
mvert[mface->v3].co, nor);
+                                               
CalcNormFloat(mvert[mface->v1].co, mvert[mface->v2].co, mvert[mface->v3].co, 
nor);
                                        }
                                        glNormal3fv(nor);
                                }
@@ -1275,13 +1263,11 @@
                VecAddf(cent, cent, mv[mf->v3].co);
 
                if (mf->v4) {
-                       CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co,
-                                      mv[mf->v3].co, mv[mf->v4].co, no);
+                       CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co, 
mv[mf->v3].co, mv[mf->v4].co, no);
                        VecAddf(cent, cent, mv[mf->v4].co);
                        VecMulf(cent, 0.25f);
                } else {
-                       CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co,
-                                     mv[mf->v3].co, no);
+                       CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co, 
mv[mf->v3].co, no);
                        VecMulf(cent, 0.33333333333f);
                }
 
@@ -1630,11 +1616,9 @@
                float *f_no = face_nors[i];
 
                if(mf->v4)
-                       CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co,
-                                      mv[mf->v3].co, mv[mf->v4].co, f_no);
+                       CalcNormFloat4(mv[mf->v1].co, mv[mf->v2].co, 
mv[mf->v3].co, mv[mf->v4].co, f_no);
                else
-                       CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co,
-                                     mv[mf->v3].co, f_no);
+                       CalcNormFloat(mv[mf->v1].co, mv[mf->v2].co, 
mv[mf->v3].co, f_no);
                
                VecAddf(temp_nors[mf->v1], temp_nors[mf->v1], f_no);
                VecAddf(temp_nors[mf->v2], temp_nors[mf->v2], f_no);

Modified: trunk/blender/source/blender/blenkernel/intern/modifier.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/modifier.c   2009-11-10 
20:34:35 UTC (rev 24462)
+++ trunk/blender/source/blender/blenkernel/intern/modifier.c   2009-11-10 
20:40:18 UTC (rev 24463)
@@ -3947,8 +3947,7 @@
                                xmin = -xmax;
                                ymin = -ymax;
 
-                               i_window(xmin, xmax, ymin, ymax,
-                                        cam->clipsta, cam->clipend, perspmat);
+                               i_window(xmin, xmax, ymin, ymax, cam->clipsta, 
cam->clipend, perspmat);
                                Mat4MulMat4(tmpmat, projectors[i].projmat, 
perspmat);
                        } else if(cam->type == CAM_ORTHO) {
                                float orthomat[4][4];
@@ -3967,8 +3966,7 @@
                                xmin = -xmax;
                                ymin = -ymax;
 
-                               i_ortho(xmin, xmax, ymin, ymax,
-                                       cam->clipsta, cam->clipend, orthomat);
+                               i_ortho(xmin, xmax, ymin, ymax, cam->clipsta, 
cam->clipend, orthomat);
                                Mat4MulMat4(tmpmat, projectors[i].projmat, 
orthomat);
                        }
                } else {

Deleted: trunk/blender/source/blender/blenlib/BLI_arithb.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_arithb.h   2009-11-10 20:34:35 UTC 
(rev 24462)
+++ trunk/blender/source/blender/blenlib/BLI_arithb.h   2009-11-10 20:40:18 UTC 
(rev 24463)
@@ -1,571 +0,0 @@
-#undef TEST_ACTIVE
-//#define ACTIVE 1
-/**
- * blenlib/BLI_arithb.h    mar 2001 Nzc
- *
- * $Id$ 
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU 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 General Public License for more details.
- *
- * You should have received a copy of the GNU 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.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- * */
-
-#ifndef BLI_ARITHB_H
-#define BLI_ARITHB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef WIN32
-#define _USE_MATH_DEFINES
-#endif
-
-#include <math.h>
-
-#ifndef M_PI
-#define M_PI           3.14159265358979323846
-#endif
-#ifndef M_PI_2
-#define M_PI_2         1.57079632679489661923
-#endif
-#ifndef M_SQRT2
-#define M_SQRT2                1.41421356237309504880
-#endif
-#ifndef M_SQRT1_2
-#define M_SQRT1_2      0.70710678118654752440
-#endif
-#ifndef M_1_PI
-#define M_1_PI         0.318309886183790671538
-#endif
-
-#ifndef M_E
-#define M_E             2.7182818284590452354
-#endif
-#ifndef M_LOG2E
-#define M_LOG2E         1.4426950408889634074
-#endif
-#ifndef M_LOG10E
-#define M_LOG10E        0.43429448190325182765
-#endif
-#ifndef M_LN2
-#define M_LN2           0.69314718055994530942
-#endif
-#ifndef M_LN10
-#define M_LN10          2.30258509299404568402
-#endif
-
-#ifndef sqrtf
-#define sqrtf(a) ((float)sqrt(a))
-#endif
-#ifndef powf
-#define powf(a, b) ((float)pow(a, b))
-#endif
-#ifndef cosf
-#define cosf(a) ((float)cos(a))
-#endif
-#ifndef sinf
-#define sinf(a) ((float)sin(a))
-#endif
-#ifndef acosf
-#define acosf(a) ((float)acos(a))
-#endif
-#ifndef asinf
-#define asinf(a) ((float)asin(a))
-#endif
-#ifndef atan2f
-#define atan2f(a, b) ((float)atan2(a, b))
-#endif
-#ifndef tanf
-#define tanf(a) ((float)tan(a))
-#endif
-#ifndef atanf
-#define atanf(a) ((float)atan(a))
-#endif
-#ifndef floorf
-#define floorf(a) ((float)floor(a))
-#endif
-#ifndef ceilf
-#define ceilf(a) ((float)ceil(a))
-#endif
-#ifndef fabsf
-#define fabsf(a) ((float)fabs(a))
-#endif
-#ifndef logf
-#define logf(a) ((float)log(a))
-#endif
-#ifndef expf
-#define expf(a) ((float)exp(a))
-#endif
-#ifndef fmodf
-#define fmodf(a, b) ((float)fmod(a, b))
-#endif
-
-#ifdef WIN32
-       #ifndef FREE_WINDOWS
-               #define isnan(n) _isnan(n)
-               #define finite _finite
-       #endif
-#endif
-
-#define MAT4_UNITY {{ 1.0, 0.0, 0.0, 0.0},\
-                                       { 0.0, 1.0, 0.0, 0.0},\
-                                       { 0.0, 0.0, 1.0, 0.0},\
-                                       { 0.0, 0.0, 0.0, 1.0}}
-
-#define MAT3_UNITY {{ 1.0, 0.0, 0.0},\
-                                       { 0.0, 1.0, 0.0},\
-                                       { 0.0, 0.0, 1.0}}
-
-
-void CalcCent3f(float *cent,  float *v1, float *v2, float *v3);
-void CalcCent4f(float *cent, float *v1, float *v2, float *v3, float *v4);
-
-void Crossf(float *c, float *a, float *b);
-void Projf(float *c, float *v1, float *v2);
-
-float Inpf(float *v1, float *v2);
-float Inp2f(float *v1, float *v2);
-
-float Normalize(float *n);
-float Normalize2(float *n);
-
-float Sqrt3f(float f);
-double Sqrt3d(double d);
-
-float saacos(float fac);
-float saasin(float fac);
-float sasqrt(float fac);
-float saacosf(float fac);
-float saasinf(float fac);
-float sasqrtf(float fac);
-
-int FloatCompare(float *v1, float *v2, float limit);
-int FloatCompare4(float *v1, float *v2, float limit);
-float FloatLerpf(float target, float origin, float fac);
-
-float CalcNormFloat(float *v1, float *v2, float *v3, float *n);
-float CalcNormFloat4(float *v1, float *v2, float *v3, float *v4, float *n);
-
-void CalcNormLong(int *v1, int *v2, int *v3, float *n);
-/* CalcNormShort: is ook uitprodukt - (translates as 'is also out/cross 
product') */
-void CalcNormShort(short *v1, short *v2, short *v3, float *n);
-float power_of_2(float val);
-
-/**
- * @section Euler conversion routines (With Custom Order)
- */
-
-/* Defines for rotation orders 
- * WARNING: must match the eRotationModes in DNA_action_types.h
- *                order matters - types are saved to file!
- */
-typedef enum eEulerRotationOrders {
-       EULER_ORDER_DEFAULT = 1,        /* Blender 'default' (classic) is 
basically XYZ */
-       EULER_ORDER_XYZ = 1,            /* Blender 'default' (classic) - must 
be as 1 to sync with PoseChannel rotmode */
-       EULER_ORDER_XZY,
-       EULER_ORDER_YXZ,
-       EULER_ORDER_YZX,
-       EULER_ORDER_ZXY,
-       EULER_ORDER_ZYX,

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to