Blender  V3.3
Public Types | Public Member Functions | Protected Attributes | List of all members
Freestyle::Curve Class Reference

#include <Curve.h>

Inheritance diagram for Freestyle::Curve:
Freestyle::Interface1D Freestyle::Chain

Public Types

typedef CurvePoint Vertex
 
typedef CurvePoint Point
 
typedef Point point_type
 
typedef Vertex vertex_type
 
typedef deque< Vertex * > vertex_container
 
typedef CurveInternal::__point_iterator< CurveInternal::CurvePoint_nonconst_traitspoint_iterator
 
typedef CurveInternal::__point_iterator< CurveInternal::CurvePoint_const_traitsconst_point_iterator
 
typedef point_iterator vertex_iterator
 
typedef const_point_iterator const_vertex_iterator
 

Public Member Functions

 Curve ()
 
 Curve (const Id &id)
 
 Curve (const Curve &iBrother)
 
virtual ~Curve ()
 
virtual string getExactTypeName () const
 
void push_vertex_back (Vertex *iVertex)
 
void push_vertex_back (SVertex *iVertex)
 
void push_vertex_front (Vertex *iVertex)
 
void push_vertex_front (SVertex *iVertex)
 
bool empty () const
 
real getLength2D () const
 
virtual Id getId () const
 
unsigned int nSegments () const
 
void setId (const Id &id)
 
point_iterator points_begin (float step=0)
 
const_point_iterator points_begin (float step=0) const
 
point_iterator points_end (float step=0)
 
const_point_iterator points_end (float step=0) const
 
point_iterator vertices_begin ()
 
const_point_iterator vertices_begin () const
 
point_iterator vertices_end ()
 
const_point_iterator vertices_end () const
 
CurveInternal::CurvePointIterator curvePointsBegin (float t=0.0f)
 
CurveInternal::CurvePointIterator curvePointsEnd (float t=0.0f)
 
CurveInternal::CurvePointIterator curveVerticesBegin ()
 
CurveInternal::CurvePointIterator curveVerticesEnd ()
 
virtual Interface0DIterator verticesBegin ()
 
virtual Interface0DIterator verticesEnd ()
 
virtual Interface0DIterator pointsBegin (float t=0.0f)
 
virtual Interface0DIterator pointsEnd (float t=0.0f)
 
- Public Member Functions inherited from Freestyle::Interface1D
 Interface1D ()
 
virtual ~Interface1D ()
 
virtual Nature::EdgeNature getNature () const
 
virtual unsigned getTimeStamp () const
 
void setTimeStamp (unsigned iTimeStamp)
 

Protected Attributes

vertex_container _Vertices
 
double _Length
 
Id _Id
 
unsigned _nSegments
 
- Protected Attributes inherited from Freestyle::Interface1D
unsigned _timeStamp
 

Detailed Description

Base class for curves made of CurvePoints. SVertex is the type of the initial curve vertices. A Chain is a specialization of a Curve.

Definition at line 361 of file Curve.h.

Member Typedef Documentation

◆ const_point_iterator

typedef CurveInternal::__point_iterator<CurveInternal::CurvePoint_const_traits> Freestyle::Curve::const_point_iterator

Definition at line 374 of file Curve.h.

◆ const_vertex_iterator

typedef const_point_iterator Freestyle::Curve::const_vertex_iterator

Definition at line 376 of file Curve.h.

◆ Point

typedef CurvePoint Freestyle::Curve::Point

Definition at line 364 of file Curve.h.

◆ point_iterator

Definition at line 372 of file Curve.h.

◆ point_type

typedef Point Freestyle::Curve::point_type

Definition at line 365 of file Curve.h.

◆ Vertex

typedef CurvePoint Freestyle::Curve::Vertex

Definition at line 363 of file Curve.h.

◆ vertex_container

typedef deque<Vertex *> Freestyle::Curve::vertex_container

Definition at line 367 of file Curve.h.

◆ vertex_iterator

typedef point_iterator Freestyle::Curve::vertex_iterator

Definition at line 375 of file Curve.h.

◆ vertex_type

typedef Vertex Freestyle::Curve::vertex_type

