void
SoXipOverlayExtractContour::evaluate()
{
	SoMFVec3f pointTmp;
	SoMFInt32 coordIndexTmp;

	for( int i = 0; i < overlays.getNum(); ++ i )
	{
		SoXipShapeList* shapeList = (SoXipShapeList *) overlays[i];
		if( !shapeList )
		{
			SoDebugError::post( __FILE__, "Warning. Should not have NULL pointer in list of overlays" );
			continue ;
		}

		int numShapes = shapeList->getNumChildren();
		for( int j = 0; j < numShapes; ++ j )
		{
			SoXipManipulableShape* shape = (SoXipManipulableShape *) shapeList->getChild(j);
			if( !shape )
			{
				SoDebugError::post( __FILE__, "Warning. Should not have NULL pointer in list of overlays" );
				continue ;
			}

			appendContour( shape, pointTmp, coordIndexTmp );
		}
	}

	SO_ENGINE_OUTPUT( point, SoMFVec3f, copyFrom( pointTmp ) );
	SO_ENGINE_OUTPUT( coordIndex, SoMFInt32, copyFrom( coordIndexTmp ) );
}
Beispiel #2
0
void Shape2d::append( const Shape2d &shape )
{
	for( vector<Path2d>::const_iterator pathIt = shape.getContours().begin(); pathIt != shape.getContours().end(); ++pathIt )
		appendContour( *pathIt );
}