|
Blender V4.3
|
#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 | |
| uint | _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 393 of file Stroke.cpp.
References Freestyle::a, FLT_MAX, MAX_MTEX, and OPAQUE_MEDIUM.
| Freestyle::Stroke::Stroke | ( | const Stroke & | iBrother | ) |
copy constructor
Definition at line 410 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 871 of file Stroke.h.
References v.
|
virtual |
|
inline |
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 491 of file Stroke.cpp.
References float.
Referenced by Freestyle::StrokeShaders::BezierCurveShader::shade().
|
inline |
|
inline |
Definition at line 707 of file Stroke.h.
References Freestyle::VecMat::Vec2< T >::x().
|
inline |
Definition at line 712 of file Stroke.h.
References Freestyle::VecMat::Vec2< T >::y().
|
inline |
|
inline |
Definition at line 722 of file Stroke.h.
References Freestyle::VecMat::Vec2< T >::x().
|
inline |
Definition at line 727 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 500 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 623 of file Stroke.h.
Referenced by Freestyle::operator<<(), Freestyle::StrokeShaders::BackboneStretcherShader::shade(), Freestyle::StrokeShaders::ConstrainedIncreasingThicknessShader::shade(), and Freestyle::StrokeShaders::LengthDependingThicknessShader::shade().
|
inline |
Returns a reference to the time stamp value of the stroke. Returns the MediumType used for this Stroke.
Definition at line 630 of file Stroke.h.
Referenced by Freestyle::operator<<(), and Freestyle::StrokeRep::StrokeRep().
Returns the texture used at given index to simulate the marks system for this Stroke
Definition at line 648 of file Stroke.h.
Referenced by Freestyle::StrokeRep::StrokeRep().
|
inline |
Return the shader node tree to define textures.
Definition at line 654 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 636 of file Stroke.h.
Referenced by Freestyle::StrokeRep::StrokeRep().
|
inline |
Returns the spacing of texture coordinates along the stroke length
Definition at line 642 of file Stroke.h.
Referenced by Freestyle::StrokeRep::StrokeRep().
|
inline |
Returns true if this Stroke has textures assigned, false otherwise.
Definition at line 660 of file Stroke.h.
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 716 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 785 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 790 of file Stroke.cpp.
References verticesEnd().
|
inline |
Definition at line 784 of file Stroke.h.
Referenced by Freestyle::createStroke().
|
inline |
| void Freestyle::Stroke::RemoveAllVertices | ( | ) |
Removes all vertices from the Stroke.
Definition at line 693 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 703 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 805 of file Stroke.cpp.
References Freestyle::StrokeRenderer::RenderStrokeRep().
Referenced by Freestyle::AppCanvas::RenderStroke().
| void Freestyle::Stroke::RenderBasic | ( | const StrokeRenderer * | iRenderer | ) |
Definition at line 813 of file Stroke.cpp.
References Freestyle::StrokeRenderer::RenderStrokeRep().
Referenced by Freestyle::AppCanvas::RenderStroke().
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 636 of file Stroke.cpp.
References Freestyle::a, b, next, Freestyle::VecMat::Vec< T, N >::norm(), strokeVerticesBegin(), and strokeVerticesEnd().
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 525 of file Stroke.cpp.
References Freestyle::a, b, float, floor(), int, N, next, Freestyle::VecMat::Vec< T, N >::norm(), strokeVerticesBegin(), strokeVerticesEnd(), and strokeVerticesSize().
Referenced by Freestyle::StrokeShaders::BezierCurveShader::shade(), Freestyle::StrokeShaders::SamplingShader::shade(), Freestyle::StrokeShaders::TipRemoverShader::shade(), strokeVerticesBegin(), and vertices_begin().
| void Freestyle::Stroke::ScaleThickness | ( | float | iFactor | ) |
Definition at line 795 of file Stroke.cpp.
References Freestyle::StrokeAttribute::getThicknessL(), Freestyle::StrokeAttribute::getThicknessR(), and Freestyle::StrokeAttribute::setThickness().
|
inline |
|
inline |
|
inline |
Definition at line 734 of file Stroke.h.
Referenced by Freestyle::createStroke().
| void Freestyle::Stroke::setLength | ( | float | iLength | ) |
sets the 2D length of the Stroke.
Definition at line 483 of file Stroke.cpp.
References v.
Referenced by Freestyle::createStroke().
|
inline |
assigns a blender texture to the first available slot.
Definition at line 761 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 773 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 755 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 756 of file Stroke.cpp.
References Resample().
Referenced by Freestyle::Smoother::copyVertices(), Freestyle::StrokeRep::create(), Freestyle::createStroke(), Freestyle::TextStrokeRenderer::RenderStrokeRepBasic(), Resample(), Resample(), Freestyle::StrokeShaders::BackboneStretcherShader::shade(), Freestyle::StrokeShaders::BezierCurveShader::shade(), Freestyle::StrokeShaders::ColorNoiseShader::shade(), Freestyle::StrokeShaders::ConstantColorShader::shade(), Freestyle::StrokeShaders::ConstantExternThicknessShader::shade(), Freestyle::StrokeShaders::ConstantThicknessShader::shade(), Freestyle::StrokeShaders::ConstrainedIncreasingThicknessShader::shade(), Freestyle::StrokeShaders::GuidingLinesShader::shade(), Freestyle::StrokeShaders::IncreasingColorShader::shade(), Freestyle::StrokeShaders::IncreasingThicknessShader::shade(), Freestyle::StrokeShaders::LengthDependingThicknessShader::shade(), Freestyle::StrokeShaders::PolygonalizationShader::shade(), Freestyle::StrokeShaders::ThicknessNoiseShader::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 765 of file Stroke.cpp.
Referenced by Freestyle::Smoother::copyVertices(), Freestyle::StrokeRep::create(), Resample(), Resample(), Freestyle::StrokeShaders::BackboneStretcherShader::shade(), Freestyle::StrokeShaders::BezierCurveShader::shade(), Freestyle::StrokeShaders::ColorNoiseShader::shade(), Freestyle::StrokeShaders::ConstantColorShader::shade(), Freestyle::StrokeShaders::ConstantExternThicknessShader::shade(), Freestyle::StrokeShaders::ConstantThicknessShader::shade(), Freestyle::StrokeShaders::ConstrainedIncreasingThicknessShader::shade(), Freestyle::StrokeShaders::GuidingLinesShader::shade(), Freestyle::StrokeShaders::IncreasingColorShader::shade(), Freestyle::StrokeShaders::IncreasingThicknessShader::shade(), Freestyle::StrokeShaders::LengthDependingThicknessShader::shade(), Freestyle::StrokeShaders::PolygonalizationShader::shade(), Freestyle::StrokeShaders::ThicknessNoiseShader::shade(), Freestyle::StrokeShaders::TipRemoverShader::shade(), and Freestyle::Smoother::Smoother().
|
inline |
Returns the number of StrokeVertex constituting the Stroke.
Definition at line 839 of file Stroke.h.
Referenced by Freestyle::createStroke(), Resample(), Freestyle::StrokeShaders::BezierCurveShader::shade(), Freestyle::StrokeShaders::ConstantExternThicknessShader::shade(), Freestyle::StrokeShaders::ConstantThicknessShader::shade(), Freestyle::StrokeShaders::ConstrainedIncreasingThicknessShader::shade(), Freestyle::StrokeShaders::GuidingLinesShader::shade(), Freestyle::StrokeShaders::IncreasingColorShader::shade(), Freestyle::StrokeShaders::IncreasingThicknessShader::shade(), Freestyle::StrokeShaders::LengthDependingThicknessShader::shade(), Freestyle::StrokeShaders::PolygonalizationShader::shade(), and Freestyle::StrokeShaders::TipRemoverShader::shade().
| void Freestyle::Stroke::UpdateLength | ( | ) |
Updates the 2D length of the Stroke
Definition at line 723 of file Stroke.cpp.
References norm().
Referenced by Freestyle::Smoother::copyVertices(), InsertVertex(), RemoveAllVertices(), RemoveVertex(), Freestyle::SpatialNoiseShader::shade(), Freestyle::StrokeShaders::BackboneStretcherShader::shade(), Freestyle::StrokeShaders::BezierCurveShader::shade(), Freestyle::StrokeShaders::ExternalContourStretcherShader::shade(), Freestyle::StrokeShaders::GuidingLinesShader::shade(), Freestyle::StrokeShaders::PolygonalizationShader::shade(), and Freestyle::StrokeShaders::SamplingShader::shade().
| Stroke::const_vertex_iterator Freestyle::Stroke::vertices_begin | ( | ) | const |
embedding vertex iterator
Definition at line 741 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 821 of file Stroke.cpp.
References Resample().
| Stroke::vertex_iterator Freestyle::Stroke::vertices_end | ( | ) |
Definition at line 751 of file Stroke.cpp.
| Stroke::const_vertex_iterator Freestyle::Stroke::vertices_end | ( | ) | const |
Definition at line 746 of file Stroke.cpp.
Referenced by Freestyle::operator<<(), and Freestyle::StrokeTesselator::Tesselate().
|
inline |
Definition at line 672 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 771 of file Stroke.cpp.
References ret.
Referenced by Freestyle::createStroke(), pointsBegin(), Freestyle::CalligraphicShader::shade(), Freestyle::SpatialNoiseShader::shade(), Freestyle::StrokeShaders::ExternalContourStretcherShader::shade(), and Freestyle::StrokeShaders::MaterialColorShader::shade().
|
virtual |
Returns an Interface0DIterator pointing after the last StrokeVertex of the Stroke.
Reimplemented from Freestyle::Interface1D.
Definition at line 778 of file Stroke.cpp.
References ret.
Referenced by pointsEnd(), and Freestyle::StrokeShaders::MaterialColorShader::shade().
|
inline |
|
inline |
|
inline |
|
inline |