Definition at line 366 of file Curve.h.

Constructor & Destructor Documentation

◆ Curve() [1/3]

Freestyle::Curve::Curve ( )
inline

Default Constructor.

Definition at line 386 of file Curve.h.

◆ Curve() [2/3]

Freestyle::Curve::Curve ( const Id id)
inline

Builds a Curve from its id

Definition at line 394 of file Curve.h.

References id.

◆ Curve() [3/3]

Freestyle::Curve::Curve ( const Curve iBrother)
inline

Copy Constructor.

Definition at line 402 of file Curve.h.

References _Id, _Length, and _Vertices.

◆ ~Curve()

Curve::~Curve ( )
virtual

Destructor.

Definition at line 551 of file Curve.cpp.

References _Vertices.

Member Function Documentation

◆ curvePointsBegin()

CurveInternal::CurvePointIterator Curve::curvePointsBegin ( float  t = 0.0f)

Definition at line 630 of file Curve.cpp.

References _Length, _nSegments, _Vertices, and t.

Referenced by Freestyle::__recursiveSplit(), and curveVerticesBegin().

◆ curvePointsEnd()

CurveInternal::CurvePointIterator Curve::curvePointsEnd ( float  t = 0.0f)

Definition at line 646 of file Curve.cpp.

References _Length, _nSegments, _Vertices, and t.

Referenced by Freestyle::__recursiveSplit(), and curveVerticesEnd().

◆ curveVerticesBegin()

CurveInternal::CurvePointIterator Curve::curveVerticesBegin ( )

Definition at line 662 of file Curve.cpp.

References curvePointsBegin().

Referenced by Freestyle::__recursiveSplit().

◆ curveVerticesEnd()

CurveInternal::CurvePointIterator Curve::curveVerticesEnd ( )

Definition at line 667 of file Curve.cpp.

References curvePointsEnd().

Referenced by Freestyle::__recursiveSplit().

◆ empty()

bool Freestyle::Curve::empty ( ) const
inline

Returns true is the Curve doesn't have any Vertex yet.

Definition at line 473 of file Curve.h.

◆ getExactTypeName()

virtual string Freestyle::Curve::getExactTypeName ( ) const
inlinevirtual

Returns the string "Curve"

Reimplemented from Freestyle::Interface1D.

Reimplemented in Freestyle::Chain.

Definition at line 414 of file Curve.h.

◆ getId()

virtual Id Freestyle::Curve::getId ( ) const
inlinevirtual

Returns the Id of the 1D element.

Reimplemented from Freestyle::Interface1D.

Definition at line 485 of file Curve.h.

Referenced by Freestyle::__recursiveSplit().

◆ getLength2D()

real Freestyle::Curve::getLength2D ( ) const
inlinevirtual

Returns the 2D length of the Curve.

Reimplemented from Freestyle::Interface1D.

Definition at line 479 of file Curve.h.

Referenced by Freestyle::__recursiveSplit().

◆ nSegments()

unsigned int Freestyle::Curve::nSegments ( ) const
inline

Returns the number of segments in the polyline constituting the Curve.

Definition at line 491 of file Curve.h.

Referenced by Freestyle::__recursiveSplit(), and Freestyle::Operators::sequentialSplit().

◆ points_begin() [1/2]

Curve::point_iterator Curve::points_begin ( float  step = 0)

iterators access

Definition at line 563 of file Curve.cpp.

References _nSegments, and _Vertices.

Referenced by vertices_begin().

◆ points_begin() [2/2]

Curve::const_point_iterator Curve::points_begin ( float  step = 0) const

Definition at line 572 of file Curve.cpp.

References _nSegments, and _Vertices.

◆ points_end() [1/2]

Curve::point_iterator Curve::points_end ( float  step = 0)

Definition at line 581 of file Curve.cpp.

References _Length, _nSegments, and _Vertices.

Referenced by vertices_end().

◆ points_end() [2/2]

Curve::const_point_iterator Curve::points_end ( float  step = 0) const

Definition at line 594 of file Curve.cpp.

References _Length, _nSegments, and _Vertices.

◆ pointsBegin()

