forked from bartvdbraak/blender
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.
This commit is contained in:
parent
9650667b3d
commit
58683fa993
@ -313,6 +313,8 @@ IF(UNIX AND NOT APPLE)
|
|||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|
||||||
ENDIF(WITH_OPENMP)
|
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")
|
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
|
||||||
|
|
||||||
@ -550,9 +552,8 @@ IF(WIN32)
|
|||||||
|
|
||||||
ADD_DEFINITIONS(-DFREE_WINDOWS)
|
ADD_DEFINITIONS(-DFREE_WINDOWS)
|
||||||
|
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_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")
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DDEBUG")
|
||||||
|
|
||||||
|
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
|
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
|
||||||
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_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")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|
||||||
ENDIF(WITH_OPENMP)
|
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)
|
IF (WITH_OPENCOLLADA)
|
||||||
SET(OPENCOLLADA ${LIBDIR}/opencollada)
|
SET(OPENCOLLADA ${LIBDIR}/opencollada)
|
||||||
SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
|
SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
|
||||||
|
@ -340,7 +340,7 @@ BF_PROFILE_LINKFLAGS = ['-pg']
|
|||||||
BF_PROFILE = False
|
BF_PROFILE = False
|
||||||
|
|
||||||
BF_DEBUG = False
|
BF_DEBUG = False
|
||||||
BF_DEBUG_CCFLAGS = ['-g']
|
BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG']
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
################### Output directories ##################
|
################### Output directories ##################
|
||||||
|
@ -204,7 +204,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g']
|
|||||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||||
|
|
||||||
BF_DEBUG = False
|
BF_DEBUG = False
|
||||||
BF_DEBUG_CCFLAGS = ['-g']
|
BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG']
|
||||||
|
|
||||||
BF_BUILDDIR = '../build/freebsd7'
|
BF_BUILDDIR = '../build/freebsd7'
|
||||||
BF_INSTALLDIR='../install/freebsd7'
|
BF_INSTALLDIR='../install/freebsd7'
|
||||||
|
@ -204,7 +204,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g']
|
|||||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||||
|
|
||||||
BF_DEBUG = False
|
BF_DEBUG = False
|
||||||
BF_DEBUG_CCFLAGS = ['-g']
|
BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG']
|
||||||
|
|
||||||
BF_BUILDDIR = '../build/freebsd8'
|
BF_BUILDDIR = '../build/freebsd8'
|
||||||
BF_INSTALLDIR='../install/freebsd8'
|
BF_INSTALLDIR='../install/freebsd8'
|
||||||
|
@ -204,7 +204,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g']
|
|||||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||||
|
|
||||||
BF_DEBUG = False
|
BF_DEBUG = False
|
||||||
BF_DEBUG_CCFLAGS = ['-g']
|
BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG']
|
||||||
|
|
||||||
BF_BUILDDIR = '../build/freebsd9'
|
BF_BUILDDIR = '../build/freebsd9'
|
||||||
BF_INSTALLDIR='../install/freebsd9'
|
BF_INSTALLDIR='../install/freebsd9'
|
||||||
|
@ -220,7 +220,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g']
|
|||||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||||
|
|
||||||
BF_DEBUG = False
|
BF_DEBUG = False
|
||||||
BF_DEBUG_CCFLAGS = ['-g']
|
BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG']
|
||||||
|
|
||||||
BF_BUILDDIR = '../build/linux2'
|
BF_BUILDDIR = '../build/linux2'
|
||||||
BF_INSTALLDIR='../install/linux2'
|
BF_INSTALLDIR='../install/linux2'
|
||||||
|
@ -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' ]
|
LLIBS = [ '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++', '-luuid', '-lole32'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread' ]
|
||||||
|
|
||||||
BF_DEBUG = False
|
BF_DEBUG = False
|
||||||
BF_DEBUG_CCFLAGS = ['-g']
|
BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG']
|
||||||
|
|
||||||
BF_PROFILE = False
|
BF_PROFILE = False
|
||||||
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||||
|
@ -147,7 +147,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g']
|
|||||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||||
|
|
||||||
BF_DEBUG = False
|
BF_DEBUG = False
|
||||||
BF_DEBUG_CCFLAGS = ['-g']
|
BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG']
|
||||||
|
|
||||||
BF_BUILDDIR='../build/openbsd3'
|
BF_BUILDDIR='../build/openbsd3'
|
||||||
BF_INSTALLDIR='../install/openbsd3'
|
BF_INSTALLDIR='../install/openbsd3'
|
||||||
|
@ -161,7 +161,7 @@ BF_PROFILE_LINKFLAGS = ['-pg']
|
|||||||
BF_PROFILE = False
|
BF_PROFILE = False
|
||||||
|
|
||||||
BF_DEBUG = False
|
BF_DEBUG = False
|
||||||
BF_DEBUG_CCFLAGS = []
|
BF_DEBUG_CCFLAGS = ['-DDEBUG']
|
||||||
|
|
||||||
BF_BUILDDIR = '../build/sunos5'
|
BF_BUILDDIR = '../build/sunos5'
|
||||||
BF_INSTALLDIR='../install/sunos5'
|
BF_INSTALLDIR='../install/sunos5'
|
||||||
|
@ -176,7 +176,7 @@ CC_WARN = [ '-Wall' ]
|
|||||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid']
|
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid']
|
||||||
|
|
||||||
BF_DEBUG = False
|
BF_DEBUG = False
|
||||||
BF_DEBUG_CCFLAGS= ['-g']
|
BF_DEBUG_CCFLAGS= ['-g', '-DDEBUG']
|
||||||
|
|
||||||
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
||||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||||
|
@ -80,7 +80,7 @@ BoolOpState BOP_performBooleanOperation(BoolOpType opType,
|
|||||||
CSG_FaceIteratorDescriptor obBFaces,
|
CSG_FaceIteratorDescriptor obBFaces,
|
||||||
CSG_VertexIteratorDescriptor obBVertices)
|
CSG_VertexIteratorDescriptor obBVertices)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "BEGIN BOP_performBooleanOperation" << endl;
|
cout << "BEGIN BOP_performBooleanOperation" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ BoolOpState BOP_performBooleanOperation(BoolOpType opType,
|
|||||||
// Invert the output mesh if is required
|
// Invert the output mesh if is required
|
||||||
*outputMesh = BOP_exportMesh(&meshC, invertMeshC);
|
*outputMesh = BOP_exportMesh(&meshC, invertMeshC);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "END BOP_performBooleanOperation" << endl;
|
cout << "END BOP_performBooleanOperation" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC,
|
|||||||
bool invertMeshA,
|
bool invertMeshA,
|
||||||
bool invertMeshB)
|
bool invertMeshB)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
BOP_Chrono chrono;
|
BOP_Chrono chrono;
|
||||||
float t = 0.0f;
|
float t = 0.0f;
|
||||||
float c = 0.0f;
|
float c = 0.0f;
|
||||||
@ -156,7 +156,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC,
|
|||||||
BOP_BSPTree bspB;
|
BOP_BSPTree bspB;
|
||||||
bspB.addMesh(meshC, *facesB);
|
bspB.addMesh(meshC, *facesB);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
c = chrono.stamp(); t += c;
|
c = chrono.stamp(); t += c;
|
||||||
cout << "Create BSP " << c << endl;
|
cout << "Create BSP " << c << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -172,7 +172,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC,
|
|||||||
if ((0.25*facesB->size()) > bspA.getDeep())
|
if ((0.25*facesB->size()) > bspA.getDeep())
|
||||||
BOP_meshFilter(meshC, facesB, &bspA);
|
BOP_meshFilter(meshC, facesB, &bspA);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
c = chrono.stamp(); t += c;
|
c = chrono.stamp(); t += c;
|
||||||
cout << "mesh Filter " << c << endl;
|
cout << "mesh Filter " << c << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -180,7 +180,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC,
|
|||||||
// Face 2 Face
|
// Face 2 Face
|
||||||
BOP_Face2Face(meshC,facesA,facesB);
|
BOP_Face2Face(meshC,facesA,facesB);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
c = chrono.stamp(); t += c;
|
c = chrono.stamp(); t += c;
|
||||||
cout << "Face2Face " << c << endl;
|
cout << "Face2Face " << c << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -189,7 +189,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC,
|
|||||||
BOP_meshClassify(meshC,facesA,&bspB);
|
BOP_meshClassify(meshC,facesA,&bspB);
|
||||||
BOP_meshClassify(meshC,facesB,&bspA);
|
BOP_meshClassify(meshC,facesB,&bspA);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
c = chrono.stamp(); t += c;
|
c = chrono.stamp(); t += c;
|
||||||
cout << "Classification " << c << endl;
|
cout << "Classification " << c << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -197,7 +197,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC,
|
|||||||
// Process overlapped faces
|
// Process overlapped faces
|
||||||
BOP_removeOverlappedFaces(meshC,facesA,facesB);
|
BOP_removeOverlappedFaces(meshC,facesA,facesB);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
c = chrono.stamp(); t += c;
|
c = chrono.stamp(); t += c;
|
||||||
cout << "Remove overlap " << c << endl;
|
cout << "Remove overlap " << c << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -205,7 +205,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC,
|
|||||||
// Sew two meshes
|
// Sew two meshes
|
||||||
BOP_sew(meshC,facesA,facesB);
|
BOP_sew(meshC,facesA,facesB);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
c = chrono.stamp(); t += c;
|
c = chrono.stamp(); t += c;
|
||||||
cout << "Sew " << c << endl;
|
cout << "Sew " << c << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -238,7 +238,7 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC,
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
c = chrono.stamp(); t += c;
|
c = chrono.stamp(); t += c;
|
||||||
cout << "Merge faces " << c << endl;
|
cout << "Merge faces " << c << endl;
|
||||||
cout << "Total " << t << endl;
|
cout << "Total " << t << endl;
|
||||||
|
@ -70,7 +70,7 @@ void dumpmesh ( BOP_Mesh *m, bool force )
|
|||||||
}
|
}
|
||||||
if( nonmanifold )
|
if( nonmanifold )
|
||||||
cout << nonmanifold << " edges detected" << endl;
|
cout << nonmanifold << " edges detected" << endl;
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "---------------------------" << endl;
|
cout << "---------------------------" << endl;
|
||||||
|
|
||||||
BOP_Edges edges = m->getEdges();
|
BOP_Edges edges = m->getEdges();
|
||||||
@ -130,7 +130,7 @@ void BOP_Merge2::mergeFaces(BOP_Mesh *m, BOP_Index v)
|
|||||||
{
|
{
|
||||||
m_mesh = m;
|
m_mesh = m;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "##############################" << endl;
|
cout << "##############################" << endl;
|
||||||
#endif
|
#endif
|
||||||
cleanup( );
|
cleanup( );
|
||||||
@ -147,7 +147,7 @@ void BOP_Merge2::mergeFaces(BOP_Mesh *m, BOP_Index v)
|
|||||||
// ... and merge new faces
|
// ... and merge new faces
|
||||||
if( cont ) cont = mergeFaces();
|
if( cont ) cont = mergeFaces();
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "called mergeFaces " << cont << endl;
|
cout << "called mergeFaces " << cont << endl;
|
||||||
#endif
|
#endif
|
||||||
// ... until the merge is not succesful
|
// ... until the merge is not succesful
|
||||||
@ -186,7 +186,7 @@ void clean_nonmanifold( BOP_Mesh *m )
|
|||||||
unsigned short facecount = 0;
|
unsigned short facecount = 0;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
BOP_Indexs vertList;
|
BOP_Indexs vertList;
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " first edge is " << (*it) << endl;
|
cout << " first edge is " << (*it) << endl;
|
||||||
#endif
|
#endif
|
||||||
vertList.push_back(first);
|
vertList.push_back(first);
|
||||||
@ -214,7 +214,7 @@ void clean_nonmanifold( BOP_Mesh *m )
|
|||||||
edge = NULL;
|
edge = NULL;
|
||||||
}
|
}
|
||||||
if( !edge ) break;
|
if( !edge ) break;
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " next edge is " << edge << endl;
|
cout << " next edge is " << edge << endl;
|
||||||
#endif
|
#endif
|
||||||
tmpface = m->getFace(edge->getFaces().front());
|
tmpface = m->getFace(edge->getFaces().front());
|
||||||
@ -231,7 +231,7 @@ void clean_nonmanifold( BOP_Mesh *m )
|
|||||||
}
|
}
|
||||||
if(found) {
|
if(found) {
|
||||||
edge = *it;
|
edge = *it;
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " --> found a loop" << endl;
|
cout << " --> found a loop" << endl;
|
||||||
#endif
|
#endif
|
||||||
if( vertList.size() == 3 ) {
|
if( vertList.size() == 3 ) {
|
||||||
@ -241,7 +241,7 @@ void clean_nonmanifold( BOP_Mesh *m )
|
|||||||
BOP_Face4 *face = (BOP_Face4 *)m->getFace(edge->getFaces().front());
|
BOP_Face4 *face = (BOP_Face4 *)m->getFace(edge->getFaces().front());
|
||||||
face->getNeighbours(first,last,next,last);
|
face->getNeighbours(first,last,next,last);
|
||||||
} else {
|
} else {
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "loop has " << vertList.size() << "verts";
|
cout << "loop has " << vertList.size() << "verts";
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
@ -253,7 +253,7 @@ void clean_nonmanifold( BOP_Mesh *m )
|
|||||||
BOP_Face3 *f = new BOP_Face3(next,first,last,
|
BOP_Face3 *f = new BOP_Face3(next,first,last,
|
||||||
oface1->getPlane(),oface1->getOriginalFace());
|
oface1->getPlane(),oface1->getOriginalFace());
|
||||||
m->addFace( f );
|
m->addFace( f );
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " face is backward: " << f << endl;
|
cout << " face is backward: " << f << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ void clean_nonmanifold( BOP_Mesh *m )
|
|||||||
BOP_Face3 *f = new BOP_Face3(last,first,next,
|
BOP_Face3 *f = new BOP_Face3(last,first,next,
|
||||||
oface1->getPlane(),oface1->getOriginalFace());
|
oface1->getPlane(),oface1->getOriginalFace());
|
||||||
m->addFace( f );
|
m->addFace( f );
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " face is forward: " << f << endl;
|
cout << " face is forward: " << f << endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -366,7 +366,7 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices)
|
|||||||
BOP_LFaces facesByOriginalFace;
|
BOP_LFaces facesByOriginalFace;
|
||||||
BOP_Index v = mergeVertices[i];
|
BOP_Index v = mergeVertices[i];
|
||||||
BOP_Vertex *vert = m_mesh->getVertex(v);
|
BOP_Vertex *vert = m_mesh->getVertex(v);
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "i = " << i << ", v = " << v << ", vert = " << vert << endl;
|
cout << "i = " << i << ", v = " << v << ", vert = " << vert << endl;
|
||||||
if (v==48)
|
if (v==48)
|
||||||
cout << "found vert 48" << endl;
|
cout << "found vert 48" << endl;
|
||||||
@ -381,7 +381,7 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices)
|
|||||||
vert->setTAG(BROKEN);
|
vert->setTAG(BROKEN);
|
||||||
break;
|
break;
|
||||||
case 2: {
|
case 2: {
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "size of fBOF = " << facesByOriginalFace.size() << endl;
|
cout << "size of fBOF = " << facesByOriginalFace.size() << endl;
|
||||||
#endif
|
#endif
|
||||||
BOP_Faces ff = facesByOriginalFace.front();
|
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
|
// look for two edges adjacent to v which contain both ofaces
|
||||||
BOP_Indexs edges = vert->getEdges();
|
BOP_Indexs edges = vert->getEdges();
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " ff has " << ff.size() << " faces" << endl;
|
cout << " ff has " << ff.size() << " faces" << endl;
|
||||||
cout << " fb has " << fb.size() << " faces" << endl;
|
cout << " fb has " << fb.size() << " faces" << endl;
|
||||||
cout << " v has " << edges.size() << " edges" << endl;
|
cout << " v has " << edges.size() << " edges" << endl;
|
||||||
@ -400,14 +400,14 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices)
|
|||||||
++it ) {
|
++it ) {
|
||||||
BOP_Edge *edge = m_mesh->getEdge(*it);
|
BOP_Edge *edge = m_mesh->getEdge(*it);
|
||||||
BOP_Indexs faces = edge->getFaces();
|
BOP_Indexs faces = edge->getFaces();
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " " << edge << " has " << edge->getFaces().size() << " faces" << endl;
|
cout << " " << edge << " has " << edge->getFaces().size() << " faces" << endl;
|
||||||
#endif
|
#endif
|
||||||
if( faces.size() == 2 ) {
|
if( faces.size() == 2 ) {
|
||||||
BOP_Face *f0 = m_mesh->getFace(faces[0]);
|
BOP_Face *f0 = m_mesh->getFace(faces[0]);
|
||||||
BOP_Face *f1 = m_mesh->getFace(faces[1]);
|
BOP_Face *f1 = m_mesh->getFace(faces[1]);
|
||||||
if( f0->getOriginalFace() != f1->getOriginalFace() ) {
|
if( f0->getOriginalFace() != f1->getOriginalFace() ) {
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " " << f0 << endl;
|
cout << " " << f0 << endl;
|
||||||
cout << " " << f1 << endl;
|
cout << " " << f1 << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -416,14 +416,14 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ecount == 2) {
|
if(ecount == 2) {
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " edge indexes are " << eindexs[0];
|
cout << " edge indexes are " << eindexs[0];
|
||||||
cout << " and " << eindexs[1] << endl;
|
cout << " and " << eindexs[1] << endl;
|
||||||
#endif
|
#endif
|
||||||
BOP_Edge *edge = m_mesh->getEdge(eindexs[0]);
|
BOP_Edge *edge = m_mesh->getEdge(eindexs[0]);
|
||||||
BOP_Index N = edge->getVertex1();
|
BOP_Index N = edge->getVertex1();
|
||||||
if(N == v) N = edge->getVertex2();
|
if(N == v) N = edge->getVertex2();
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " ## OK, replace "<<v<<" with "<<N << endl;
|
cout << " ## OK, replace "<<v<<" with "<<N << endl;
|
||||||
#endif
|
#endif
|
||||||
mergeVertex(ff , v, N );
|
mergeVertex(ff , v, N );
|
||||||
@ -437,7 +437,7 @@ bool BOP_Merge2::mergeFaces(BOP_Indexs &mergeVertices)
|
|||||||
}
|
}
|
||||||
didMerge = true;
|
didMerge = true;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
else {
|
else {
|
||||||
cout << " HUH: ecount was " << ecount << endl;
|
cout << " HUH: ecount was " << ecount << endl;
|
||||||
}
|
}
|
||||||
@ -461,7 +461,7 @@ void BOP_Merge2::mergeVertex(BOP_Faces &faces, BOP_Index v1, BOP_Index v2)
|
|||||||
else
|
else
|
||||||
mergeVertex((BOP_Face4 *) *face, v1, v2);
|
mergeVertex((BOP_Face4 *) *face, v1, v2);
|
||||||
(*face)->setTAG(BROKEN);
|
(*face)->setTAG(BROKEN);
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << " breaking " << (*face) << endl;
|
cout << " breaking " << (*face) << endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -506,7 +506,7 @@ void BOP_Merge2::mergeVertex(BOP_Face3 *face, BOP_Index v1, BOP_Index v2)
|
|||||||
if( prev != v2 && next != v2 ) {
|
if( prev != v2 && next != v2 ) {
|
||||||
m_mesh->addFace( new BOP_Face3(prev,v2,next,
|
m_mesh->addFace( new BOP_Face3(prev,v2,next,
|
||||||
face->getPlane(),face->getOriginalFace()) );
|
face->getPlane(),face->getOriginalFace()) );
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "mv3: add " << prev << "," << v2 << "," << next << endl;
|
cout << "mv3: add " << prev << "," << v2 << "," << next << endl;
|
||||||
} else {
|
} else {
|
||||||
cout << "mv3: vertex already in tri: doing nothing" << endl;
|
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 ) {
|
if( prev == v2 || next == v2 ) {
|
||||||
m_mesh->addFace( new BOP_Face3(prev,next,opp,
|
m_mesh->addFace( new BOP_Face3(prev,next,opp,
|
||||||
face->getPlane(),face->getOriginalFace()) );
|
face->getPlane(),face->getOriginalFace()) );
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "mv4a: add " << prev << "," << next << "," << opp << endl;
|
cout << "mv4a: add " << prev << "," << next << "," << opp << endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -532,7 +532,7 @@ void BOP_Merge2::mergeVertex(BOP_Face4 *face, BOP_Index v1, BOP_Index v2)
|
|||||||
else {
|
else {
|
||||||
m_mesh->addFace( new BOP_Face4(prev,v2,next,opp,
|
m_mesh->addFace( new BOP_Face4(prev,v2,next,opp,
|
||||||
face->getPlane(),face->getOriginalFace()) );
|
face->getPlane(),face->getOriginalFace()) );
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "mv4b: add "<<prev<<","<<v2<<","<<next<<","<<opp<<endl;
|
cout << "mv4b: add "<<prev<<","<<v2<<","<<next<<","<<opp<<endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -570,7 +570,7 @@ bool BOP_Merge2::createQuads()
|
|||||||
// Set triangles to BROKEN
|
// Set triangles to BROKEN
|
||||||
deleteFace(m_mesh, *faceI);
|
deleteFace(m_mesh, *faceI);
|
||||||
deleteFace(m_mesh, *faceJ);
|
deleteFace(m_mesh, *faceJ);
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "createQuad: del " << *faceI << endl;
|
cout << "createQuad: del " << *faceI << endl;
|
||||||
cout << "createQuad: del " << *faceJ << endl;
|
cout << "createQuad: del " << *faceJ << endl;
|
||||||
cout << "createQuad: add " << faceK << endl;
|
cout << "createQuad: add " << faceK << endl;
|
||||||
@ -602,7 +602,7 @@ bool BOP_Merge2::createQuads()
|
|||||||
// Set triangles to BROKEN
|
// Set triangles to BROKEN
|
||||||
deleteFace(m_mesh, *faceI);
|
deleteFace(m_mesh, *faceI);
|
||||||
deleteFace(m_mesh, *faceJ);
|
deleteFace(m_mesh, *faceJ);
|
||||||
#ifdef DEBUG
|
#ifdef BOP_DEBUG
|
||||||
cout << "createQuad: del " << *faceI << endl;
|
cout << "createQuad: del " << *faceI << endl;
|
||||||
cout << "createQuad: del " << *faceJ << endl;
|
cout << "createQuad: del " << *faceJ << endl;
|
||||||
cout << "createQuad: add " << faceK << endl;
|
cout << "createQuad: add " << faceK << endl;
|
||||||
|
@ -228,7 +228,7 @@ extern void check_tempv(int, float *);
|
|||||||
extern int print_int_vec(char *what, int n, int *vec);
|
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 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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1708,7 +1708,7 @@ void object_apply_mat4(Object *ob, float mat[][4])
|
|||||||
/* rotation */
|
/* rotation */
|
||||||
copy_m3_m4(mat3, mat);
|
copy_m3_m4(mat3, mat);
|
||||||
/* so scale doesnt interfear with rotation [#24291] */
|
/* 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);
|
object_mat3_to_rot(ob, mat3_n, 0);
|
||||||
|
|
||||||
|
@ -102,9 +102,9 @@ void transpose_m3(float R[3][3]);
|
|||||||
void transpose_m4(float R[4][4]);
|
void transpose_m4(float R[4][4]);
|
||||||
|
|
||||||
void normalize_m3(float R[3][3]);
|
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(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_m3(float R[3][3], int axis);
|
||||||
void orthogonalize_m4(float R[4][4], int axis);
|
void orthogonalize_m4(float R[4][4], int axis);
|
||||||
|
@ -750,7 +750,7 @@ void normalize_m3(float mat[][3])
|
|||||||
normalize_v3(mat[2]);
|
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[0], mat[0]);
|
||||||
normalize_v3_v3(rmat[1], mat[1]);
|
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;
|
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;
|
float len;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user