[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15932] branches/apricot: apricot branch: svn merge -r15868:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Brecht Van Lommel brechtvanlommel at pandora.be
Sun Aug 3 16:46:35 CEST 2008


Revision: 15932
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15932
Author:   blendix
Date:     2008-08-03 16:46:34 +0200 (Sun, 03 Aug 2008)

Log Message:
-----------
apricot branch: svn merge -r15868:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/apricot/bin/.blender/.Blanguages
    branches/apricot/intern/boolop/SConscript
    branches/apricot/intern/boolop/intern/BOP_Edge.cpp
    branches/apricot/intern/boolop/intern/BOP_Edge.h
    branches/apricot/intern/boolop/intern/BOP_Face.cpp
    branches/apricot/intern/boolop/intern/BOP_Face.h
    branches/apricot/intern/boolop/intern/BOP_Interface.cpp
    branches/apricot/intern/boolop/intern/BOP_Merge.cpp
    branches/apricot/intern/boolop/intern/BOP_Merge.h
    branches/apricot/intern/boolop/intern/BOP_Mesh.cpp
    branches/apricot/intern/boolop/intern/BOP_Mesh.h
    branches/apricot/intern/boolop/intern/BOP_Tag.h
    branches/apricot/intern/boolop/intern/BOP_Vertex.cpp
    branches/apricot/intern/boolop/intern/BOP_Vertex.h
    branches/apricot/intern/bsp/SConscript
    branches/apricot/projectfiles_vc7/gameengine/blenderhook/KX_blenderhook.vcproj
    branches/apricot/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj
    branches/apricot/projectfiles_vc7/gameengine/physics/PHY_Physics/PHY_Sumo/PHY_Sumo.vcproj
    branches/apricot/release/scripts/bpymodules/colladaImEx/collada.py
    branches/apricot/release/scripts/bpymodules/colladaImEx/translator.py
    branches/apricot/release/scripts/bpymodules/colladaImEx/xmlUtils.py
    branches/apricot/source/blender/blenkernel/BKE_texture.h
    branches/apricot/source/blender/blenkernel/intern/collision.c
    branches/apricot/source/blender/blenkernel/intern/texture.c
    branches/apricot/source/blender/blenlib/intern/BLI_kdopbvh.c
    branches/apricot/source/blender/blenlib/intern/boxpack2d.c
    branches/apricot/source/blender/blenloader/intern/writefile.c
    branches/apricot/source/blender/include/BDR_gpencil.h
    branches/apricot/source/blender/include/BIF_editview.h
    branches/apricot/source/blender/makesdna/DNA_gpencil_types.h
    branches/apricot/source/blender/src/buttons_logic.c
    branches/apricot/source/blender/src/drawgpencil.c
    branches/apricot/source/blender/src/editimasel.c
    branches/apricot/source/blender/src/editipo.c
    branches/apricot/source/blender/src/editobject.c
    branches/apricot/source/blender/src/editview.c
    branches/apricot/source/blender/src/gpencil.c
    branches/apricot/source/blender/src/header_info.c
    branches/apricot/source/blender/src/header_ipo.c
    branches/apricot/source/blender/src/header_view3d.c
    branches/apricot/source/blender/src/meshlaplacian.c
    branches/apricot/source/blender/src/space.c
    branches/apricot/source/blender/src/toolbox.c
    branches/apricot/source/gameengine/Converter/BL_ActionActuator.cpp
    branches/apricot/source/gameengine/Converter/BL_ArmatureObject.cpp
    branches/apricot/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    branches/apricot/source/gameengine/Converter/KX_ConvertSensors.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_ActuatorEventManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_ActuatorEventManager.h
    branches/apricot/source/gameengine/GameLogic/SCA_AlwaysEventManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_AlwaysEventManager.h
    branches/apricot/source/gameengine/GameLogic/SCA_EventManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_EventManager.h
    branches/apricot/source/gameengine/GameLogic/SCA_IObject.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_ISensor.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_ISensor.h
    branches/apricot/source/gameengine/GameLogic/SCA_JoystickManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_JoystickManager.h
    branches/apricot/source/gameengine/GameLogic/SCA_KeyboardManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_KeyboardManager.h
    branches/apricot/source/gameengine/GameLogic/SCA_LogicManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_MouseManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_MouseManager.h
    branches/apricot/source/gameengine/GameLogic/SCA_PropertyEventManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_PropertyEventManager.h
    branches/apricot/source/gameengine/GameLogic/SCA_RandomEventManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_RandomEventManager.h
    branches/apricot/source/gameengine/GameLogic/SCA_TimeEventManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_TimeEventManager.h
    branches/apricot/source/gameengine/GamePlayer/common/windows/GPW_Canvas.h
    branches/apricot/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp
    branches/apricot/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.h
    branches/apricot/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/apricot/source/gameengine/Ketsji/KX_NearSensor.cpp
    branches/apricot/source/gameengine/Ketsji/KX_NearSensor.h
    branches/apricot/source/gameengine/Ketsji/KX_RayEventManager.cpp
    branches/apricot/source/gameengine/Ketsji/KX_RayEventManager.h
    branches/apricot/source/gameengine/Ketsji/KX_Scene.cpp
    branches/apricot/source/gameengine/Ketsji/KX_TouchEventManager.cpp
    branches/apricot/source/gameengine/Ketsji/KX_TouchEventManager.h
    branches/apricot/source/gameengine/Ketsji/KX_TouchSensor.cpp
    branches/apricot/source/gameengine/Ketsji/KX_TouchSensor.h
    branches/apricot/source/gameengine/Ketsji/KX_TrackToActuator.cpp
    branches/apricot/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.h
    branches/apricot/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
    branches/apricot/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
    branches/apricot/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
    branches/apricot/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Scene.cpp
    branches/apricot/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp
    branches/apricot/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h
    branches/apricot/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
    branches/apricot/source/gameengine/Rasterizer/RAS_CameraData.h
    branches/apricot/source/gameengine/Rasterizer/RAS_MeshObject.cpp

