diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-18 15:21:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-18 15:21:22 +0400 |
commit | 58683fa993e11d7bf888050e359b864f865d7c41 (patch) | |
tree | 2b23d73e312916ccdca6b780199e1fda1caf557b | |
parent | 9650667b3df2f39c35b7632720ff872265dfeaa5 (diff) |
enable DEBUG define in CMake and scons, also change booleans debug option to BOP_DEBUG, which was used inconsistently, and had to add a define for superlu.
-rw-r--r-- | CMakeLists.txt | 10 | ||||
-rw-r--r-- | build_files/scons/config/darwin-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/freebsd7-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/freebsd8-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/freebsd9-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/linux2-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/linuxcross-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/openbsd3-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/sunos5-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/config/win32-mingw-config.py | 2 | ||||
-rw-r--r-- | intern/boolop/intern/BOP_Interface.cpp | 20 | ||||
-rw-r--r-- | intern/boolop/intern/BOP_Merge2.cpp | 46 | ||||
-rw-r--r-- | intern/opennl/superlu/ssp_defs.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_math_matrix.h | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_matrix.c | 4 |
16 files changed, 55 insertions, 51 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9580d24be14..ffbc60d29de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -313,6 +313,8 @@ IF(UNIX AND NOT APPLE) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") ENDIF(WITH_OPENMP) + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") @@ -550,9 +552,8 @@ IF(WIN32) ADD_DEFINITIONS(-DFREE_WINDOWS) - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") - + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DDEBUG") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DDEBUG") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG") @@ -796,6 +797,9 @@ IF(APPLE) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") ENDIF(WITH_OPENMP) + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") + IF (WITH_OPENCOLLADA) SET(OPENCOLLADA ${LIBDIR}/opencollada) SET(OPENCOLLADA_INC ${OPENCOLLADA}/include) diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py index 1423e8fb392..f23d4a6390b 100644 --- a/build_files/scons/config/darwin-config.py +++ b/build_files/scons/config/darwin-config.py @@ -340,7 +340,7 @@ BF_PROFILE_LINKFLAGS = ['-pg'] BF_PROFILE = False BF_DEBUG = False -BF_DEBUG_CCFLAGS = ['-g'] +BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG'] ############################################################################# ################### Output directories ################## diff --git a/build_files/scons/config/freebsd7-config.py b/build_files/scons/config/freebsd7-config.py index 5678b4bda0a..afc71d01c94 100644 --- a/build_files/scons/config/freebsd7-config.py +++ b/build_files/scons/config/freebsd7-config.py @@ -204,7 +204,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g'] BF_PROFILE_LINKFLAGS = ['-pg'] BF_DEBUG = False -BF_DEBUG_CCFLAGS = ['-g'] +BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG'] BF_BUILDDIR = '../build/freebsd7' BF_INSTALLDIR='../install/freebsd7' diff --git a/build_files/scons/config/freebsd8-config.py b/build_files/scons/config/freebsd8-config.py index bc09e87d59f..d11618b6293 100644 --- a/build_files/scons/config/freebsd8-config.py +++ b/build_files/scons/config/freebsd8-config.py @@ -204,7 +204,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g'] BF_PROFILE_LINKFLAGS = ['-pg'] BF_DEBUG = False -BF_DEBUG_CCFLAGS = ['-g'] +BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG'] BF_BUILDDIR = '../build/freebsd8' BF_INSTALLDIR='../install/freebsd8' diff --git a/build_files/scons/config/freebsd9-config.py b/build_files/scons/config/freebsd9-config.py index 3fb4ebe7cd6..2aadbf0f960 100644 --- a/build_files/scons/config/freebsd9-config.py +++ b/build_files/scons/config/freebsd9-config.py @@ -204,7 +204,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g'] BF_PROFILE_LINKFLAGS = ['-pg'] BF_DEBUG = False -BF_DEBUG_CCFLAGS = ['-g'] +BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG'] BF_BUILDDIR = '../build/freebsd9' BF_INSTALLDIR='../install/freebsd9' diff --git a/build_files/scons/config/linux2-config.py b/build_files/scons/config/linux2-config.py index fd42e61da0c..fd0364f9ce9 100644 --- a/build_files/scons/config/linux2-config.py +++ b/build_files/scons/config/linux2-config.py @@ -220,7 +220,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g'] BF_PROFILE_LINKFLAGS = ['-pg'] BF_DEBUG = False -BF_DEBUG_CCFLAGS = ['-g'] +BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG'] BF_BUILDDIR = '../build/linux2' BF_INSTALLDIR='../install/linux2' diff --git a/build_files/scons/config/linuxcross-config.py b/build_files/scons/config/linuxcross-config.py index 1650201f8c6..263cfd89a8b 100644 --- a/build_files/scons/config/linuxcross-config.py +++ b/build_files/scons/config/linuxcross-config.py @@ -185,7 +185,7 @@ CC_WARN = [ '-Wall' ] LLIBS = [ '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++', '-luuid', '-lole32'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread' ] BF_DEBUG = False -BF_DEBUG_CCFLAGS = ['-g'] +BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG'] BF_PROFILE = False BF_PROFILE_CCFLAGS = ['-pg','-g'] diff --git a/build_files/scons/config/openbsd3-config.py b/build_files/scons/config/openbsd3-config.py index 0ef9ba5d0a4..65c2a1a2585 100644 --- a/build_files/scons/config/openbsd3-config.py +++ b/build_files/scons/config/openbsd3-config.py @@ -147,7 +147,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g'] BF_PROFILE_LINKFLAGS = ['-pg'] BF_DEBUG = False -BF_DEBUG_CCFLAGS = ['-g'] +BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG'] BF_BUILDDIR='../build/openbsd3' BF_INSTALLDIR='../install/openbsd3' diff --git a/build_files/scons/config/sunos5-config.py b/build_files/scons/config/sunos5-config.py index a0713735a5b..168fb4271a8 100644 --- a/build_files/scons/config/sunos5-config.py +++ b/build_files/scons/config/sunos5-config.py @@ -161,7 +161,7 @@ BF_PROFILE_LINKFLAGS = ['-pg'] BF_PROFILE = False BF_DEBUG = False -BF_DEBUG_CCFLAGS = [] +BF_DEBUG_CCFLAGS = ['-DDEBUG'] BF_BUILDDIR = '../build/sunos5' BF_INSTALLDIR='../install/sunos5' diff --git a/build_files/scons/config/win32-mingw-config.py b/build_files/scons/config/win32-mingw-config.py index f8b67781172..7189522809e 100644 --- a/build_files/scons/config/win32-mingw-config.py +++ b/build_files/scons/config/win32-mingw-config.py @@ -176,7 +176,7 @@ CC_WARN = [ '-Wall' ] LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid'] BF_DEBUG = False -BF_DEBUG_CCFLAGS= ['-g'] +BF_DEBUG_CCFLAGS= ['-g', '-DDEBUG'] BF_PROFILE_CCFLAGS = ['-pg', '-g'] BF_PROFILE_LINKFLAGS = ['-pg'] diff --git a/intern/boolop/intern/BOP_Interface.cpp b/intern/boolop/intern/BOP_Interface.cpp index 99116b7d87d..ff15751b797 100644 --- a/intern/boolop/intern/BOP_Interface.cpp +++ b/intern/boolop/intern/BOP_Interface.cpp @@ -80,7 +80,7 @@ BoolOpState BOP_performBooleanOperation(BoolOpType opType, CSG_FaceIteratorDescriptor obBFaces, CSG_VertexIteratorDescriptor obBVertices) { - #ifdef DEBUG + #ifdef BOP_DEBUG cout << "BEGIN BOP_performBooleanOperation" << endl; #endif @@ -118,7 +118,7 @@ BoolOpState BOP_performBooleanOperation(BoolOpType opType, // Invert the output mesh if is required *outputMesh = BOP_exportMesh(&meshC, invertMeshC); - #ifdef DEBUG + #ifdef BOP_DEBUG cout << "END BOP_performBooleanOperation" << endl; #endif @@ -141,7 +141,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC, bool invertMeshA, bool invertMeshB) { - #ifdef DEBUG + #ifdef BOP_DEBUG BOP_Chrono chrono; float t = 0.0f; float c = 0.0f; @@ -156,7 +156,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC, BOP_BSPTree bspB; bspB.addMesh(meshC, *facesB); - #ifdef DEBUG + #ifdef BOP_DEBUG c = chrono.stamp(); t += c; cout << "Create BSP " << c << endl; #endif @@ -172,7 +172,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC, if ((0.25*facesB->size()) > bspA.getDeep()) BOP_meshFilter(meshC, facesB, &bspA); - #ifdef DEBUG + #ifdef BOP_DEBUG c = chrono.stamp(); t += c; cout << "mesh Filter " << c << endl; #endif @@ -180,7 +180,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC, // Face 2 Face BOP_Face2Face(meshC,facesA,facesB); - #ifdef DEBUG + #ifdef BOP_DEBUG c = chrono.stamp(); t += c; cout << "Face2Face " << c << endl; #endif @@ -189,7 +189,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC, BOP_meshClassify(meshC,facesA,&bspB); BOP_meshClassify(meshC,facesB,&bspA); - #ifdef DEBUG + #ifdef BOP_DEBUG c = chrono.stamp(); t += c; cout << "Classification " << c << endl; #endif @@ -197,7 +197,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC, // Process overlapped faces BOP_removeOverlappedFaces(meshC,facesA,facesB); - #ifdef DEBUG + #ifdef BOP_DEBUG c = chrono.stamp(); t += c; cout << "Remove overlap " << c << endl; #endif @@ -205,7 +205,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC, // Sew two meshes BOP_sew(meshC,facesA,facesB); - #ifdef DEBUG + #ifdef BOP_DEBUG c = chrono.stamp(); t += c; cout << "Sew " << c << endl; #endif @@ -238,7 +238,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC, #endif #endif - #ifdef DEBUG + #ifdef BOP_DEBUG c = chrono.stamp(); t += c; cout << "Merge faces " << c << endl; cout << "Total " << t << endl; diff --git a/intern/boolop/intern/BOP_Merge2.cpp b/intern/boolop/intern/BOP_Merge2.cpp index ad9f832ef01..2ef8b5b30b7 100644 --- a/intern/boolop/intern/BOP_Merge2.cpp +++ b/intern/boolop/intern/BOP_Merge2.cpp @@ -70,7 +70,7 @@ void dumpmesh ( BOP_Mesh *m, bool force ) } if( nonmanifold ) cout << nonmanifold << " edges detected" << endl; -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "---------------------------" << endl; BOP_Edges edges = m->getEdges(); @@ -130,7 +130,7 @@ void BOP_Merge2::mergeFaces(BOP_Mesh *m, BOP_Index v) { m_mesh = m; -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "##############################" << endl; #endif cleanup( ); @@ -147,7 +147,7 @@ void BOP_Merge2::mergeFaces(BOP_Mesh *m, BOP_Index v) // ... and merge new faces if( cont ) cont = mergeFaces(); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "called mergeFaces " << cont << endl; #endif // ... until the merge is not succesful @@ -186,7 +186,7 @@ void clean_nonmanifold( BOP_Mesh *m ) unsigned short facecount = 0; bool found = false; BOP_Indexs vertList; -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " first edge is " << (*it) << endl; #endif vertList.push_back(first); @@ -214,7 +214,7 @@ void clean_nonmanifold( BOP_Mesh *m ) edge = NULL; } if( !edge ) break; -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " next edge is " << edge << endl; #endif tmpface = m->getFace(edge->getFaces().front()); @@ -231,7 +231,7 @@ void clean_nonmanifold( BOP_Mesh *m ) } if(found) { edge = *it; -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " --> found a loop" << endl; #endif if( vertList.size() == 3 ) { @@ -241,7 +241,7 @@ void clean_nonmanifold( BOP_Mesh *m ) BOP_Face4 *face = (BOP_Face4 *)m->getFace(edge->getFaces().front()); face->getNeighbours(first,last,next,last); } else { -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "loop has " << vertList.size() << "verts"; #endif continue; @@ -253,7 +253,7 @@ void clean_nonmanifold( BOP_Mesh *m ) BOP_Face3 *f = new BOP_Face3(next,first,last, oface1->getPlane(),oface1->getOriginalFace()); m->addFace( f ); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " face is backward: " << f << endl; #endif @@ -261,7 +261,7 @@ void clean_nonmanifold( BOP_Mesh *m ) BOP_Face3 *f = new BOP_Face3(last,first,next, oface1->getPlane(),oface1->getOriginalFace()); m->addFace( f ); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " face is forward: " << f << endl; #endif } @@ -366,7 +366,7 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices) BOP_LFaces facesByOriginalFace; BOP_Index v = mergeVertices[i]; BOP_Vertex *vert = m_mesh->getVertex(v); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "i = " << i << ", v = " << v << ", vert = " << vert << endl; if (v==48) cout << "found vert 48" << endl; @@ -381,7 +381,7 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices) vert->setTAG(BROKEN); break; case 2: { -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "size of fBOF = " << facesByOriginalFace.size() << endl; #endif BOP_Faces ff = facesByOriginalFace.front(); @@ -391,7 +391,7 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices) // look for two edges adjacent to v which contain both ofaces BOP_Indexs edges = vert->getEdges(); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " ff has " << ff.size() << " faces" << endl; cout << " fb has " << fb.size() << " faces" << endl; cout << " v has " << edges.size() << " edges" << endl; @@ -400,14 +400,14 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices) ++it ) { BOP_Edge *edge = m_mesh->getEdge(*it); BOP_Indexs faces = edge->getFaces(); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " " << edge << " has " << edge->getFaces().size() << " faces" << endl; #endif if( faces.size() == 2 ) { BOP_Face *f0 = m_mesh->getFace(faces[0]); BOP_Face *f1 = m_mesh->getFace(faces[1]); if( f0->getOriginalFace() != f1->getOriginalFace() ) { -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " " << f0 << endl; cout << " " << f1 << endl; #endif @@ -416,14 +416,14 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices) } } if(ecount == 2) { -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " edge indexes are " << eindexs[0]; cout << " and " << eindexs[1] << endl; #endif BOP_Edge *edge = m_mesh->getEdge(eindexs[0]); BOP_Index N = edge->getVertex1(); if(N == v) N = edge->getVertex2(); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " ## OK, replace "<<v<<" with "<<N << endl; #endif mergeVertex(ff , v, N ); @@ -437,7 +437,7 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices) } didMerge = true; } -#ifdef DEBUG +#ifdef BOP_DEBUG else { cout << " HUH: ecount was " << ecount << endl; } @@ -461,7 +461,7 @@ void BOP_Merge2::mergeVertex(BOP_Faces &faces, BOP_Index v1, BOP_Index v2) else mergeVertex((BOP_Face4 *) *face, v1, v2); (*face)->setTAG(BROKEN); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << " breaking " << (*face) << endl; #endif } @@ -506,7 +506,7 @@ void BOP_Merge2::mergeVertex(BOP_Face3 *face, BOP_Index v1, BOP_Index v2) if( prev != v2 && next != v2 ) { m_mesh->addFace( new BOP_Face3(prev,v2,next, face->getPlane(),face->getOriginalFace()) ); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "mv3: add " << prev << "," << v2 << "," << next << endl; } else { cout << "mv3: vertex already in tri: doing nothing" << endl; @@ -524,7 +524,7 @@ void BOP_Merge2::mergeVertex(BOP_Face4 *face, BOP_Index v1, BOP_Index v2) if( prev == v2 || next == v2 ) { m_mesh->addFace( new BOP_Face3(prev,next,opp, face->getPlane(),face->getOriginalFace()) ); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "mv4a: add " << prev << "," << next << "," << opp << endl; #endif } @@ -532,7 +532,7 @@ void BOP_Merge2::mergeVertex(BOP_Face4 *face, BOP_Index v1, BOP_Index v2) else { m_mesh->addFace( new BOP_Face4(prev,v2,next,opp, face->getPlane(),face->getOriginalFace()) ); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "mv4b: add "<<prev<<","<<v2<<","<<next<<","<<opp<<endl; #endif } @@ -570,7 +570,7 @@ bool BOP_Merge2::createQuads() // Set triangles to BROKEN deleteFace(m_mesh, *faceI); deleteFace(m_mesh, *faceJ); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "createQuad: del " << *faceI << endl; cout << "createQuad: del " << *faceJ << endl; cout << "createQuad: add " << faceK << endl; @@ -602,7 +602,7 @@ bool BOP_Merge2::createQuads() // Set triangles to BROKEN deleteFace(m_mesh, *faceI); deleteFace(m_mesh, *faceJ); -#ifdef DEBUG +#ifdef BOP_DEBUG cout << "createQuad: del " << *faceI << endl; cout << "createQuad: del " << *faceJ << endl; cout << "createQuad: add " << faceK << endl; diff --git a/intern/opennl/superlu/ssp_defs.h b/intern/opennl/superlu/ssp_defs.h index 61b324e74d8..7828a47d260 100644 --- a/intern/opennl/superlu/ssp_defs.h +++ b/intern/opennl/superlu/ssp_defs.h @@ -228,7 +228,7 @@ extern void check_tempv(int, float *); extern int print_int_vec(char *what, int n, int *vec); extern int sp_symetree(int *acolst, int *acolend, int *arow, int n, int *parent); - +extern void sprint_lu_col(char *msg, int jcol, int pivrow, int *xprune, GlobalLU_t *Glu); // added to build with debug for blender - campbell #ifdef __cplusplus } #endif diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 79030e3adfa..5237335e8ca 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1708,7 +1708,7 @@ void object_apply_mat4(Object *ob, float mat[][4]) /* rotation */ copy_m3_m4(mat3, mat); /* so scale doesnt interfear with rotation [#24291] */ - normalize_m3_m3(mat3_n, mat3); + normalize_m3_m3(mat3_n, (const float(*)[3])mat3); object_mat3_to_rot(ob, mat3_n, 0); diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index 294546bb222..6b3d8bf9d0b 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -102,9 +102,9 @@ void transpose_m3(float R[3][3]); void transpose_m4(float R[4][4]); void normalize_m3(float R[3][3]); -void normalize_m3_m3(float R[3][3], float A[3][3]); +void normalize_m3_m3(float R[3][3], const float A[3][3]); void normalize_m4(float R[4][4]); -void normalize_m4_m4(float R[4][4], float A[4][4]); +void normalize_m4_m4(float R[4][4], const float A[4][4]); void orthogonalize_m3(float R[3][3], int axis); void orthogonalize_m4(float R[4][4], int axis); diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 197d3676367..9bbd0fc64ac 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -750,7 +750,7 @@ void normalize_m3(float mat[][3]) normalize_v3(mat[2]); } -void normalize_m3_m3(float rmat[][3], float mat[][3]) +void normalize_m3_m3(float rmat[][3], const float mat[][3]) { normalize_v3_v3(rmat[0], mat[0]); normalize_v3_v3(rmat[1], mat[1]); @@ -770,7 +770,7 @@ void normalize_m4(float mat[][4]) if(len!=0.0) mat[2][3]/= len; } -void normalize_m4_m4(float rmat[][4], float mat[][4]) +void normalize_m4_m4(float rmat[][4], const float mat[][4]) { float len; |