Interface0DIterator Curve::pointsBegin ( float  t = 0.0f)
virtual

Returns an Interface0DIterator pointing onto the first point of the Curve and that can iterate over the points of the Curve at any resolution. At each iteration a virtual temporary CurvePoint is created.

Reimplemented from Freestyle::Interface1D.

Definition at line 672 of file Curve.cpp.

References _Length, _nSegments, _Vertices, ret, and t.

Referenced by verticesBegin().

◆ pointsEnd()

Interface0DIterator Curve::pointsEnd ( float  t = 0.0f)
virtual

Returns an Interface0DIterator pointing after the last point of the Curve and that can iterate over the points of the Curve at any resolution. At each iteration a virtual temporary CurvePoint is created.

Reimplemented from Freestyle::Interface1D.

Definition at line 689 of file Curve.cpp.

References _Length, _nSegments, _Vertices, ret, and t.

Referenced by verticesEnd().

◆ push_vertex_back() [1/2]

void Freestyle::Curve::push_vertex_back ( SVertex iVertex)
inline

Adds a single vertex (SVertex) at the end of the Curve

Definition at line 437 of file Curve.h.

References Freestyle::VecMat::Vec< T, N >::norm(), and Freestyle::SVertex::point2d().

◆ push_vertex_back() [2/2]

void Freestyle::Curve::push_vertex_back ( Vertex iVertex)
inline

◆ push_vertex_front() [1/2]

void Freestyle::Curve::push_vertex_front ( SVertex iVertex)
inline

Adds a single vertex (SVertex) at the front of the Curve

Definition at line 461 of file Curve.h.

References Freestyle::VecMat::Vec< T, N >::norm(), and Freestyle::SVertex::point2d().

◆ push_vertex_front() [2/2]

void Freestyle::Curve::push_vertex_front ( Vertex iVertex)
inline

Adds a single vertex (CurvePoint) at the front of the Curve

Definition at line 449 of file Curve.h.

References Freestyle::VecMat::Vec< T, N >::norm(), and Freestyle::CurvePoint::point2d().

Referenced by Freestyle::Chain::push_viewedge_front().

◆ setId()

void Freestyle::Curve::setId ( const Id id)
inline

Definition at line 496 of file Curve.h.

References id.

◆ vertices_begin() [1/2]

Curve::point_iterator Curve::vertices_begin ( )

Definition at line 609 of file Curve.cpp.

References points_begin().

◆ vertices_begin() [2/2]

Curve::const_point_iterator Curve::vertices_begin ( ) const

Definition at line 614 of file Curve.cpp.

References points_begin().

◆ vertices_end() [1/2]

Curve::point_iterator Curve::vertices_end ( )

Definition at line 619 of file Curve.cpp.

References points_end().

◆ vertices_end() [2/2]

Curve::const_point_iterator Curve::vertices_end ( ) const

Definition at line 624 of file Curve.cpp.

References points_end().

◆ verticesBegin()

Interface0DIterator Curve::verticesBegin ( )
virtual

Returns an Interface0DIterator pointing onto the first vertex of the Curve and that can iterate over the vertices of the Curve.

Reimplemented from Freestyle::Interface1D.

Definition at line 706 of file Curve.cpp.

References pointsBegin().

◆ verticesEnd()

Interface0DIterator Curve::verticesEnd ( )
virtual

Returns an Interface0DIterator pointing after the last vertex of the Curve and that can iterate over the vertices of the Curve.

Reimplemented from Freestyle::Interface1D.

Definition at line 711 of file Curve.cpp.

References pointsEnd().

Member Data Documentation

◆ _Id

Id Freestyle::Curve::_Id
protected

Definition at line 381 of file Curve.h.

Referenced by Curve(), and Freestyle::Chain::~Chain().

◆ _Length

double Freestyle::Curve::_Length
protected

Definition at line 380 of file Curve.h.

Referenced by Curve(), curvePointsBegin(), curvePointsEnd(), points_end(), pointsBegin(), and pointsEnd().

◆ _nSegments

unsigned Freestyle::Curve::_nSegments
protected

◆ _Vertices

vertex_container Freestyle::Curve::_Vertices
protected

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