Added Paths:
-----------
    branches/apricot/bin/.blender/locale/kr/
    branches/apricot/bin/.blender/locale/kr/LC_MESSAGES/
    branches/apricot/bin/.blender/locale/kr/LC_MESSAGES/blender.mo
    branches/apricot/intern/boolop/intern/BOP_Merge2.cpp
    branches/apricot/intern/boolop/intern/BOP_Merge2.h
    branches/apricot/intern/boolop/intern/BOP_Misc.h
    branches/apricot/po/kr.po

Removed Paths:
-------------
    branches/apricot/bin/.blender/locale/kr/LC_MESSAGES/
    branches/apricot/bin/.blender/locale/kr/LC_MESSAGES/blender.mo

Modified: branches/apricot/bin/.blender/.Blanguages
===================================================================
--- branches/apricot/bin/.blender/.Blanguages	2008-08-03 11:55:45 UTC (rev 15931)
+++ branches/apricot/bin/.blender/.Blanguages	2008-08-03 14:46:34 UTC (rev 15932)
@@ -20,3 +20,4 @@
 Arabic:ar
 Bulgarian:bg
 Greek:el
+Korean:kr

Copied: branches/apricot/bin/.blender/locale/kr (from rev 15931, trunk/blender/bin/.blender/locale/kr)

Copied: branches/apricot/bin/.blender/locale/kr/LC_MESSAGES (from rev 15931, trunk/blender/bin/.blender/locale/kr/LC_MESSAGES)

Deleted: branches/apricot/bin/.blender/locale/kr/LC_MESSAGES/blender.mo
===================================================================
(Binary files differ)

Copied: branches/apricot/bin/.blender/locale/kr/LC_MESSAGES/blender.mo (from rev 15931, trunk/blender/bin/.blender/locale/kr/LC_MESSAGES/blender.mo)
===================================================================
(Binary files differ)

