Exemplo n.º 1
0
bool doReconstruct()
{
	//invalid parameters
	if (!s_cloud || !s_mesh)
		return false;

	ccPointStream<PointCoordinateType> pointStream(s_cloud);

	return PoissonReconLib::Reconstruct(s_params, &pointStream, *s_mesh);
}
Exemplo n.º 2
0
bool doReconstructWithColors()
{
	//invalid parameters
	if (!s_cloud || !s_coloredMesh || !s_cloud->hasColors())
	{
		return false;
	}

	ccColoredPointStream<PointCoordinateType> pointStream(s_cloud);
	return PoissonReconLib::Reconstruct(s_params, &pointStream, *s_coloredMesh);
}
Exemplo n.º 3
0
AnyType::operator PointType()
{
	if(type == TypePoint)
	{
		return PointType(*(value.pt));
	}
	else if(type == TypeString)
	{
		std::stringstream pointStream(*(value.str));
		int x, y;
		char comma;
		pointStream >> x >> comma >> y;
		if (pointStream.fail() || comma != ',')
			throw InvalidConversionException(type, TypePoint);
		return PointType(ui::Point(x, y));
	}