[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53500] branches/soc-2008-mxcurioni/source /blender/freestyle/intern: Yet another big style clean-up patch by Bastien Montagne, thanks a lot!

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Wed Jan 2 02:55:30 CET 2013


Revision: 53500
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53500
Author:   kjym3
Date:     2013-01-02 01:55:30 +0000 (Wed, 02 Jan 2013)
Log Message:
-----------
Yet another big style clean-up patch by Bastien Montagne, thanks a lot!
Now the code style is acceptable for the merge now, according to Bastien.
Thanks again Bastien for having this done! :)

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/BoxGrid.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/BoxGrid.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/CulledOccluderSource.h
    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/Functions0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Functions0D.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Functions1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Functions1D.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/GridDensityProvider.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.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/OccluderSource.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/OccluderSource.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Silhouette.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Silhouette.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/SphericalGrid.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/SphericalGrid.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/SteerableViewMap.h
    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/ViewMap.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMap.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapIO.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapIterators.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/Curvature.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/Curvature.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/Nature.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WEdge.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WEdge.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WFillGrid.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WFillGrid.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.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WXEdge.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp	2013-01-02 01:49:07 UTC (rev 53499)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp	2013-01-02 01:55:30 UTC (rev 53500)
@@ -1,52 +1,58 @@
-//
-//  Filename         : ArbitraryGridDensityProvider.cpp
-//  Author(s)        : Alexander Beels
-//  Purpose          : Class to define a cell grid surrounding
-//                     the projected image of a scene
-//  Date of creation : 2011-2-5
-//
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2010 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
 
+/** \file blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp
+ *  \ingroup freestyle
+ *  \brief Class to define a cell grid surrounding the projected image of a scene
+ *  \author Alexander Beels
+ *  \date 2011-2-5
+ */
 
-//
-//  Copyright (C) : Please refer to the COPYRIGHT file distributed 
-//   with this source distribution. 
-//
-//  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.
-//
-///////////////////////////////////////////////////////////////////////////////
-
 #include "ArbitraryGridDensityProvider.h"
 
-ArbitraryGridDensityProvider::ArbitraryGridDensityProvider(OccluderSource& source, const real proscenium[4], unsigned numCells) 
-	: GridDensityProvider(source), numCells(numCells)
+ArbitraryGridDensityProvider::ArbitraryGridDensityProvider(OccluderSource& source, const real proscenium[4],
+                                                           unsigned numCells)
+: GridDensityProvider(source), numCells(numCells)
 {
 	initialize (proscenium);
 }
 
-ArbitraryGridDensityProvider::ArbitraryGridDensityProvider(OccluderSource& source, const BBox<Vec3r>& bbox, const GridHelpers::Transform& transform, unsigned numCells) 
-	: GridDensityProvider(source), numCells(numCells)
+ArbitraryGridDensityProvider::ArbitraryGridDensityProvider(OccluderSource& source, const BBox<Vec3r>& bbox,
+                                                           const GridHelpers::Transform& transform, unsigned numCells)
+: GridDensityProvider(source), numCells(numCells)
 {
 	real proscenium[4];
 	calculateQuickProscenium(transform, bbox, proscenium);
-	
+
 	initialize (proscenium);
 }
 
-ArbitraryGridDensityProvider::ArbitraryGridDensityProvider(OccluderSource& source, unsigned numCells) 
-	: GridDensityProvider(source), numCells(numCells) 
+ArbitraryGridDensityProvider::ArbitraryGridDensityProvider(OccluderSource& source, unsigned numCells)
+: GridDensityProvider(source), numCells(numCells) 
 {
 	real proscenium[4];
 	calculateOptimalProscenium(source, proscenium);
@@ -54,9 +60,9 @@
 	initialize (proscenium);
 }
 
-ArbitraryGridDensityProvider::~ArbitraryGridDensityProvider () {}
+ArbitraryGridDensityProvider::~ArbitraryGridDensityProvider() {}
 
