本文整理汇总了C++中PNS_LINE::PointCount方法的典型用法代码示例。如果您正苦于以下问题:C++ PNS_LINE::PointCount方法的具体用法?C++ PNS_LINE::PointCount怎么用?C++ PNS_LINE::PointCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PNS_LINE
的用法示例。
在下文中一共展示了PNS_LINE::PointCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: simplifyNewLine
void PNS_LINE_PLACER::simplifyNewLine( PNS_NODE* aNode, PNS_SEGMENT* aLatest )
{
PNS_LINE l = aNode->AssembleLine( aLatest );
SHAPE_LINE_CHAIN simplified( l.CLine() );
simplified.Simplify();
if( simplified.PointCount() != l.PointCount() )
{
PNS_LINE lnew( l );
aNode->Remove( &l );
lnew.SetShape( simplified );
aNode->Add( &lnew );
}
}
示例2: SimplifyLine
bool PNS_TOPOLOGY::SimplifyLine( PNS_LINE* aLine )
{
if( !aLine->LinkedSegments() || !aLine->SegmentCount() )
return false;
PNS_SEGMENT* root = ( *aLine->LinkedSegments() )[0];
PNS_LINE l = m_world->AssembleLine( root );
SHAPE_LINE_CHAIN simplified( l.CLine() );
simplified.Simplify();
if( simplified.PointCount() != l.PointCount() )
{
PNS_LINE lnew( l );
m_world->Remove( &l );
lnew.SetShape( simplified );
m_world->Add( &lnew );
return true;
}
return false;
}
示例3: Move
bool PNS_LINE_PLACER::Move( const VECTOR2I& aP, PNS_ITEM* aEndItem )
{
PNS_LINE current;
VECTOR2I p = aP;
int eiDepth = -1;
if( aEndItem && aEndItem->Owner() )
eiDepth = aEndItem->Owner()->Depth();
if( m_lastNode )
{
delete m_lastNode;
m_lastNode = NULL;
}
route( p );
current = Trace();
if( !current.PointCount() )
m_currentEnd = m_p_start;
else
m_currentEnd = current.CLine().CPoint( -1 );
PNS_NODE* latestNode = m_currentNode;
m_lastNode = latestNode->Branch();
if( eiDepth >= 0 && aEndItem && latestNode->Depth() > eiDepth &&
current.SegmentCount() )
{
splitAdjacentSegments( m_lastNode, aEndItem, current.CPoint( -1 ) );
if( Settings().RemoveLoops() )
removeLoops( m_lastNode, ¤t );
}
updateLeadingRatLine();
return true;
}