Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/freestyle/intern/stroke/Stroke.h')
-rw-r--r--source/blender/freestyle/intern/stroke/Stroke.h202
1 files changed, 101 insertions, 101 deletions
diff --git a/source/blender/freestyle/intern/stroke/Stroke.h b/source/blender/freestyle/intern/stroke/Stroke.h
index 4a9ed7288c5..96a4d2d61ea 100644
--- a/source/blender/freestyle/intern/stroke/Stroke.h
+++ b/source/blender/freestyle/intern/stroke/Stroke.h
@@ -52,18 +52,18 @@ namespace Freestyle {
//
////////////////////////////////////////////////////////
-/*! Class to define an attribute associated to a Stroke Vertex.
+/** Class to define an attribute associated to a Stroke Vertex.
* This attribute stores the color, alpha and thickness values for a Stroke Vertex.
*/
class StrokeAttribute {
public:
- /*! default constructor */
+ /** default constructor */
StrokeAttribute();
- /*! Copy constructor */
+ /** Copy constructor */
StrokeAttribute(const StrokeAttribute &iBrother);
- /*! Builds a stroke vertex attribute from a set of parameters.
+ /** Builds a stroke vertex attribute from a set of parameters.
* \param iRColor:
* The Red Component value.
* \param iGColor:
@@ -84,7 +84,7 @@ class StrokeAttribute {
float iRThickness,
float iLThickness);
- /*! Interpolation constructor.
+ /** Interpolation constructor.
* Builds a StrokeAttribute from two StrokeAttributes and an interpolation parameter.
* \param a1:
* The first Attribute.
@@ -95,15 +95,15 @@ class StrokeAttribute {
*/
StrokeAttribute(const StrokeAttribute &a1, const StrokeAttribute &a2, float t);
- /*! destructor */
+ /** destructor */
virtual ~StrokeAttribute();
/* operators */
- /*! operator = */
+ /** operator = */
StrokeAttribute &operator=(const StrokeAttribute &iBrother);
/* accessors */
- /*! Returns the attribute's color.
+ /** Returns the attribute's color.
* \return The array of 3 floats containing the R,G,B values of the attribute's color.
*/
inline const float *getColor() const
@@ -111,37 +111,37 @@ class StrokeAttribute {
return _color;
}
- /*! Returns the R color component. */
+ /** Returns the R color component. */
inline const float getColorR() const
{
return _color[0];
}
- /*! Returns the G color component. */
+ /** Returns the G color component. */
inline const float getColorG() const
{
return _color[1];
}
- /*! Returns the B color component. */
+ /** Returns the B color component. */
inline const float getColorB() const
{
return _color[2];
}
- /*! Returns the RGB color components. */
+ /** Returns the RGB color components. */
inline Vec3f getColorRGB() const
{
return Vec3f(_color[0], _color[1], _color[2]);
}
- /*! Returns the alpha color component. */
+ /** Returns the alpha color component. */
inline float getAlpha() const
{
return _alpha;
}
- /*! Returns the attribute's thickness.
+ /** Returns the attribute's thickness.
* \return an array of 2 floats. the first value is the thickness on the right of the vertex
* when following the stroke, the second one is the thickness on the left.
*/
@@ -150,60 +150,60 @@ class StrokeAttribute {
return _thickness;
}
- /*! Returns the thickness on the right of the vertex when following the stroke. */
+ /** Returns the thickness on the right of the vertex when following the stroke. */
inline const float getThicknessR() const
{
return _thickness[0];
}
- /*! Returns the thickness on the left of the vertex when following the stroke. */
+ /** Returns the thickness on the left of the vertex when following the stroke. */
inline const float getThicknessL() const
{
return _thickness[1];
}
- /*! Returns the thickness on the right and on the left of the vertex when following the stroke.
+ /** Returns the thickness on the right and on the left of the vertex when following the stroke.
*/
inline Vec2f getThicknessRL() const
{
return Vec2f(_thickness[0], _thickness[1]);
}
- /*! Returns true if the strokevertex is visible, false otherwise */
+ /** Returns true if the strokevertex is visible, false otherwise */
inline bool isVisible() const
{
return _visible;
}
- /*! Returns an attribute of type real
+ /** Returns an attribute of type real
* \param iName:
* The name of the attribute
*/
float getAttributeReal(const char *iName) const;
- /*! Returns an attribute of type Vec2f
+ /** Returns an attribute of type Vec2f
* \param iName:
* The name of the attribute
*/
Vec2f getAttributeVec2f(const char *iName) const;
- /*! Returns an attribute of type Vec3f
+ /** Returns an attribute of type Vec3f
* \param iName:
* The name of the attribute
*/
Vec3f getAttributeVec3f(const char *iName) const;
- /*! Checks whether the attribute iName is available */
+ /** Checks whether the attribute iName is available */
bool isAttributeAvailableReal(const char *iName) const;
- /*! Checks whether the attribute iName is available */
+ /** Checks whether the attribute iName is available */
bool isAttributeAvailableVec2f(const char *iName) const;
- /*! Checks whether the attribute iName is available */
+ /** Checks whether the attribute iName is available */
bool isAttributeAvailableVec3f(const char *iName) const;
/* modifiers */
- /*! sets the attribute's color.
+ /** sets the attribute's color.
* \param r:
* The new R value.
* \param g:
@@ -218,7 +218,7 @@ class StrokeAttribute {
_color[2] = b;
}
- /*! sets the attribute's color.
+ /** sets the attribute's color.
* \param iRGB:
* The new RGB values.
*/
@@ -229,7 +229,7 @@ class StrokeAttribute {
_color[2] = iRGB[2];
}
- /*! sets the attribute's alpha value.
+ /** sets the attribute's alpha value.
* \param alpha:
* The new alpha value.
*/
@@ -238,7 +238,7 @@ class StrokeAttribute {
_alpha = alpha;
}
- /*! sets the attribute's thickness.
+ /** sets the attribute's thickness.
* \param tr:
* The thickness on the right of the vertex when following the stroke.
* \param tl:
@@ -250,7 +250,7 @@ class StrokeAttribute {
_thickness[1] = tl;
}
- /*! sets the attribute's thickness.
+ /** sets the attribute's thickness.
* \param tRL:
* The thickness on the right and on the left of the vertex when following the stroke.
*/
@@ -260,13 +260,13 @@ class StrokeAttribute {
_thickness[1] = tRL[1];
}
- /*! sets the visible flag. True means visible. */
+ /** sets the visible flag. True means visible. */
inline void setVisible(bool iVisible)
{
_visible = iVisible;
}
- /*! Adds a user defined attribute of type real
+ /** Adds a user defined attribute of type real
* If there is no attribute of name iName, it is added.
* Otherwise, the new value replaces the old one.
* \param iName:
@@ -276,7 +276,7 @@ class StrokeAttribute {
*/
void setAttributeReal(const char *iName, float att);
- /*! Adds a user defined attribute of type Vec2f
+ /** Adds a user defined attribute of type Vec2f
* If there is no attribute of name iName, it is added.
* Otherwise, the new value replaces the old one.
* \param iName:
@@ -286,7 +286,7 @@ class StrokeAttribute {
*/
void setAttributeVec2f(const char *iName, const Vec2f &att);
- /*! Adds a user defined attribute of type Vec3f
+ /** Adds a user defined attribute of type Vec3f
* If there is no attribute of name iName, it is added.
* Otherwise, the new value replaces the old one.
* \param iName:
@@ -322,10 +322,10 @@ class StrokeAttribute {
//
////////////////////////////////////////////////////////
-/*! Class to define a stroke vertex. */
+/** Class to define a stroke vertex. */
class StrokeVertex : public CurvePoint {
public: // Implementation of Interface0D
- /*! Returns the string "StrokeVertex" */
+ /** Returns the string "StrokeVertex" */
virtual string getExactTypeName() const
{
return "StrokeVertex";
@@ -337,129 +337,129 @@ class StrokeVertex : public CurvePoint {
float _StrokeLength; // stroke length
public:
- /*! default constructor */
+ /** default constructor */
StrokeVertex();
- /*! Copy constructor */
+ /** Copy constructor */
StrokeVertex(const StrokeVertex &iBrother);
- /*! Builds a stroke vertex from a SVertex */
+ /** Builds a stroke vertex from a SVertex */
StrokeVertex(SVertex *iSVertex);
- /*! Builds a stroke vertex from a CurvePoint */
+ /** Builds a stroke vertex from a CurvePoint */
StrokeVertex(CurvePoint *iPoint);
- /*! Builds Stroke Vertex from 2 stroke vertices and an interpolation parameter*/
+ /** Builds Stroke Vertex from 2 stroke vertices and an interpolation parameter*/
StrokeVertex(StrokeVertex *iA, StrokeVertex *iB, float t3);
- /*! Builds a stroke from a view vertex and an attribute */
+ /** Builds a stroke from a view vertex and an attribute */
StrokeVertex(SVertex *iSVertex, const StrokeAttribute &iAttribute);
/* operators */
- /*! operator = */
+ /** operator = */
StrokeVertex &operator=(const StrokeVertex &iBrother);
/* accessors */
- /*! Returns the 2D point x coordinate */
+ /** Returns the 2D point x coordinate */
inline real x() const
{
return _Point2d[0];
}
- /*! Returns the 2D point y coordinate */
+ /** Returns the 2D point y coordinate */
inline real y() const
{
return _Point2d[1];
}
- /*! Returns the 2D point coordinates as a Vec2r */
+ /** Returns the 2D point coordinates as a Vec2r */
inline Vec2r getPoint() const
{
return getPoint2D();
}
- /*! Returns the ith 2D point coordinate (i=0 or 1)*/
+ /** Returns the ith 2D point coordinate (i=0 or 1)*/
inline real operator[](const int i) const
{
return _Point2d[i];
}
- /*! Returns the StrokeAttribute for this StrokeVertex */
+ /** Returns the StrokeAttribute for this StrokeVertex */
inline const StrokeAttribute &attribute() const
{
return _Attribute;
}
- /*! Returns a non-const reference to the StrokeAttribute of this StrokeVertex */
+ /** Returns a non-const reference to the StrokeAttribute of this StrokeVertex */
inline StrokeAttribute &attribute()
{
return _Attribute;
}
- /*! Returns the curvilinear abscissa */
+ /** Returns the curvilinear abscissa */
inline float curvilinearAbscissa() const
{
return _CurvilignAbscissa;
}
- /*! Returns the length of the Stroke to which this StrokeVertex belongs */
+ /** Returns the length of the Stroke to which this StrokeVertex belongs */
inline float strokeLength() const
{
return _StrokeLength;
}
- /*! Returns the curvilinear abscissa of this StrokeVertex in the Stroke */
+ /** Returns the curvilinear abscissa of this StrokeVertex in the Stroke */
inline float u() const
{
return _CurvilignAbscissa / _StrokeLength;
}
/* modifiers */
- /*! sets the 2D x value */
+ /** sets the 2D x value */
inline void setX(real x)
{
_Point2d[0] = x;
}
- /*! sets the 2D y value */
+ /** sets the 2D y value */
inline void setY(real y)
{
_Point2d[1] = y;
}
- /*! sets the 2D x and y values */
+ /** sets the 2D x and y values */
inline void setPoint(real x, real y)
{
_Point2d[0] = x;
_Point2d[1] = y;
}
- /*! sets the 2D x and y values */
+ /** sets the 2D x and y values */
inline void setPoint(const Vec2r &p)
{
_Point2d[0] = p[0];
_Point2d[1] = p[1];
}
- /*! Returns a reference to the ith 2D point coordinate (i=0 or 1) */
+ /** Returns a reference to the ith 2D point coordinate (i=0 or 1) */
inline real &operator[](const int i)
{
return _Point2d[i];
}
- /*! sets the attribute. */
+ /** sets the attribute. */
inline void setAttribute(const StrokeAttribute &iAttribute)
{
_Attribute = iAttribute;
}
- /*! sets the curvilinear abscissa of this StrokeVertex in the Stroke */
+ /** sets the curvilinear abscissa of this StrokeVertex in the Stroke */
inline void setCurvilinearAbscissa(float iAbscissa)
{
_CurvilignAbscissa = iAbscissa;
}
- /*! sets the Stroke's length (it's only a value stored by the Stroke Vertex, it won't change the
+ /** sets the Stroke's length (it's only a value stored by the Stroke Vertex, it won't change the
* real Stroke's length.)
*/
inline void setStrokeLength(float iLength)
@@ -492,7 +492,7 @@ class StrokeVertexIterator;
} // end of namespace StrokeInternal
-/*! Class to define a stroke.
+/** Class to define a stroke.
* A stroke is made of a set of 2D vertices (StrokeVertex), regularly spaced out.
* This set of vertices defines the stroke's backbone geometry.
* Each of these stroke vertices defines the stroke's shape and appearance at this vertex
@@ -500,7 +500,7 @@ class StrokeVertexIterator;
*/
class Stroke : public Interface1D {
public: // Implementation of Interface1D
- /*! Returns the string "Stroke" */
+ /** Returns the string "Stroke" */
virtual string getExactTypeName() const
{
return "Stroke";
@@ -508,17 +508,17 @@ class Stroke : public Interface1D {
// Data access methods
- /*! Returns the Id of the Stroke */
+ /** Returns the Id of the Stroke */
virtual Id getId() const
{
return _id;
}
- /*! The different blending modes available to similate the interaction media-medium. */
+ /** The different blending modes available to similate the interaction media-medium. */
typedef enum {
- DRY_MEDIUM, /*!< To simulate a dry medium such as Pencil or Charcoal.*/
- HUMID_MEDIUM, /*!< To simulate ink painting (color subtraction blending).*/
- OPAQUE_MEDIUM, /*!< To simulate an opaque medium (oil, spray...).*/
+ DRY_MEDIUM, /**< To simulate a dry medium such as Pencil or Charcoal.*/
+ HUMID_MEDIUM, /**< To simulate ink painting (color subtraction blending).*/
+ OPAQUE_MEDIUM, /**< To simulate an opaque medium (oil, spray...).*/
} MediumType;
public:
@@ -549,13 +549,13 @@ class Stroke : public Interface1D {
Vec2r _extremityOrientations[2]; // the orientations of the first and last extermity
public:
- /*! default constructor */
+ /** default constructor */
Stroke();
- /*! copy constructor */
+ /** copy constructor */
Stroke(const Stroke &iBrother);
- /*! Builds a stroke from a set of StrokeVertex.
+ /** Builds a stroke from a set of StrokeVertex.
* This constructor is templated by an iterator type.
* This iterator type must allow the vertices parsing using the ++ operator.
* \param iBegin:
@@ -565,14 +565,14 @@ class Stroke : public Interface1D {
*/
template<class InputVertexIterator> Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd);
- /*! Destructor */
+ /** Destructor */
virtual ~Stroke();
/* operators */
- /*! operator = */
+ /** operator = */
Stroke &operator=(const Stroke &iBrother);
- /*! Compute the sampling needed to get iNVertices vertices.
+ /** Compute the sampling needed to get iNVertices vertices.
* If the specified number of vertices is less than the actual number of vertices, the actual
* sampling value is returned. (To remove Vertices, use the RemoveVertex() method of this class).
* \param iNVertices:
@@ -583,7 +583,7 @@ class Stroke : public Interface1D {
*/
float ComputeSampling(int iNVertices);
- /*! Resampling method.
+ /** Resampling method.
* Resamples the curve so that it eventually has iNPoints. That means it is going to add
* iNPoints-vertices_size, if vertices_size is the number of points we already have. If
* vertices_size >= iNPoints, no resampling is done.
@@ -592,7 +592,7 @@ class Stroke : public Interface1D {
*/
int Resample(int iNPoints);
- /*! Resampling method.
+ /** Resampling method.
* Resamples the curve with a given sampling.
* If this sampling is < to the actual sampling value, no resampling is done.
* \param iSampling:
@@ -600,18 +600,18 @@ class Stroke : public Interface1D {
*/
int Resample(float iSampling);
- /*! Removes all vertices from the Stroke.
+ /** Removes all vertices from the Stroke.
*/
void RemoveAllVertices();
- /*! Removes the stroke vertex iVertex
+ /** Removes the stroke vertex iVertex
* from the stroke.
* The length and curvilinear abscissa are updated
* consequently.
*/
void RemoveVertex(StrokeVertex *iVertex);
- /*! Inserts the stroke vertex iVertex in the stroke before next.
+ /** Inserts the stroke vertex iVertex in the stroke before next.
* The length, curvilinear abscissa are updated consequently.
* \param iVertex:
* The StrokeVertex to insert in the Stroke.
@@ -620,7 +620,7 @@ class Stroke : public Interface1D {
*/
void InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next);
- /*! Updates the 2D length of the Stroke */
+ /** Updates the 2D length of the Stroke */
void UpdateLength();
/* Render method */
@@ -631,50 +631,50 @@ class Stroke : public Interface1D {
/* Iterator definition */
/* accessors */
- /*! Returns the 2D length of the Stroke */
+ /** Returns the 2D length of the Stroke */
inline real getLength2D() const
{
return _Length;
}
- /*! Returns a reference to the time stamp value of the stroke. */
- /*! Returns the MediumType used for this Stroke. */
+ /** Returns a reference to the time stamp value of the stroke. */
+ /** Returns the MediumType used for this Stroke. */
inline MediumType getMediumType() const
{
return _mediumType;
}
- /*! Returns the id of the texture used to simulate th marks system for this Stroke */
+ /** Returns the id of the texture used to simulate th marks system for this Stroke */
inline unsigned int getTextureId()
{
return _textureId;
}
- /*! Returns the spacing of texture coordinates along the stroke length */
+ /** Returns the spacing of texture coordinates along the stroke length */
inline float getTextureStep()
{
return _textureStep;
}
- /*! Returns the texture used at given index to simulate the marks system for this Stroke */
+ /** Returns the texture used at given index to simulate the marks system for this Stroke */
inline MTex *getMTex(int idx)
{
return _mtex[idx];
}
- /*! Return the shader node tree to define textures. */
+ /** Return the shader node tree to define textures. */
inline bNodeTree *getNodeTree()
{
return _nodeTree;
}
- /*! Returns true if this Stroke has textures assigned, false otherwise. */
+ /** Returns true if this Stroke has textures assigned, false otherwise. */
inline bool hasTex() const
{
return (_mtex[0] != NULL) || _nodeTree;
}
- /*! Returns true if this Stroke uses a texture with tips, false otherwise. */
+ /** Returns true if this Stroke uses a texture with tips, false otherwise. */
inline bool hasTips() const
{
return _tips;
@@ -742,34 +742,34 @@ class Stroke : public Interface1D {
}
/* modifiers */
- /*! sets the Id of the Stroke. */
+ /** sets the Id of the Stroke. */
inline void setId(const Id &id)
{
_id = id;
}
- /*! sets the 2D length of the Stroke. */
+ /** sets the 2D length of the Stroke. */
void setLength(float iLength);
- /*! sets the medium type that must be used for this Stroke. */
+ /** sets the medium type that must be used for this Stroke. */
inline void setMediumType(MediumType iType)
{
_mediumType = iType;
}
- /*! sets the texture id to be used to simulate the marks system for this Stroke. */
+ /** sets the texture id to be used to simulate the marks system for this Stroke. */
inline void setTextureId(unsigned int id)
{
_textureId = id;
}
- /*! sets the spacing of texture coordinates along the stroke length. */
+ /** sets the spacing of texture coordinates along the stroke length. */
inline void setTextureStep(float step)
{
_textureStep = step;
}
- /*! assigns a blender texture to the first available slot. */
+ /** assigns a blender texture to the first available slot. */
inline int setMTex(MTex *mtex)
{
for (int a = 0; a < MAX_MTEX; a++) {
@@ -781,13 +781,13 @@ class Stroke : public Interface1D {
return -1; /* no free slots */
}
- /*! assigns a node tree (of new shading nodes) to define textures. */
+ /** assigns a node tree (of new shading nodes) to define textures. */
inline void setNodeTree(bNodeTree *iNodeTree)
{
_nodeTree = iNodeTree;
}
- /*! sets the flag telling whether this stroke is using a texture with tips or not. */
+ /** sets the flag telling whether this stroke is using a texture with tips or not. */
inline void setTips(bool iTips)
{
_tips = iTips;
@@ -836,7 +836,7 @@ class Stroke : public Interface1D {
const_vertex_iterator vertices_end() const;
vertex_iterator vertices_end();
- /*! Returns a StrokeVertexIterator pointing on the first StrokeVertex of the Stroke. One can
+ /** Returns a StrokeVertexIterator pointing on the first StrokeVertex of the Stroke. One can
* specify a sampling value to re-sample the Stroke on the fly if needed.
*
* \param t: The resampling value with which we want our Stroke to be resampled.
@@ -844,26 +844,26 @@ class Stroke : public Interface1D {
*/
StrokeInternal::StrokeVertexIterator strokeVerticesBegin(float t = 0.0f);
- /*! Returns a StrokeVertexIterator pointing after the last StrokeVertex of the Stroke. */
+ /** Returns a StrokeVertexIterator pointing after the last StrokeVertex of the Stroke. */
StrokeInternal::StrokeVertexIterator strokeVerticesEnd();
- /*! Returns the number of StrokeVertex constituting the Stroke. */
+ /** Returns the number of StrokeVertex constituting the Stroke. */
inline unsigned int strokeVerticesSize() const
{
return _Vertices.size();
}
- /*! Returns the i-th StrokeVertex constituting the Stroke. */
+ /** Returns the i-th StrokeVertex constituting the Stroke. */
inline StrokeVertex &strokeVerticeAt(unsigned int i)
{
return *(_Vertices.at(i));
}
// Iterator access (Interface1D)
- /*! Returns an Interface0DIterator pointing on the first StrokeVertex of the Stroke. */
+ /** Returns an Interface0DIterator pointing on the first StrokeVertex of the Stroke. */
virtual Interface0DIterator verticesBegin();
- /*! Returns an Interface0DIterator pointing after the last StrokeVertex of the Stroke. */
+ /** Returns an Interface0DIterator pointing after the last StrokeVertex of the Stroke. */
virtual Interface0DIterator verticesEnd();
virtual Interface0DIterator pointsBegin(float t = 0.0f);