Blender V4.3
Freestyle::StrokeInternal::StrokeVertexIterator Class Reference

#include <StrokeIterators.h>

Inherits Freestyle::Interface0DIteratorNested.

Public Member Functions

 StrokeVertexIterator ()
 
 StrokeVertexIterator (const StrokeVertexIterator &vi)
 
 StrokeVertexIterator (const Stroke::vertex_container::iterator &it, const Stroke::vertex_container::iterator &begin, const Stroke::vertex_container::iterator &end)
 
virtual ~StrokeVertexIterator ()
 
Interface0DIterator castToInterface0DIterator () const
 
StrokeVertexIteratoroperator= (const StrokeVertexIterator &vi)
 
virtual string getExactTypeName () const
 
virtual StrokeVertexoperator* ()
 
virtual StrokeVertexoperator-> ()
 
virtual StrokeVertexIteratoroperator++ ()
 
virtual StrokeVertexIterator operator++ (int)
 
virtual StrokeVertexIteratoroperator-- ()
 
virtual StrokeVertexIterator operator-- (int)
 
virtual int increment ()
 
virtual int decrement ()
 
bool isBegin () const
 
bool atLast ()
 
bool isEnd () const
 
virtual bool operator== (const Interface0DIteratorNested &it) const
 
virtual float t () const
 
virtual float u () const
 
virtual StrokeVertexIteratorcopy () const
 
const Stroke::vertex_container::iterator & getIt ()
 
- Public Member Functions inherited from Freestyle::Interface0DIteratorNested
virtual ~Interface0DIteratorNested ()
 
virtual bool operator!= (const Interface0DIteratorNested &it) const
 
- Public Member Functions inherited from Freestyle::Iterator
virtual ~Iterator ()
 

Detailed Description

Class defining an iterator designed to iterate over the StrokeVertex of a Stroke. An instance of a StrokeVertexIterator can only be obtained from a Stroke by calling strokeVerticesBegin() or strokeVerticesEnd(). It is iterating over the same vertices as an Interface0DIterator. The difference resides in the object access. Indeed, an Interface0DIterator allows only an access to an Interface0D whereas we could need to access the specialized StrokeVertex type. In this case, one should use a StrokeVertexIterator. The castToInterface0DIterator() method is useful to get an Interface0DIterator from a StrokeVertexIterator in order to call any functions of the type UnaryFunction0D.

Attention
In the scripting language, you must call instead of
it2 = it1
where it1 and it2 are 2 StrokeVertexIterator. Otherwise, incrementing it1 will also increment it2.

Definition at line 35 of file StrokeIterators.h.

Constructor & Destructor Documentation

◆ StrokeVertexIterator() [1/3]

Freestyle::StrokeInternal::StrokeVertexIterator::StrokeVertexIterator ( )
inline

Default constructor.

Definition at line 38 of file StrokeIterators.h.

Referenced by castToInterface0DIterator(), and copy().

◆ StrokeVertexIterator() [2/3]

Freestyle::StrokeInternal::StrokeVertexIterator::StrokeVertexIterator ( const StrokeVertexIterator & vi)
inline

Copy constructor.

Definition at line 41 of file StrokeIterators.h.

◆ StrokeVertexIterator() [3/3]

Freestyle::StrokeInternal::StrokeVertexIterator::StrokeVertexIterator ( const Stroke::vertex_container::iterator & it,
const Stroke::vertex_container::iterator & begin,
const Stroke::vertex_container::iterator & end )
inline

Definition at line 48 of file StrokeIterators.h.

◆ ~StrokeVertexIterator()

virtual Freestyle::StrokeInternal::StrokeVertexIterator::~StrokeVertexIterator ( )
inlinevirtual

Definition at line 57 of file StrokeIterators.h.

Member Function Documentation

◆ atLast()

bool Freestyle::StrokeInternal::StrokeVertexIterator::atLast ( )
inline

Returns true if the pointed StrokeVertex is the final valid StrokeVertex of the Stroke.

Definition at line 154 of file StrokeIterators.h.

References result.

◆ castToInterface0DIterator()

Interface0DIterator Freestyle::StrokeInternal::StrokeVertexIterator::castToInterface0DIterator ( ) const
inline

Casts this StrokeVertexIterator into an Interface0DIterator. Useful for any call to a function of the type UnaryFunction0D.

Definition at line 62 of file StrokeIterators.h.

References ret, and StrokeVertexIterator().

◆ copy()

virtual StrokeVertexIterator * Freestyle::StrokeInternal::StrokeVertexIterator::copy ( ) const
inlinevirtual

Cloning method

Implements Freestyle::Interface0DIteratorNested.

Definition at line 195 of file StrokeIterators.h.

References StrokeVertexIterator().

◆ decrement()

virtual int Freestyle::StrokeInternal::StrokeVertexIterator::decrement ( )
inlinevirtual

Decrements.

