Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
ClipperLib::PolyNode Class Reference

#include <src/clipper/clipper.hpp>

+ Inheritance diagram for ClipperLib::PolyNode:
+ Collaboration diagram for ClipperLib::PolyNode:

Public Member Functions

 PolyNode ()
 
virtual ~PolyNode ()
 
PolyNodeGetNext () const
 
bool IsHole () const
 
bool IsOpen () const
 
int ChildCount () const
 

Public Attributes

Path Contour
 
PolyNodes Childs
 
PolyNodeParent
 

Private Member Functions

PolyNodeGetNextSiblingUp () const
 
void AddChild (PolyNode &child)
 

Private Attributes

unsigned Index
 
bool m_IsOpen
 
JoinType m_jointype
 
EndType m_endtype
 

Friends

class Clipper
 
class ClipperOffset
 
class PolyTree
 

Detailed Description

Constructor & Destructor Documentation

◆ PolyNode()

ClipperLib::PolyNode::PolyNode ( )
inline
147: Childs(), Parent(0), Index(0), m_IsOpen(false) {}
bool m_IsOpen
Definition clipper.hpp:159
PolyNodes Childs
Definition clipper.hpp:150
PolyNode * Parent
Definition clipper.hpp:151
unsigned Index
Definition clipper.hpp:158

Referenced by Slic3r::sla::anonymous_namespace{Pad.cpp}::divide_blueprint().

+ Here is the caller graph for this function:

◆ ~PolyNode()

virtual ClipperLib::PolyNode::~PolyNode ( )
inlinevirtual
148{};

Member Function Documentation

◆ AddChild()

void ClipperLib::PolyNode::AddChild ( PolyNode child)
private
113{
114 unsigned cnt = (unsigned)Childs.size();
115 Childs.emplace_back(&child);
116 child.Parent = this;
117 child.Index = cnt;
118}

References Index, and Parent.

Referenced by ClipperLib::ClipperOffset::AddPath(), and ClipperLib::Clipper::BuildResult2().

+ Here is the caller graph for this function:

◆ ChildCount()

int ClipperLib::PolyNode::ChildCount ( ) const
inline

◆ GetNext()

PolyNode * ClipperLib::PolyNode::GetNext ( ) const
inline
153{ return Childs.empty() ? GetNextSiblingUp() : Childs.front(); }
PolyNode * GetNextSiblingUp() const
Definition clipper.hpp:162
TPoint< P > front(const P &p)
Definition geometry_traits.hpp:872

◆ GetNextSiblingUp()

PolyNode * ClipperLib::PolyNode::GetNextSiblingUp ( ) const
inlineprivate
162{ return Parent ? ((Index == Parent->Childs.size() - 1) ? Parent->GetNextSiblingUp() : Parent->Childs[Index + 1]) : nullptr; }

References Childs, and GetNextSiblingUp().

Referenced by GetNextSiblingUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsHole()

bool ClipperLib::PolyNode::IsHole ( ) const
123{
124 bool result = true;
125 PolyNode* node = Parent;
126 while (node)
127 {
128 result = !result;
129 node = node->Parent;
130 }
131 return result;
132}
PolyNode()
Definition clipper.hpp:147

References Parent.

Referenced by Slic3r::traverse_pt(), and Slic3r::traverse_pt_noholes().

+ Here is the caller graph for this function:

◆ IsOpen()

bool ClipperLib::PolyNode::IsOpen ( ) const
inline
155{ return m_IsOpen; }

Referenced by ClipperLib::AddPolyNodeToPaths().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ Clipper

friend class Clipper
friend

◆ ClipperOffset

friend class ClipperOffset
friend

◆ PolyTree

friend class PolyTree
friend

Member Data Documentation

◆ Childs

◆ Contour

◆ Index

unsigned ClipperLib::PolyNode::Index
private

◆ m_endtype

◆ m_IsOpen

bool ClipperLib::PolyNode::m_IsOpen
private

◆ m_jointype

JoinType ClipperLib::PolyNode::m_jointype
private

◆ Parent


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