|
Blender
V2.93
|
#include <Stroke.h>
Inherits Freestyle::Interface1D.
Public Types | |
| enum | MediumType { DRY_MEDIUM , HUMID_MEDIUM , OPAQUE_MEDIUM } |
| typedef std::deque< StrokeVertex * > | vertex_container |
| typedef std::vector< ViewEdge * > | viewedge_container |
| typedef StrokeInternal::vertex_iterator_base< StrokeInternal::vertex_nonconst_traits > | vertex_iterator |
| typedef StrokeInternal::vertex_iterator_base< StrokeInternal::vertex_const_traits > | const_vertex_iterator |
Additional Inherited Members | |
Protected Attributes inherited from Freestyle::Interface1D | |
| unsigned | _timeStamp |
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 position.
| typedef std::deque<StrokeVertex *> Freestyle::Stroke::vertex_container |
| typedef std::vector<ViewEdge *> Freestyle::Stroke::viewedge_container |
| Freestyle::Stroke::Stroke | ( | ) |
default constructor
Definition at line 405 of file Stroke.cpp.
References Freestyle::a, MAX_MTEX, and OPAQUE_MEDIUM.
| Freestyle::Stroke::Stroke | ( | const Stroke & | iBrother | ) |
copy constructor
Definition at line 422 of file Stroke.cpp.
References Freestyle::a, MAX_MTEX, and v.
| Freestyle::Stroke::Stroke | ( | InputVertexIterator | iBegin, |
| InputVertexIterator | iEnd | ||
| ) |
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.
| iBegin | The iterator pointing to the first vertex. |
| iEnd | The iterator pointing to the end of the vertex list. |
Definition at line 883 of file Stroke.h.
References v.
|
virtual |
|
inline |
| float Freestyle::Stroke::ComputeSampling | ( | int | iNVertices | ) |
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).
| iNVertices | The number of StrokeVertices we eventually want in our Stroke. |
Definition at line 501 of file Stroke.cpp.
References float().
Referenced by Freestyle::StrokeShaders::BezierCurveShader::shade().
|
inline |
|
inline |
Definition at line 719 of file Stroke.h.
References Freestyle::VecMat::Vec2< T >::x().
|
inline |
Definition at line 724 of file Stroke.h.
References Freestyle::VecMat::Vec2< T >::y().
|
inline |
|
inline |
Definition at line 734 of file Stroke.h.
References Freestyle::VecMat::Vec2< T >::x().
|
inline |
Definition at line 739 of file Stroke.h.
References Freestyle::VecMat::Vec2< T >::y().
|
inlinevirtual |
Returns the string "Stroke"
Reimplemented from Freestyle::Interface1D.
|
inlinevirtual |
Reimplemented from Freestyle::Interface1D.
Definition at line 512 of file Stroke.h.
Referenced by Freestyle::operator<<(), Freestyle::StrokeShaders::BezierCurveShader::shade(), and Freestyle::StrokeTesselator::Tesselate().
|
inlinevirtual |
Returns the 2D length of the Stroke
Reimplemented from Freestyle::Interface1D.
Definition at line 635 of file Stroke.h.
Referenced by Freestyle::operator<<(), Freestyle::StrokeShaders::ConstrainedIncreasingThicknessShader::shade(), Freestyle::StrokeShaders::LengthDependingThicknessShader::shade(), and Freestyle::StrokeShaders::BackboneStretcherShader::shade().
|
inline |
Returns a reference to the time stamp value of the stroke.
Returns the MediumType used for this Stroke.
Definition at line 642 of file Stroke.h.
Referenced by Freestyle::operator<<(), and Freestyle::StrokeRep::StrokeRep().
|
inline |
Returns the texture used at given index to simulate the marks system for this Stroke
Definition at line 660 of file Stroke.h.
Referenced by Freestyle::StrokeRep::StrokeRep().
|
inline |
Return the shader node tree to define textures.
Definition at line 666 of file Stroke.h.
Referenced by Freestyle::StrokeRep::StrokeRep().
|
inline |
Returns the id of the texture used to simulate th marks system for this Stroke
Definition at line 648 of file Stroke.h.
Referenced by Freestyle::StrokeRep::StrokeRep().
|
inline |
Returns the spacing of texture coordinates along the stroke length
Definition at line 654 of file Stroke.h.
Referenced by Freestyle::StrokeRep::StrokeRep().
|
inline |
Returns true if this Stroke has textures assigned, false otherwise.
Definition at line 672 of file Stroke.h.
References NULL.
Referenced by Freestyle::StrokeRep::StrokeRep().
|
inline |
| void Freestyle::Stroke::InsertVertex | ( | StrokeVertex * | iVertex, |
| StrokeInternal::StrokeVertexIterator | next | ||
| ) |
Inserts the stroke vertex iVertex in the stroke before next. The length, curvilinear abscissa are updated consequently.
| iVertex | The StrokeVertex to insert in the Stroke. |
| next | A StrokeVertexIterator pointing to the StrokeVertex before which iVertex must be inserted. |
Definition at line 724 of file Stroke.cpp.
References next, and UpdateLength().
|
virtual |
Returns an iterator over the Interface1D points, pointing to the first point. The difference with verticesBegin() is that here we can iterate over points of the 1D element at a any given sampling. Indeed, for each iteration, a virtual point is created.
| t | The sampling with which we want to iterate over points of this 1D element. |
Reimplemented from Freestyle::Interface1D.
Definition at line 793 of file Stroke.cpp.
References verticesBegin().
|
virtual |
Returns an iterator over the Interface1D points, pointing after the last point. The difference with verticesEnd() is that here we can iterate over points of the 1D element at a any given sampling. Indeed, for each iteration, a virtual point is created.
| t | The sampling with which we want to iterate over points of this 1D element. |
Reimplemented from Freestyle::Interface1D.
Definition at line 798 of file Stroke.cpp.
References verticesEnd().
|
inline |
Definition at line 796 of file Stroke.h.
Referenced by Freestyle::createStroke().
|
inline |
| void Freestyle::Stroke::RemoveAllVertices | ( | ) |
Removes all vertices from the Stroke.
Definition at line 701 of file Stroke.cpp.
References UpdateLength().
| void Freestyle::Stroke::RemoveVertex | ( | StrokeVertex * | iVertex | ) |
Removes the stroke vertex iVertex from the stroke. The length and curvilinear abscissa are updated consequently.
Definition at line 711 of file Stroke.cpp.
References UpdateLength().
Referenced by Freestyle::StrokeShaders::BezierCurveShader::shade(), and Freestyle::StrokeShaders::TipRemoverShader::shade().
| void Freestyle::Stroke::Render | ( | const StrokeRenderer * | iRenderer | ) |
Definition at line 812 of file Stroke.cpp.
References Freestyle::StrokeRenderer::RenderStrokeRep().
Referenced by Freestyle::AppCanvas::RenderStroke().
| void Freestyle::Stroke::RenderBasic | ( | const StrokeRenderer * | iRenderer | ) |
Definition at line 820 of file Stroke.cpp.
References Freestyle::StrokeRenderer::RenderStrokeRep().
Referenced by Freestyle::AppCanvas::RenderStroke().
| int Freestyle::Stroke::Resample | ( | float | iSampling | ) |
Resampling method. Resamples the curve with a given sampling. If this sampling is < to the actual sampling value, no resampling is done.
| iSampling | The new sampling value. |
Definition at line 644 of file Stroke.cpp.
References Freestyle::a, next, Freestyle::VecMat::Vec< T, N >::norm(), strokeVerticesBegin(), strokeVerticesEnd(), and t.
| int Freestyle::Stroke::Resample | ( | int | iNPoints | ) |
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.
| iNPoints | The number of vertices we eventually want in our stroke. |
Definition at line 535 of file Stroke.cpp.
References Freestyle::a, float(), floor(), N, next, Freestyle::VecMat::Vec< T, N >::norm(), strokeVerticesBegin(), strokeVerticesEnd(), strokeVerticesSize(), and t.
Referenced by Freestyle::StrokeShaders::SamplingShader::shade(), Freestyle::StrokeShaders::BezierCurveShader::shade(), Freestyle::StrokeShaders::TipRemoverShader::shade(), strokeVerticesBegin(), and vertices_begin().
| void Freestyle::Stroke::ScaleThickness | ( | float | iFactor | ) |
Definition at line 803 of file Stroke.cpp.
References Freestyle::StrokeAttribute::getThicknessL(), Freestyle::StrokeAttribute::getThicknessR(), and Freestyle::StrokeAttribute::setThickness().
|
inline |
Definition at line 816 of file Stroke.h.
References Freestyle::x, and y.
|
inline |
Definition at line 826 of file Stroke.h.
References Freestyle::x, and y.
|
inline |
| void Freestyle::Stroke::setLength | ( | float | iLength | ) |
sets the 2D length of the Stroke.
Definition at line 493 of file Stroke.cpp.
References v.
Referenced by Freestyle::createStroke().
|
inline |
|
inline |
assigns a blender texture to the first available slot.
Definition at line 773 of file Stroke.h.
References Freestyle::a, and MAX_MTEX.
Referenced by Freestyle::StrokeShaders::BlenderTextureShader::shade().
|
inline |
assigns a node tree (of new shading nodes) to define textures.
Definition at line 785 of file Stroke.h.
Referenced by Freestyle::StrokeShaders::BlenderTextureShader::shade().
|
inline |
|
inline |
sets the spacing of texture coordinates along the stroke length.
Definition at line 767 of file Stroke.h.
Referenced by Freestyle::StrokeShaders::StrokeTextureStepShader::shade().
|
inline |
|
inline |
Returns the i-th StrokeVertex constituting the Stroke.
| StrokeInternal::StrokeVertexIterator Freestyle::Stroke::strokeVerticesBegin | ( | float | t = 0.0f | ) |
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.
| t | The resampling value with which we want our Stroke to be resampled. If 0 is specified, no resampling is done. |
Definition at line 764 of file Stroke.cpp.
References Resample(), and t.
Referenced by Freestyle::Smoother::copyVertices(), Freestyle::createStroke(), Freestyle::TextStrokeRenderer::RenderStrokeRepBasic(), Resample(), Freestyle::StrokeShaders::ConstantThicknessShader::shade(), Freestyle::StrokeShaders::ConstantExternThicknessShader::shade(), Freestyle::StrokeShaders::IncreasingThicknessShader::shade(), Freestyle::StrokeShaders::ConstrainedIncreasingThicknessShader::shade(), Freestyle::StrokeShaders::LengthDependingThicknessShader::shade(), Freestyle::StrokeShaders::ThicknessNoiseShader::shade(), Freestyle::StrokeShaders::ConstantColorShader::shade(), Freestyle::StrokeShaders::IncreasingColorShader::shade(), Freestyle::StrokeShaders::ColorNoiseShader::shade(), Freestyle::StrokeShaders::BackboneStretcherShader::shade(), Freestyle::StrokeShaders::BezierCurveShader::shade(), Freestyle::StrokeShaders::PolygonalizationShader::shade(), Freestyle::StrokeShaders::GuidingLinesShader::shade(), Freestyle::StrokeShaders::TipRemoverShader::shade(), and Freestyle::Smoother::Smoother().
| StrokeInternal::StrokeVertexIterator Freestyle::Stroke::strokeVerticesEnd | ( | ) |
Returns a StrokeVertexIterator pointing after the last StrokeVertex of the Stroke.
Definition at line 773 of file Stroke.cpp.
Referenced by Freestyle::Smoother::copyVertices(), Resample(), Freestyle::StrokeShaders::ConstantThicknessShader::shade(), Freestyle::StrokeShaders::ConstantExternThicknessShader::shade(), Freestyle::StrokeShaders::IncreasingThicknessShader::shade(), Freestyle::StrokeShaders::ConstrainedIncreasingThicknessShader::shade(), Freestyle::StrokeShaders::LengthDependingThicknessShader::shade(), Freestyle::StrokeShaders::ThicknessNoiseShader::shade(), Freestyle::StrokeShaders::ConstantColorShader::shade(), Freestyle::StrokeShaders::IncreasingColorShader::shade(), Freestyle::StrokeShaders::ColorNoiseShader::shade(), Freestyle::StrokeShaders::BackboneStretcherShader::shade(), Freestyle::StrokeShaders::BezierCurveShader::shade(), Freestyle::StrokeShaders::PolygonalizationShader::shade(), Freestyle::StrokeShaders::GuidingLinesShader::shade(), Freestyle::StrokeShaders::TipRemoverShader::shade(), and Freestyle::Smoother::Smoother().
|
inline |
Returns the number of StrokeVertex constituting the Stroke.
Definition at line 851 of file Stroke.h.
Referenced by Freestyle::createStroke(), Resample(), Freestyle::StrokeShaders::ConstantThicknessShader::shade(), Freestyle::StrokeShaders::ConstantExternThicknessShader::shade(), Freestyle::StrokeShaders::IncreasingThicknessShader::shade(), Freestyle::StrokeShaders::ConstrainedIncreasingThicknessShader::shade(), Freestyle::StrokeShaders::LengthDependingThicknessShader::shade(), Freestyle::StrokeShaders::IncreasingColorShader::shade(), Freestyle::StrokeShaders::BezierCurveShader::shade(), Freestyle::StrokeShaders::PolygonalizationShader::shade(), Freestyle::StrokeShaders::GuidingLinesShader::shade(), and Freestyle::StrokeShaders::TipRemoverShader::shade().
| void Freestyle::Stroke::UpdateLength | ( | ) |
Updates the 2D length of the Stroke
Definition at line 731 of file Stroke.cpp.
References norm().
Referenced by Freestyle::Smoother::copyVertices(), InsertVertex(), RemoveAllVertices(), RemoveVertex(), Freestyle::SpatialNoiseShader::shade(), Freestyle::StrokeShaders::BackboneStretcherShader::shade(), Freestyle::StrokeShaders::SamplingShader::shade(), Freestyle::StrokeShaders::ExternalContourStretcherShader::shade(), Freestyle::StrokeShaders::BezierCurveShader::shade(), Freestyle::StrokeShaders::PolygonalizationShader::shade(), and Freestyle::StrokeShaders::GuidingLinesShader::shade().
| Stroke::const_vertex_iterator Freestyle::Stroke::vertices_begin | ( | ) | const |
embedding vertex iterator
Definition at line 749 of file Stroke.cpp.
Referenced by Freestyle::operator<<(), and Freestyle::StrokeTesselator::Tesselate().
| Stroke::vertex_iterator Freestyle::Stroke::vertices_begin | ( | float | sampling = 0.0f | ) |
Definition at line 828 of file Stroke.cpp.
References Resample().
| Stroke::vertex_iterator Freestyle::Stroke::vertices_end | ( | ) |
Definition at line 759 of file Stroke.cpp.
| Stroke::const_vertex_iterator Freestyle::Stroke::vertices_end | ( | ) | const |
Definition at line 754 of file Stroke.cpp.
Referenced by Freestyle::operator<<(), and Freestyle::StrokeTesselator::Tesselate().
|
inline |
Definition at line 684 of file Stroke.h.
Referenced by Freestyle::Smoother::Smoother(), and Freestyle::StrokeTesselator::Tesselate().
|
virtual |
Returns an Interface0DIterator pointing on the first StrokeVertex of the Stroke.
Reimplemented from Freestyle::Interface1D.
Definition at line 779 of file Stroke.cpp.
References ret.
Referenced by Freestyle::createStroke(), pointsBegin(), Freestyle::CalligraphicShader::shade(), Freestyle::SpatialNoiseShader::shade(), Freestyle::StrokeShaders::MaterialColorShader::shade(), and Freestyle::StrokeShaders::ExternalContourStretcherShader::shade().
|
virtual |
Returns an Interface0DIterator pointing after the last StrokeVertex of the Stroke.
Reimplemented from Freestyle::Interface1D.
Definition at line 786 of file Stroke.cpp.
References ret.
Referenced by pointsEnd(), and Freestyle::StrokeShaders::MaterialColorShader::shade().
|
inline |
|
inline |
|
inline |
|
inline |