Implements Freestyle::Interface0DIteratorNested.

Definition at line 141 of file StrokeIterators.h.

Referenced by operator--(), and operator--().

◆ getExactTypeName()

virtual string Freestyle::StrokeInternal::StrokeVertexIterator::getExactTypeName ( ) const
inlinevirtual

Returns the string "StrokeVertexIterator".

Reimplemented from Freestyle::Interface0DIteratorNested.

Definition at line 82 of file StrokeIterators.h.

◆ getIt()

const Stroke::vertex_container::iterator & Freestyle::StrokeInternal::StrokeVertexIterator::getIt ( )
inline

Definition at line 204 of file StrokeIterators.h.

◆ increment()

virtual int Freestyle::StrokeInternal::StrokeVertexIterator::increment ( )
inlinevirtual

Increments.

Implements Freestyle::Interface0DIteratorNested.

Definition at line 134 of file StrokeIterators.h.

Referenced by operator++(), and operator++().

◆ isBegin()

bool Freestyle::StrokeInternal::StrokeVertexIterator::isBegin ( ) const
inlinevirtual

Returns true if the pointed StrokeVertex is the first of the Stroke.

Implements Freestyle::Interface0DIteratorNested.

Definition at line 148 of file StrokeIterators.h.

Referenced by Freestyle::createStroke().

◆ isEnd()

bool Freestyle::StrokeInternal::StrokeVertexIterator::isEnd ( ) const
inlinevirtual

Returns true if the pointed StrokeVertex is after the last StrokeVertex of the Stroke.

Implements Freestyle::Interface0DIteratorNested.

Definition at line 167 of file StrokeIterators.h.

Referenced by Freestyle::createStroke().

◆ operator*()

virtual StrokeVertex & Freestyle::StrokeInternal::StrokeVertexIterator::operator* ( )
inlinevirtual

Returns a reference to the pointed StrokeVertex. In the scripting language, you must call "getObject()"instead.

Implements Freestyle::Interface0DIteratorNested.

Definition at line 90 of file StrokeIterators.h.

Referenced by operator->().

◆ operator++() [1/2]

virtual StrokeVertexIterator & Freestyle::StrokeInternal::StrokeVertexIterator::operator++ ( )
inlinevirtual

Increments. In the scripting language, call "increment()".

Definition at line 104 of file StrokeIterators.h.

References increment().

◆ operator++() [2/2]

virtual StrokeVertexIterator Freestyle::StrokeInternal::StrokeVertexIterator::operator++ ( int )
inlinevirtual

Increments. In the scripting language, call "increment()".

Definition at line 111 of file StrokeIterators.h.

References increment(), and ret.

◆ operator--() [1/2]

virtual StrokeVertexIterator & Freestyle::StrokeInternal::StrokeVertexIterator::operator-- ( )
inlinevirtual

Decrements. In the scripting language, call "decrement()".

Definition at line 119 of file StrokeIterators.h.

References decrement().

◆ operator--() [2/2]

virtual StrokeVertexIterator Freestyle::StrokeInternal::StrokeVertexIterator::operator-- ( int )
inlinevirtual

Decrements. In the scripting language, call "decrement()".

Definition at line 126 of file StrokeIterators.h.

References decrement(), and ret.

◆ operator->()

virtual StrokeVertex * Freestyle::StrokeInternal::StrokeVertexIterator::operator-> ( )
inlinevirtual

Returns a pointer to the pointed StrokeVertex. Can't be called in the scripting language.

Reimplemented from Freestyle::Interface0DIteratorNested.

Definition at line 98 of file StrokeIterators.h.

References operator*().

◆ operator=()

StrokeVertexIterator & Freestyle::StrokeInternal::StrokeVertexIterator::operator= ( const StrokeVertexIterator & vi)
inline

operator=

Attention
In the scripting language, you must call instead of
it2 = it1
where it1 and it2 are 2 StrokeVertexIterator. Otherwise, incrementing it1 will also increment it2.

Definition at line 73 of file StrokeIterators.h.

◆ operator==()

virtual bool Freestyle::StrokeInternal::StrokeVertexIterator::operator== ( const Interface0DIteratorNested & it) const
inlinevirtual

operator ==

Implements Freestyle::Interface0DIteratorNested.

Definition at line 173 of file StrokeIterators.h.

◆ t()

virtual float Freestyle::StrokeInternal::StrokeVertexIterator::t ( ) const
inlinevirtual

Returns the curvilinear abscissa of the current point

Implements Freestyle::Interface0DIteratorNested.

Definition at line 183 of file StrokeIterators.h.

◆ u()

virtual float Freestyle::StrokeInternal::StrokeVertexIterator::u ( ) const
inlinevirtual

Returns the point's parameter in the stroke

Implements Freestyle::Interface0DIteratorNested.

Definition at line 189 of file StrokeIterators.h.


The documentation for this class was generated from the following file: