[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14773] branches/soc-2008-mxcurioni: soc-2008-mxcurioni: towards Freestyle compilation, removing Qt' s QString and QImage dependencies.

Maxime Curioni maxime.curioni at gmail.com
Sat May 10 01:06:28 CEST 2008


Revision: 14773
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14773
Author:   mxcurioni
Date:     2008-05-10 01:06:28 +0200 (Sat, 10 May 2008)

Log Message:
-----------
soc-2008-mxcurioni: towards Freestyle compilation, removing Qt's QString and QImage dependencies. Up to this commit, the following directories compile well (and without any warning): system, image, geometry, graph, winged_edge, view_map, stroke.
Modified code is commented by //soc and unused variables by //soc unused

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/config/darwin-config.py
    branches/soc-2008-mxcurioni/config/linux2-config.py
    branches/soc-2008-mxcurioni/config/linuxcross-config.py
    branches/soc-2008-mxcurioni/config/openbsd3-config.py
    branches/soc-2008-mxcurioni/config/sunos5-config.py
    branches/soc-2008-mxcurioni/config/win32-mingw-config.py
    branches/soc-2008-mxcurioni/config/win32-vc-config.py
    branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/image/GaussianFilter.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/image/ImagePyramid.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/MaxFileLoader.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/ChainingIterators.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Operators.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Stroke.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeRep.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Interpreter.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PseudoNoise.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/StringUtils.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Interface0D.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Interface1D.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Silhouette.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WEdge.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WSFillGrid.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WXEdge.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp

Modified: branches/soc-2008-mxcurioni/config/darwin-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/darwin-config.py	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/config/darwin-config.py	2008-05-09 23:06:28 UTC (rev 14773)
@@ -168,7 +168,7 @@
 BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
 BF_LIB3DS_LIB = 'extern_lib3ds'
 BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
-BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+BF_LIB3DS_INC = '${BF_LIB3DS}'
 
 # WITH_BF_OPENEXR = 'true'
 # BF_OPENEXR = '${LCGDIR}/openexr'

Modified: branches/soc-2008-mxcurioni/config/linux2-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/linux2-config.py	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/config/linux2-config.py	2008-05-09 23:06:28 UTC (rev 14773)
@@ -94,7 +94,7 @@
 BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
 BF_LIB3DS_LIB = 'extern_lib3ds'
 BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
-BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+BF_LIB3DS_INC = '${BF_LIB3DS}'
 
 #WITH_BF_NSPR = 'true'
 #BF_NSPR = $(LIBDIR)/nspr

Modified: branches/soc-2008-mxcurioni/config/linuxcross-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/linuxcross-config.py	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/config/linuxcross-config.py	2008-05-09 23:06:28 UTC (rev 14773)
@@ -14,7 +14,7 @@
 BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
 BF_LIB3DS_LIB = 'extern_lib3ds'
 BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
-BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+BF_LIB3DS_INC = '${BF_LIB3DS}'
 
 ###########################
 

Modified: branches/soc-2008-mxcurioni/config/openbsd3-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/openbsd3-config.py	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/config/openbsd3-config.py	2008-05-09 23:06:28 UTC (rev 14773)
@@ -88,7 +88,7 @@
 BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
 BF_LIB3DS_LIB = 'extern_lib3ds'
 BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
-BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+BF_LIB3DS_INC = '${BF_LIB3DS}'
 
 #WITH_BF_NSPR = 'true'
 #BF_NSPR = $(LIBDIR)/nspr

Modified: branches/soc-2008-mxcurioni/config/sunos5-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/sunos5-config.py	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/config/sunos5-config.py	2008-05-09 23:06:28 UTC (rev 14773)
@@ -90,7 +90,7 @@
 BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
 BF_LIB3DS_LIB = 'extern_lib3ds'
 BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
-BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+BF_LIB3DS_INC = '${BF_LIB3DS}'
 
 #WITH_BF_NSPR = 'true'
 #BF_NSPR = $(LIBDIR)/nspr

Modified: branches/soc-2008-mxcurioni/config/win32-mingw-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/win32-mingw-config.py	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/config/win32-mingw-config.py	2008-05-09 23:06:28 UTC (rev 14773)
@@ -105,7 +105,7 @@
 BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
 BF_LIB3DS_LIB = 'extern_lib3ds'
 BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
-BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+BF_LIB3DS_INC = '${BF_LIB3DS}'
 
 #WITH_BF_NSPR = 'true'
 #BF_NSPR = $(LIBDIR)/nspr

Modified: branches/soc-2008-mxcurioni/config/win32-vc-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/win32-vc-config.py	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/config/win32-vc-config.py	2008-05-09 23:06:28 UTC (rev 14773)
@@ -116,7 +116,7 @@
 BF_LIB3DS = '${BF_FREESTYLE}/lib3ds'
 BF_LIB3DS_LIB = 'extern_lib3ds'
 BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs'
-BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds'
+BF_LIB3DS_INC = '${BF_LIB3DS}'
 
 #WITH_BF_NSPR = 'true'
 #BF_NSPR = $(LIBDIR)/nspr

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript	2008-05-09 23:06:28 UTC (rev 14773)
@@ -4,13 +4,61 @@
 
 sources = []
 defs = []
+incs = ''
 
-incs = '#/extern/freestyle/lib3ds #/extern/freestyle/swig'
+incs += '../blenkernel ../blenlib ../imbuf ../makesdna'
+# incs += ' #/extern/freestyle/lib3ds #/extern/freestyle/swig'
+incs += ' ' + env['BF_PYTHON_INC']
 incs += ' ' + env['BF_LIB3DS_INC']
+incs += ' ' + env['BF_PNG_INC']
 
-# env.BlenderLib (libname="bf_freestyle",
-# 				sources=sources,
-#                 includes=Split(incs),
-#                 defines=defs,
-#                 libtype=['blender'],
-#                 priority = [15] )
\ No newline at end of file
+########################################################
+#	folders sources 
+########################################################
+
+#	system
+prefix = 'intern/system'
+system_sources = env.Glob(prefix + '/*.cpp')
+
+#	image
+prefix = 'intern/image'
+image_sources = env.Glob(prefix + '/*.cpp')
+
+#	geometry
+prefix = 'intern/geometry'
+geometry_sources = env.Glob(prefix + '/*.cpp')
+
+#	scene_graph
+prefix = 'intern/scene_graph'
+scene_graph_sources = env.Glob(prefix + '/*.cpp')
+
+#	winged_edge
+prefix = 'intern/winged_edge'
+winged_edge_sources = env.Glob(prefix + '/*.cpp')
+
+#	view_map
+prefix = 'intern/view_map'
+view_map_sources = env.Glob(prefix + '/*.cpp')
+
+#	stroke
+prefix = 'intern/stroke'
+stroke_sources = env.Glob(prefix + '/*.cpp')
+
+#	rendering
+# 	app
+
+sources = 	system_sources + image_sources + geometry_sources + scene_graph_sources + \
+			winged_edge_sources + view_map_sources + stroke_sources
+#print sources
+
+env.BlenderLib (libname="bf_freestyle",
+				sources=sources,
+                includes=Split(incs),
+                defines=defs,
+                libtype=['blender'],
+                priority = [15] )
+
+########################################################
+# SWIG
+########################################################
+#	swig
\ No newline at end of file

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.cpp	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.cpp	2008-05-09 23:06:28 UTC (rev 14773)
@@ -46,7 +46,7 @@
     //first let us compute the plane equation.
     Vec3r v1(((occ)->getVertices())[0]);           
     Vec3d normal((occ)->getNormal());