Modified: branches/apricot/intern/boolop/SConscript
===================================================================
--- branches/apricot/intern/boolop/SConscript	2008-08-03 11:55:45 UTC (rev 15931)
+++ branches/apricot/intern/boolop/SConscript	2008-08-03 14:46:34 UTC (rev 15932)
@@ -8,7 +8,7 @@
 incs += ' ../../source/blender/blenlib'
 
 if (env['OURPLATFORM'] == 'win32-mingw'):
-    env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype=['common','intern'], priority = [5,50] )
+    env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype=['common','intern'], priority = [30,85] )
 else:
     env.BlenderLib ('blender_bop', sources, Split(incs) , [], libtype='common', priority = 5 )
 

Modified: branches/apricot/intern/boolop/intern/BOP_Edge.cpp
===================================================================
--- branches/apricot/intern/boolop/intern/BOP_Edge.cpp	2008-08-03 11:55:45 UTC (rev 15931)
+++ branches/apricot/intern/boolop/intern/BOP_Edge.cpp	2008-08-03 14:46:34 UTC (rev 15932)
@@ -75,4 +75,47 @@
 	else if (m_vertexs[1] == oldIndex) m_vertexs[1] = newIndex;
 }
 
+#ifdef BOP_NEW_MERGE
 
+/**
+ * Returns if this edge contains the specified face index.
+ * @param i face index
+ * @return true if this edge contains the specified face index, false otherwise
+ */
+bool BOP_Edge::removeFace(BOP_Index i)
+{
+	int pos=0;
+	for(BOP_IT_Indexs it = m_faces.begin();it!=m_faces.end();pos++,it++) {
+		if ((*it) == i) {
+			m_faces.erase(it);
+			return true;
+		}
+	}
+	
+	return false;
+}
+
+#endif
+
+#ifdef BOP_DEBUG
+
+#include <iostream>
+using namespace std;
+
+/**
+ * Implements operator <<.
+ */
+ostream &operator<<(ostream &stream, BOP_Edge *e)
+{
+	stream << "Edge[" << e->getVertex1() << "," << e->getVertex2();
+#ifdef BOP_NEW_MERGE
+	if(e->m_used)
+		stream << "] (used)";
+	else
+		stream << "] (unused)";
+#endif
+	return stream;
+}
+#endif
+
+

Modified: branches/apricot/intern/boolop/intern/BOP_Edge.h
===================================================================
--- branches/apricot/intern/boolop/intern/BOP_Edge.h	2008-08-03 11:55:45 UTC (rev 15931)
+++ branches/apricot/intern/boolop/intern/BOP_Edge.h	2008-08-03 14:46:34 UTC (rev 15932)
@@ -29,12 +29,16 @@
 #define BOP_EDGE_H
 
 #include "BOP_Indexs.h"
+#include "BOP_Misc.h"
 
 class BOP_Edge
 {
 private:
 	BOP_Index  m_vertexs[2];
 	BOP_Indexs m_faces;
+#ifdef BOP_NEW_MERGE
+	bool m_used;
+#endif
 
 	bool containsFace(BOP_Index i);
 
@@ -47,6 +51,15 @@
 	inline unsigned int getNumFaces(){return m_faces.size();};
 	inline BOP_Indexs &getFaces(){return m_faces;};
 	void addFace(BOP_Index face);
+#ifdef BOP_NEW_MERGE
+	bool removeFace(BOP_Index i);
+	bool getUsed() { return m_used;};
+	void setUsed(bool setting) { m_used=setting;};
+#endif
+#ifdef BOP_DEBUG
+	friend ostream &operator<<(ostream &stream, BOP_Edge *e);
+#endif
+
 };
 
 #endif

Modified: branches/apricot/intern/boolop/intern/BOP_Face.cpp
===================================================================
--- branches/apricot/intern/boolop/intern/BOP_Face.cpp	2008-08-03 11:55:45 UTC (rev 15931)
+++ branches/apricot/intern/boolop/intern/BOP_Face.cpp	2008-08-03 14:46:34 UTC (rev 15932)
@@ -402,6 +402,7 @@
 	return  true;
 }  
 