-void ArbitraryGridDensityProvider::initialize (const real proscenium[4]) 
+void ArbitraryGridDensityProvider::initialize(const real proscenium[4])
 {
 	float prosceniumWidth = (proscenium[1] - proscenium[0]);
 	float prosceniumHeight = (proscenium[3] - proscenium[2]);
@@ -70,11 +76,11 @@
 	cout << _cellsX << "x" << _cellsY << " cells of size " << _cellSize << " square." << endl;
 
 	// Make sure the grid exceeds the proscenium by a small amount
-	float safetyZone = 0.1;
-	if ( _cellsX * _cellSize < prosceniumWidth * (1.0 + safetyZone) ) {
+	float safetyZone = 0.1f;
+	if (_cellsX * _cellSize < prosceniumWidth * (1.0 + safetyZone)) {
 		_cellsX = prosceniumWidth * (1.0 + safetyZone) / _cellSize;
 	}
-	if ( _cellsY * _cellSize < prosceniumHeight * (1.0 + safetyZone) ) {
+	if (_cellsY * _cellSize < prosceniumHeight * (1.0 + safetyZone)) {
 		_cellsY = prosceniumHeight * (1.0 + safetyZone) / _cellSize;
 	}
 	cout << _cellsX << "x" << _cellsY << " cells of size " << _cellSize << " square." << endl;
@@ -85,24 +91,26 @@
 }
 
 ArbitraryGridDensityProviderFactory::ArbitraryGridDensityProviderFactory(unsigned numCells)
-	: numCells(numCells)
+: numCells(numCells)
 {
 }
 
-ArbitraryGridDensityProviderFactory::~ArbitraryGridDensityProviderFactory () {}
+ArbitraryGridDensityProviderFactory::~ArbitraryGridDensityProviderFactory() {}
 
-auto_ptr<GridDensityProvider> ArbitraryGridDensityProviderFactory::newGridDensityProvider(OccluderSource& source, const real proscenium[4]) 
+auto_ptr<GridDensityProvider> ArbitraryGridDensityProviderFactory::newGridDensityProvider(OccluderSource& source,
+                                                                                          const real proscenium[4])
 {
 	return auto_ptr<GridDensityProvider>(new ArbitraryGridDensityProvider(source, proscenium, numCells));
 }
 
-auto_ptr<GridDensityProvider> ArbitraryGridDensityProviderFactory::newGridDensityProvider(OccluderSource& source, const BBox<Vec3r>& bbox, const GridHelpers::Transform& transform) 
+auto_ptr<GridDensityProvider>
+ArbitraryGridDensityProviderFactory::newGridDensityProvider(OccluderSource& source, const BBox<Vec3r>& bbox,
+                                                            const GridHelpers::Transform& transform)
 {
 	return auto_ptr<GridDensityProvider>(new ArbitraryGridDensityProvider(source, bbox, transform, numCells));
 }
 
-auto_ptr<GridDensityProvider> ArbitraryGridDensityProviderFactory::newGridDensityProvider(OccluderSource& source) 
+auto_ptr<GridDensityProvider> ArbitraryGridDensityProviderFactory::newGridDensityProvider(OccluderSource& source)
 {
 	return auto_ptr<GridDensityProvider>(new ArbitraryGridDensityProvider(source, numCells));
 }
-

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h	2013-01-02 01:49:07 UTC (rev 53499)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h	2013-01-02 01:55:30 UTC (rev 53500)
@@ -1,48 +1,54 @@
-//
-//  Filename         : ArbitraryGridDensityProvider.h
-//  Author(s)        : Alexander Beels
-//  Purpose          : Class to define a cell grid surrounding
-//                     the projected image of a scene
-//  Date of creation : 2011-2-5
-//
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2010 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
 
+#ifndef __FREESTYLE_ARBITRARY_GRID_DENSITY_PROVIDER_H__
+#define __FREESTYLE_ARBITRARY_GRID_DENSITY_PROVIDER_H__
 
-//
-//  Copyright (C) : Please refer to the COPYRIGHT file distributed 
-//   with this source distribution. 
-//
-//  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.
-//
-///////////////////////////////////////////////////////////////////////////////
+/** \file blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h
+ *  \ingroup freestyle
+ *  \brief Class to define a cell grid surrounding the projected image of a scene

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list