[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53381] branches/soc-2008-mxcurioni/source /blender/freestyle/intern: Another mega (literally :p) code clean-up patch by Bastien Montagne, thanks again!
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Fri Dec 28 21:21:08 CET 2012
Revision: 53381
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53381
Author: kjym3
Date: 2012-12-28 20:21:05 +0000 (Fri, 28 Dec 2012)
Log Message:
-----------
Another mega (literally :p) code clean-up patch by Bastien Montagne, thanks again!
Modified Paths:
--------------
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/DrawingStyle.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/FrsMaterial.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/LineRep.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/LineRep.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/Node.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeCamera.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeGroup.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeLight.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeLight.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeShape.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeShape.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeTransform.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/OrientedLineRep.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/Rep.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/Rep.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/SceneVisitor.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/SceneVisitor.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/TriangleRep.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/TriangleRep.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/VertexRep.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/VertexRep.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedPredicates1D.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Chain.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Chain.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/ChainingIterators.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/ChainingIterators.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/ContextFunctions.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Curve.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Curve.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/CurveIterators.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Modifiers.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Module.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Operators.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Operators.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/PSStrokeRenderer.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Predicates0D.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Predicates1D.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/QInformationMap.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Stroke.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Stroke.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeAdvancedIterators.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeIO.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeIO.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeIterators.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeLayer.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeLayer.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeRenderer.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeRenderer.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeRep.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeRep.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeShader.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeTesselator.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StyleModule.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/TextStrokeRenderer.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/BaseIterator.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/BaseObject.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/BaseObject.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Cast.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Exception.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Exception.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/FreestyleConfig.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Id.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Interpreter.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Iterator.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Iterator.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PointerSequence.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Precision.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/ProgressBar.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PseudoNoise.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PseudoNoise.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PythonInterpreter.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PythonInterpreter.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/RandGen.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/RandGen.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/RenderMonitor.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/StringUtils.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/StringUtils.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/TimeStamp.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/TimeStamp.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/TimeUtils.h
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/DrawingStyle.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/DrawingStyle.h 2012-12-28 19:26:25 UTC (rev 53380)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/DrawingStyle.h 2012-12-28 20:21:05 UTC (rev 53381)
@@ -1,82 +1,128 @@
-//
-// Filename : DrawingStyle.h
-// Author(s) : Stephane Grabli
-// Purpose : Class to define the drawing style of a node
-// Date of creation : 10/10/2002
-//
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * ***** 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_DRAWING_STYLE_H__
+#define __FREESTYLE_DRAWING_STYLE_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/scene_graph/DrawingStyle.h
+ * \ingroup freestyle
+ * \brief Class to define the drawing style of a node
+ * \author Stephane Grabli
+ * \date 10/10/2002
+ */
-#ifndef DRAWINGSTYLE_H
-# define DRAWINGSTYLE_H
-
class DrawingStyle
{
public:
- enum STYLE
- {FILLED, LINES, POINTS, INVISIBLE};
-
- inline DrawingStyle() {Style = FILLED; LineWidth = 2.f; PointSize = 2.f; LightingEnabled = true;}
- inline explicit DrawingStyle(const DrawingStyle& iBrother);
-
- virtual ~DrawingStyle() {}
+ enum STYLE {
+ FILLED,
+ LINES,
+ POINTS,
+ INVISIBLE,
+ };
- /*! operators */
- inline DrawingStyle& operator=(const DrawingStyle& ds);
-
- inline void setStyle(const STYLE iStyle) {Style = iStyle;}
- inline void setLineWidth(const float iLineWidth) {LineWidth = iLineWidth;}
- inline void setPointSize(const float iPointSize) {PointSize = iPointSize;}
- inline void setLightingEnabled(const bool on) {LightingEnabled = on;}
+ inline DrawingStyle()
+ {
+ Style = FILLED;
+ LineWidth = 2.0f;
+ PointSize = 2.0f;
+ LightingEnabled = true;
+ }
- inline STYLE style() const {return Style;}
- inline float lineWidth() const {return LineWidth;}
- inline float pointSize() const {return PointSize;}
- inline bool lightingEnabled() const {return LightingEnabled;}
+ inline explicit DrawingStyle(const DrawingStyle& iBrother);
+ virtual ~DrawingStyle() {}
+
+ /*! operators */
+ inline DrawingStyle& operator=(const DrawingStyle& ds);
+
+ inline void setStyle(const STYLE iStyle)
+ {
+ Style = iStyle;
+ }
+
+ inline void setLineWidth(const float iLineWidth)
+ {
+ LineWidth = iLineWidth;
+ }
+
+ inline void setPointSize(const float iPointSize)
+ {
+ PointSize = iPointSize;
+ }
+
+ inline void setLightingEnabled(const bool on)
+ {
+ LightingEnabled = on;
+ }
+
+ inline STYLE style() const
+ {
+ return Style;
+ }
+
+ inline float lineWidth() const
+ {
+ return LineWidth;
+ }
+
+ inline float pointSize() const
+ {
+ return PointSize;
+ }
+
+ inline bool lightingEnabled() const
+ {
+ return LightingEnabled;
+ }
+
private:
- STYLE Style;
- float LineWidth;
- float PointSize;
- bool LightingEnabled;
+ STYLE Style;
+ float LineWidth;
+ float PointSize;
+ bool LightingEnabled;
};
DrawingStyle::DrawingStyle(const DrawingStyle& iBrother)
{
- Style = iBrother.Style;
- LineWidth = iBrother.LineWidth;
- PointSize = iBrother.PointSize;
- LightingEnabled = iBrother.LightingEnabled;
+ Style = iBrother.Style;
+ LineWidth = iBrother.LineWidth;
+ PointSize = iBrother.PointSize;
+ LightingEnabled = iBrother.LightingEnabled;
}
DrawingStyle& DrawingStyle::operator=(const DrawingStyle& ds)
{
- Style = ds.Style;
- LineWidth = ds.LineWidth;
- PointSize = ds.PointSize;
- LightingEnabled = ds.LightingEnabled;
+ Style = ds.Style;
+ LineWidth = ds.LineWidth;
+ PointSize = ds.PointSize;
+ LightingEnabled = ds.LightingEnabled;
- return *this;
+ return *this;
}
-#endif // DRAWINGSTYLE_H
+#endif // __FREESTYLE_DRAWING_STYLE_H__
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/FrsMaterial.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/FrsMaterial.h 2012-12-28 19:26:25 UTC (rev 53380)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/FrsMaterial.h 2012-12-28 20:21:05 UTC (rev 53381)
@@ -1,304 +1,379 @@
-//
-// Filename : FrsMaterial.h
-// Author(s) : Stephane Grabli
-// Purpose : Class used to handle materials.
-// Date of creation : 10/10/2002
-//
-///////////////////////////////////////////////////////////////////////////////
+/*
+ * ***** 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_MATERIAL_H__
+#define __FREESTYLE_MATERIAL_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/scene_graph/FrsMaterial.h
+ * \ingroup freestyle
+ * \brief Class used to handle materials.
+ * \author Stephane Grabli
+ * \date 10/10/2002
+ */
-#ifndef FRS_MATERIAL_H
-# define FRS_MATERIAL_H
+#include "../system/FreestyleConfig.h"
-# include "../system/FreestyleConfig.h"
-
/*! Class defining a material */
class FrsMaterial
{
public:
- /*! Default constructor */
- inline FrsMaterial();
- /*! Builds a Material from its diffuse, ambiant, specular, emissive
- * colors and a shininess coefficient.
- * \param iDiffuse
- * A 4 element float-array containing the diffuse color.
- * \param iAmbiant
- * A 4 element float-array containing the ambiant color.
- * \param iSpecular
- * A 4 element float-array containing the specular color.
- * \param iEmission
- * A 4 element float-array containing the emissive color.
- * \param iShininess
- * The shininess coefficient.
- */
- inline FrsMaterial(const float *iDiffuse,
- const float *iAmbiant,
- const float *iSpecular,
- const float *iEmission,
- const float iShininess);
+ /*! Default constructor */
+ inline FrsMaterial();
- /*! Copy constructor */
- inline FrsMaterial(const FrsMaterial& m);
- /*! Destructor */
- virtual ~FrsMaterial() {}
+ /*! Builds a Material from its diffuse, ambiant, specular, emissive colors and a shininess coefficient.
+ * \param iDiffuse
+ * A 4 element float-array containing the diffuse color.
+ * \param iAmbiant
+ * A 4 element float-array containing the ambiant color.
+ * \param iSpecular
+ * A 4 element float-array containing the specular color.
+ * \param iEmission
+ * A 4 element float-array containing the emissive color.
+ * \param iShininess
+ * The shininess coefficient.
+ */
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list