+#ifdef BOP_DEBUG
 /**
  * Implements operator <<.
  */
@@ -421,3 +422,4 @@
 
 	return stream;
 }
+#endif

Modified: branches/apricot/intern/boolop/intern/BOP_Face.h
===================================================================
--- branches/apricot/intern/boolop/intern/BOP_Face.h	2008-08-03 11:55:45 UTC (rev 15931)
+++ branches/apricot/intern/boolop/intern/BOP_Face.h	2008-08-03 14:46:34 UTC (rev 15932)
@@ -32,6 +32,7 @@
 #include "MT_Plane3.h"
 #include "BOP_Indexs.h"
 #include "BOP_BBox.h"
+#include "BOP_Misc.h"
 #include <iostream>
 #include <vector>
 using namespace std;
@@ -80,7 +81,9 @@
 	virtual void replaceVertexIndex(BOP_Index oldIndex, BOP_Index newIndex) = 0;
 	virtual bool containsVertex(BOP_Index v) = 0;
 		
+#ifdef BOP_DEBUG
 	friend ostream &operator<<(ostream &stream, BOP_Face *f);
+#endif
 };
 
 class BOP_Face3: public BOP_Face 

Modified: branches/apricot/intern/boolop/intern/BOP_Interface.cpp
===================================================================
--- branches/apricot/intern/boolop/intern/BOP_Interface.cpp	2008-08-03 11:55:45 UTC (rev 15931)
+++ branches/apricot/intern/boolop/intern/BOP_Interface.cpp	2008-08-03 14:46:34 UTC (rev 15932)
@@ -33,9 +33,12 @@
 #include "BOP_Mesh.h"
 #include "BOP_Face2Face.h"
 #include "BOP_Merge.h"
+#include "BOP_Merge2.h"
 #include "BOP_Chrono.h"
 
-//#define DEBUG
+#if defined(BOP_ORIG_MERGE) && defined(BOP_NEW_MERGE) 
+#include "../../../source/blender/blenkernel/BKE_global.h"
+#endif
 
 BoolOpState BOP_intersectionBoolOp(BOP_Mesh*  meshC,
 								   BOP_Faces* facesA,
@@ -208,8 +211,33 @@
 	#endif
 
 	// Merge faces
+#ifdef BOP_ORIG_MERGE
+#ifndef BOP_NEW_MERGE
 	BOP_Merge::getInstance().mergeFaces(meshC,numVertices);
+#endif
+#endif
 
+#ifdef BOP_NEW_MERGE
+#ifndef BOP_ORIG_MERGE
+	BOP_Merge2::getInstance().mergeFaces(meshC,numVertices);
+#else
+	static int state = -1;
+	if (G.rt == 100) {
+		if( state != 1 ) {
+			cout << "Boolean code using old merge technique." << endl;
+			state = 1;
+		}
+		BOP_Merge::getInstance().mergeFaces(meshC,numVertices);
+	} else {
+		if( state != 0 ) {
+			cout << "Boolean code using new merge technique." << endl;
+			state = 0;
+		}
+		BOP_Merge2::getInstance().mergeFaces(meshC,numVertices);
+	}
+#endif
+#endif
+
 	#ifdef DEBUG
 	c = chrono.stamp(); t += c;
 	cout << "Merge faces    " << c << endl;

Modified: branches/apricot/intern/boolop/intern/BOP_Merge.cpp
===================================================================
--- branches/apricot/intern/boolop/intern/BOP_Merge.cpp	2008-08-03 11:55:45 UTC (rev 15931)
+++ branches/apricot/intern/boolop/intern/BOP_Merge.cpp	2008-08-03 14:46:34 UTC (rev 15932)
@@ -30,6 +30,7 @@
  
 #include "BOP_Merge.h"
 
+#ifdef BOP_ORIG_MERGE
 
 #ifdef _MSC_VER
 #if _MSC_VER < 1300
@@ -802,3 +803,5 @@
 	}
 	}
 }
