我正在使用CGAL三角网格参数化进行测试,但是我遇到了一些错误,第一次使用cgal时,我无法弄清楚导致错误的原因。
我收到错误:CGAL / Parameterizer_traits_3.h(203):错误C2106:'=':左操作数必须为l值
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Polyhedron_incremental_builder_3.h>
#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
#include <CGAL/parameterize.h>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
void Process()
{
TArray<FProcMeshVertex> tempVertices;
FProcMeshVertex vert0; vert0.Position = FVector(-50, 1, -50);
FProcMeshVertex vert1; vert1.Position = FVector(-50, 1, 50);
FProcMeshVertex vert2; vert2.Position = FVector( 50, 1, 50);
FProcMeshVertex vert3; vert3.Position = FVector( 50, 1, -50);
tempVertices.Push(vert0); tempVertices.Push(vert1); tempVertices.Push(vert2); tempVertices.Push(vert3);
TArray<int32> tempIndices;
tempIndices.Push(0); tempIndices.Push(1); tempIndices.Push(2);
tempIndices.Push(0); tempIndices.Push(2); tempIndices.Push(3);
Polyhedron poly;
TriangleBuilder<HalfedgeDS> triangle(tempVertices, tempIndices);
poly.delegate(triangle);
CGAL_assertion(poly.is_triangle(poly.halfedges_begin()));
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron> Parameterization_polyhedron_adaptor;
Parameterization_polyhedron_adaptor mesh_adaptor(poly);
typedef CGAL::Parameterizer_traits_3<Parameterization_polyhedron_adaptor> Parameterizer; // Type that defines the error codes
Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor);
}