-    double d = -(v1 * normal);
+    //soc unused - double d = -(v1 * normal);
 
     double tmp_u, tmp_v, tmp_t;
     if((occ)->rayIntersect(ray_org_, ray_dir_, tmp_t, tmp_u, tmp_v)){
@@ -106,7 +106,7 @@
 
   if(grid_vol == 0){
     double min=DBL_MAX;
-    int index;
+    int index=0;
     int nzeros=0;
     for(int i=0;i<3;++i){
         if(size[i] == 0){
@@ -336,7 +336,7 @@
 
   for(unsigned i = 0; i < 3; i++) {
     _current_cell[i] = (unsigned)floor((orig[i] - _orig[i]) / _cell_size[i]);
-    unsigned u = _current_cell[i];
+    //soc unused - unsigned u = _current_cell[i];
     _pt[i] = orig[i] - _orig[i] - _current_cell[i] * _cell_size[i];
   }
   //_ray_occluders.clear();
@@ -359,7 +359,7 @@
   if(box.inside(orig)){
       for(unsigned i = 0; i < 3; i++) {
           _current_cell[i] = (unsigned)floor((orig[i] - _orig[i]) / _cell_size[i]);
-          unsigned u = _current_cell[i];
+          //soc unused - unsigned u = _current_cell[i];
           _pt[i] = orig[i] - _orig[i] - _current_cell[i] * _cell_size[i];
       }
   }else{
@@ -372,7 +372,7 @@
             _current_cell[i] = (unsigned)floor((newOrig[i] - _orig[i]) / _cell_size[i]);
             if(_current_cell[i] == _cells_nb[i])
                 _current_cell[i] = _cells_nb[i] - 1;
-            unsigned u = _current_cell[i];
+            //soc unused - unsigned u = _current_cell[i];
             _pt[i] = newOrig[i] - _orig[i] - _current_cell[i] * _cell_size[i];
         }
 

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.h	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.h	2008-05-09 23:06:28 UTC (rev 14773)
@@ -81,6 +81,7 @@
 
 class GridVisitor{
 public:
+	virtual ~GridVisitor() {}; //soc
     virtual void discoverCell(Cell *cell) {}
     virtual void examineOccluder(Polygon3r *occ) {}
     virtual void finishCell(Cell *cell) {}
@@ -106,10 +107,21 @@
  * the intersection information are stored and accessible.
  */
 class firstIntersectionGridVisitor : public GridVisitor {
+
+//soc - changed order to remove warnings
 public:
+    double u_, v_, t_;
+private:
+    Polygon3r *occluder_;
+	Vec3r ray_org_, ray_dir_, cell_size_;
+    Cell * current_cell_;
+
+public:
       firstIntersectionGridVisitor(const Vec3r& ray_org, const Vec3r& ray_dir, const Vec3r& cell_size) : 
-      GridVisitor(), ray_org_(ray_org), cell_size_(cell_size),ray_dir_(ray_dir),occluder_(0),
-            u_(0),v_(0),t_(DBL_MAX),current_cell_(0){}
+		 GridVisitor(), u_(0),v_(0),t_(DBL_MAX),
+		 occluder_(0),
+		 ray_org_(ray_org), ray_dir_(ray_dir), cell_size_(cell_size),
+      	 current_cell_(0) {}
       virtual ~firstIntersectionGridVisitor() {}
 
     virtual void discoverCell(Cell *cell) {current_cell_=cell;}
@@ -117,14 +129,6 @@
     virtual bool stop();
 
     Polygon3r * occluder() {return occluder_;}
-    
-public:
-    double u_, v_, t_;
-private:
-    Polygon3r *occluder_;
-    Vec3r ray_org_, ray_dir_;
-    Vec3r cell_size_;
-    Cell * current_cell_;
 };
 
 //

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/image/GaussianFilter.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/image/GaussianFilter.h	2008-05-09 20:08:28 UTC (rev 14772)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/image/GaussianFilter.h	2008-05-09 23:06:28 UTC (rev 14773)

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list