+
+#endif  /* BOP_ORIG_MERGE */

Modified: branches/apricot/intern/boolop/intern/BOP_Merge.h
===================================================================
--- branches/apricot/intern/boolop/intern/BOP_Merge.h	2008-08-03 11:55:45 UTC (rev 15931)
+++ branches/apricot/intern/boolop/intern/BOP_Merge.h	2008-08-03 14:46:34 UTC (rev 15932)
@@ -28,6 +28,9 @@
 #ifndef BOP_MERGE_H
 #define BOP_MERGE_H
 
+#include "BOP_Misc.h"
+
+#ifdef BOP_ORIG_MERGE
 #include "BOP_Mesh.h"
 #include "BOP_Tag.h"
 #include "BOP_MathUtils.h"
@@ -68,4 +71,6 @@
 		void mergeFaces(BOP_Mesh *m, BOP_Index v);
 };
 
+#endif	/* BOP_ORIG_MERGE */
+
 #endif

Copied: branches/apricot/intern/boolop/intern/BOP_Merge2.cpp (from rev 15931, trunk/blender/intern/boolop/intern/BOP_Merge2.cpp)
===================================================================
--- branches/apricot/intern/boolop/intern/BOP_Merge2.cpp	                        (rev 0)
+++ branches/apricot/intern/boolop/intern/BOP_Merge2.cpp	2008-08-03 14:46:34 UTC (rev 15932)
@@ -0,0 +1,944 @@
+/**
+ *
+ * $Id: BOP_Merge22.cpp 14444 2008-04-16 22:40:48Z hos $
+ *
+ * ***** 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): Marc Freixas, Ken Hughes
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+ 
+#include "BOP_Merge2.h"
+
+#ifdef BOP_NEW_MERGE
+
+static void deleteFace(BOP_Mesh *m, BOP_Face *face);
+
+/**
+ * SINGLETON (use method BOP_Merge2.getInstance).
+ */
+BOP_Merge2 BOP_Merge2::SINGLETON;
+
+#ifdef BOP_DEBUG
+void dumpmesh ( BOP_Mesh *m, bool force )
+{
+	unsigned int nonmanifold = 0;
+	{
+	BOP_Edges edges = m->getEdges();
+	int count = 0;
+    for (BOP_IT_Edges edge = edges.begin(); edge != edges.end();
+		++count, ++edge) {
+		if (!(*edge)->getUsed() && (*edge)->getFaces().size() == 0 ) continue;
+		BOP_Vertex * v1 = m->getVertex((*edge)->getVertex1());
+		BOP_Vertex * v2 = m->getVertex((*edge)->getVertex2());
+
+		if(v1->getTAG()!= BROKEN || v2->getTAG()!= BROKEN ) {
+			int fcount = 0;
+			BOP_Indexs faces = (*edge)->getFaces();
+			for (BOP_IT_Indexs face = faces.begin(); face != faces.end(); face++) {
+				BOP_Face *f = m->getFace(*face);
+				if(f->getTAG()== UNCLASSIFIED) ++fcount;
+			}
+
+
+			if(fcount !=0 && fcount !=2 ) {
+				++nonmanifold;
+			}
+		}
+	}
+	if (!force && nonmanifold == 0) return;
+	}
+	if( nonmanifold )
+		cout << nonmanifold << " edges detected" << endl;
+#ifdef DEBUG
+	cout << "---------------------------" << endl;
+
+	BOP_Edges edges = m->getEdges();
+	int count = 0;
+    for (BOP_IT_Edges edge = edges.begin(); edge != edges.end();
+		++count, ++edge) {
+		BOP_Vertex * v1 = m->getVertex((*edge)->getVertex1());
+		BOP_Vertex * v2 = m->getVertex((*edge)->getVertex2());
+

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list