Repository: Scrawk/CGALDotNet
Branch: master
Commit: c8012c4dd4d3
Files: 518
Total size: 4.9 MB
Directory structure:
gitextract_jbq1twz1/
├── .editorconfig
├── .gitattributes
├── .gitignore
├── Binaries/
│ ├── CGALDotNet.pdb
│ ├── CGALDotNet.xml
│ ├── CGALDotNetGeometry.pdb
│ └── CGALDotNetGeometry.xml
├── CGALDotNet/
│ ├── Arrangements/
│ │ ├── ArrFace2.cs
│ │ ├── ArrHalfEdge2.cs
│ │ ├── ArrQuery.cs
│ │ ├── ArrVertex2.cs
│ │ ├── Arrangement2.cs
│ │ ├── ArrangementKernel2.cs
│ │ ├── ArrangementKernel2_EEK.cs
│ │ ├── SweepLine.cs
│ │ ├── SweepLineKernel.cs
│ │ ├── SweepLineKernel_EEK.cs
│ │ └── SweepLineKernel_EIK.cs
│ ├── CGALDotNet.csproj
│ ├── CGALDotNet.xml
│ ├── CGALGlobal.cs
│ ├── CGALKernel.cs
│ ├── CGALObject.cs
│ ├── CGALObjectKernel.cs
│ ├── Collections/
│ │ └── NativeList.cs
│ ├── Eigen/
│ │ ├── EigenColumnVector.cs
│ │ ├── EigenMatrix.cs
│ │ ├── EigenRowVector.cs
│ │ └── EigenVector.cs
│ ├── Extensions/
│ │ ├── ArrayExtensions.cs
│ │ ├── EnumExtensions.cs
│ │ └── PrimativeExtensions.cs
│ ├── Geometry/
│ │ ├── Box2.cs
│ │ ├── CGALIntersections_Geometry_EEK.cs
│ │ ├── CGALIntersections_Geometry_EIK.cs
│ │ ├── CGALIntersections_Shapes.cs
│ │ ├── GeometryKernel2.cs
│ │ ├── GeometryKernel2_EEK.cs
│ │ ├── GeometryKernel2_EIK.cs
│ │ ├── HPoint2.cs
│ │ ├── IntersectionResult2d.cs
│ │ ├── Line2.cs
│ │ ├── Point2.cs
│ │ ├── Ray2.cs
│ │ ├── Segment2.cs
│ │ ├── Triangle2.cs
│ │ └── Vector2.cs
│ ├── Hulls/
│ │ ├── ConvexHull2.cs
│ │ ├── ConvexHull3.cs
│ │ ├── ConvexHullKernel2.cs
│ │ ├── ConvexHullKernel2_EEK.cs
│ │ ├── ConvexHullKernel2_EIK.cs
│ │ ├── ConvexHullKernel3.cs
│ │ ├── ConvexHullKernel3_EEK.cs
│ │ └── ConvexHullKernel3_EIK.cs
│ ├── Meshing/
│ │ ├── ConformingTriangulation2.cs
│ │ ├── ConformingTriangulationKernel2.cs
│ │ ├── ConformingTriangulationKernel2_EEK.cs
│ │ ├── ConformingTriangulationKernel2_EIK.cs
│ │ ├── SkinSurfaceMeshing.cs
│ │ ├── SkinSurfaceMeshingKernel.cs
│ │ ├── SkinSurfaceMeshingKernel_EEK.cs
│ │ ├── TetrahedralRemeshing.cs
│ │ ├── TetrahedralRemeshingKernel.cs
│ │ └── TetrahedralRemeshingKernel_EEK.cs
│ ├── Polygons/
│ │ ├── Polygon2.cs
│ │ ├── PolygonAlgorithm.cs
│ │ ├── PolygonBoolean2.cs
│ │ ├── PolygonBooleanKernel2.cs
│ │ ├── PolygonBooleanKernel2_EEK.cs
│ │ ├── PolygonBooleanKernel2_EIK.cs
│ │ ├── PolygonFactory.cs
│ │ ├── PolygonKernel2.cs
│ │ ├── PolygonKernel2_EEK.cs
│ │ ├── PolygonKernel2_EIK.cs
│ │ ├── PolygonMinkowski.cs
│ │ ├── PolygonMinkowskiKernel.cs
│ │ ├── PolygonMinkowskiKernel_EEK.cs
│ │ ├── PolygonMinkowskiKernel_EIK.cs
│ │ ├── PolygonOffset2.cs
│ │ ├── PolygonOffsetKernel2.cs
│ │ ├── PolygonOffsetKernel2_EEK.cs
│ │ ├── PolygonOffsetKernel2_EIK.cs
│ │ ├── PolygonPartition2.cs
│ │ ├── PolygonPartitionKernel2.cs
│ │ ├── PolygonPartitionKernel2_EEK.cs
│ │ ├── PolygonPartitionKernel2_EIK.cs
│ │ ├── PolygonSimplification2.cs
│ │ ├── PolygonSimplificationKernel2.cs
│ │ ├── PolygonSimplificationKernel2_EEK.cs
│ │ ├── PolygonSimplificationKernel2_EIK.cs
│ │ ├── PolygonVisibility.cs
│ │ ├── PolygonVisibilityKernel.cs
│ │ ├── PolygonVisibilityKernel_EEK.cs
│ │ ├── PolygonVisibilityKernel_EIK.cs
│ │ ├── PolygonWithHoles2.cs
│ │ ├── PolygonWithHolesKernel2.cs
│ │ ├── PolygonWithHolesKernel2_EEK.cs
│ │ └── PolygonWithHolesKernel2_EIK.cs
│ ├── Polyhedra/
│ │ ├── IMesh.cs
│ │ ├── MeshFace3.cs
│ │ ├── MeshFactory.cs
│ │ ├── MeshHalfedge3.cs
│ │ ├── MeshHitResult.cs
│ │ ├── MeshVertex3.cs
│ │ ├── NefPolyhedron3.cs
│ │ ├── NefPolyhedronKernel3.cs
│ │ ├── NefPolyhedronKernel3_EEK.cs
│ │ ├── NefPolyhedronKernel3_EIK.cs
│ │ ├── PolygonalCount.cs
│ │ ├── PolygonalIndices.cs
│ │ ├── PolyhedraAlgorithm.cs
│ │ ├── Polyhedron3.cs
│ │ ├── PolyhedronFactory.cs
│ │ ├── PolyhedronKernel3.cs
│ │ ├── PolyhedronKernel3_EEK.cs
│ │ ├── PolyhedronKernel3_EIK.cs
│ │ ├── SurfaceMesh3.cs
│ │ ├── SurfaceMeshFactory.cs
│ │ ├── SurfaceMeshKernel3.cs
│ │ ├── SurfaceMeshKernel3_EEK.cs
│ │ └── SurfaceMeshKernel3_EIK.cs
│ ├── Polylines/
│ │ ├── Polyline2.cs
│ │ ├── Polyline3.cs
│ │ ├── PolylineKernel2.cs
│ │ ├── PolylineKernel2_EEK.cs
│ │ ├── PolylineKernel2_EIK.cs
│ │ ├── PolylineKernel3.cs
│ │ ├── PolylineKernel3_EEK.cs
│ │ └── PolylineKernel3_EIK.cs
│ ├── Processing/
│ │ ├── HeatMethod.cs
│ │ ├── HeatMethodKernel.cs
│ │ ├── HeatMethodKernel_EEK.cs
│ │ ├── HeatMethodKernel_EIK.cs
│ │ ├── MeshProcessingBoolean.cs
│ │ ├── MeshProcessingBooleanKernel.cs
│ │ ├── MeshProcessingBooleanKernel_EEK.cs
│ │ ├── MeshProcessingBooleanKernel_EIK.cs
│ │ ├── MeshProcessingConnections.cs
│ │ ├── MeshProcessingConnectionsKernel.cs
│ │ ├── MeshProcessingConnectionsKernel_EEK.cs
│ │ ├── MeshProcessingConnectionsKernel_EIK.cs
│ │ ├── MeshProcessingFeatures.cs
│ │ ├── MeshProcessingFeaturesKernel.cs
│ │ ├── MeshProcessingFeaturesKernel_EEK.cs
│ │ ├── MeshProcessingFeaturesKernel_EIK.cs
│ │ ├── MeshProcessingLocate.cs
│ │ ├── MeshProcessingLocateKernel.cs
│ │ ├── MeshProcessingLocateKernel_EEK.cs
│ │ ├── MeshProcessingLocateKernel_EIK.cs
│ │ ├── MeshProcessingMeshing.cs
│ │ ├── MeshProcessingMeshingKernel.cs
│ │ ├── MeshProcessingMeshingKernel_EEK.cs
│ │ ├── MeshProcessingMeshingKernel_EIK.cs
│ │ ├── MeshProcessingOrientation.cs
│ │ ├── MeshProcessingOrientationKernel.cs
│ │ ├── MeshProcessingOrientationKernel_EEK.cs
│ │ ├── MeshProcessingOrientationKernel_EIK.cs
│ │ ├── MeshProcessingRepair.cs
│ │ ├── MeshProcessingRepairKernel.cs
│ │ ├── MeshProcessingRepairKernel_EEK.cs
│ │ ├── MeshProcessingRepairKernel_EIK.cs
│ │ ├── MeshProcessingSlicer.cs
│ │ ├── MeshProcessingSlicerKernel.cs
│ │ ├── MeshProcessingSlicerKernel_EEK.cs
│ │ ├── MeshProcessingSlicerKernel_EIK.cs
│ │ ├── SurfaceSimplification.cs
│ │ ├── SurfaceSimplificationKernel.cs
│ │ ├── SurfaceSimplificationKernel_EIK.cs
│ │ ├── SurfaceSubdivision.cs
│ │ ├── SurfaceSubdivisionKernel.cs
│ │ ├── SurfaceSubdivisionKernel_EEK.cs
│ │ └── SurfaceSubdivisionKernel_EIK.cs
│ ├── Properties/
│ │ └── launchSettings.json
│ ├── Triangulations/
│ │ ├── BaseTriangulation2.cs
│ │ ├── BaseTriangulation3.cs
│ │ ├── BaseTriangulationKernel2.cs
│ │ ├── BaseTriangulationKernel3.cs
│ │ ├── ConstrainedDelaunayTriangulation2.cs
│ │ ├── ConstrainedDelaunayTriangulationKernel2.cs
│ │ ├── ConstrainedDelaunayTriangulationKernel2_EEK.cs
│ │ ├── ConstrainedDelaunayTriangulationKernel2_EIK.cs
│ │ ├── ConstrainedTriangulation2.cs
│ │ ├── ConstrainedTriangulationKernel2.cs
│ │ ├── ConstrainedTriangulationKernel2_EEK.cs
│ │ ├── ConstrainedTriangulationKernel2_EIK.cs
│ │ ├── DelaunayTriangulation2.cs
│ │ ├── DelaunayTriangulation3.cs
│ │ ├── DelaunayTriangulationKernel2.cs
│ │ ├── DelaunayTriangulationKernel2_EEK.cs
│ │ ├── DelaunayTriangulationKernel2_EIK.cs
│ │ ├── DelaunayTriangulationKernel3.cs
│ │ ├── DelaunayTriangulationKernel3_EEK.cs
│ │ ├── TriCell3.cs
│ │ ├── TriEdge2.cs
│ │ ├── TriFace2.cs
│ │ ├── TriVertex2.cs
│ │ ├── TriVertex3.cs
│ │ ├── Triangulation2.cs
│ │ ├── Triangulation3.cs
│ │ ├── TriangulationKernel2.cs
│ │ ├── TriangulationKernel2_EEK.cs
│ │ ├── TriangulationKernel2_EIK.cs
│ │ ├── TriangulationKernel3.cs
│ │ └── TriangulationKernel3_EEK.cs
│ └── Util/
│ ├── ArrayCache.cs
│ ├── CGALEnums.cs
│ └── ErrorUtil.cs
├── CGALDotNet.sln
├── CGALDotNetConsole/
│ ├── CGALDotNetConsole.csproj
│ ├── Program.cs
│ ├── Properties/
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ └── launchSettings.json
│ └── Timer.cs
├── CGALDotNetTest/
│ ├── AssertX.cs
│ ├── CGALDotNetTest.csproj
│ ├── CGALGlobalTest.cs
│ ├── Eigen/
│ │ └── EigenMatrix_Test.cs
│ ├── Geometry/
│ │ ├── Box2_EEK_Test.cs
│ │ ├── Box2_EIK_Test.cs
│ │ ├── HPoint2_EEK_Test.cs
│ │ ├── HPoint2_EIK_Test.cs
│ │ ├── Line2_EIK_Test.cs
│ │ ├── Point2_EEK_Test.cs
│ │ ├── Point2_EIK_Test.cs
│ │ ├── Ray2_EIK_Test.cs
│ │ ├── Segment2_EIK_Test.cs
│ │ ├── Triangle2_EIK_Test.cs
│ │ ├── Vector2_EEK_Test.cs
│ │ └── Vector2_EIK_Test.cs
│ ├── Polygons/
│ │ ├── Polygon2_EEK_Test.cs
│ │ ├── Polygon2_EIK_Test.cs
│ │ ├── PolygonWithHoles2_EEK_Test.cs
│ │ └── PolygonWithHoles2_EIK_Test.cs
│ ├── Polyhedra/
│ │ ├── Polyhedron3_EEK_Test.cs
│ │ └── SurfaceMesh3_EEK_Test.cs
│ └── Processing/
│ ├── MeshProcessingConnectionsPolyhedronTest.cs
│ ├── MeshProcessingConnectionsSurfaceMeshTest.cs
│ ├── MeshProcessingFeaturesPolyhedronTest.cs
│ ├── MeshProcessingFeaturesSurfaceMeshTest.cs
│ ├── MeshProcessingLocatePolyhedronTest.cs
│ ├── MeshProcessingLocateSurfaceMeshTest.cs
│ ├── MeshProcessingMeshingPolyhedronTest.cs
│ ├── MeshProcessingMeshingSurfaceMeshTest.cs
│ ├── MeshProcessingOrientationPolyhedronTest.cs
│ ├── MeshProcessingOrientationSurfaceMeshTest.cs
│ ├── MeshProcessingRepairPolyhedronTest.cs
│ └── MeshProcessingRepairSurfaceMeshTest.cs
├── CGALWrapper/
│ ├── Arrangments/
│ │ ├── ArrFace2.h
│ │ ├── ArrHalfEdge2.h
│ │ ├── ArrMultiLocator.h
│ │ ├── ArrVertex2.h
│ │ ├── Arrangement2.h
│ │ ├── Arrangement2_EEK.cpp
│ │ ├── Arrangement2_EEK.h
│ │ ├── ArrangementMap.h
│ │ ├── SweepLine.h
│ │ ├── SweepLine_EEK.cpp
│ │ ├── SweepLine_EEK.h
│ │ ├── SweepLine_EIK.cpp
│ │ └── SweepLine_EIK.h
│ ├── CGALWrapper.h
│ ├── CGALWrapper.rc
│ ├── CGALWrapper.vcxproj
│ ├── CGALWrapper.vcxproj.filters
│ ├── Circlar/
│ │ ├── Circle2.h
│ │ ├── Circle2_EEK.cpp
│ │ └── Circle2_EEK.h
│ ├── Collections/
│ │ ├── IndexMap.h
│ │ ├── NativeList.cpp
│ │ └── NativeList.h
│ ├── Eigen/
│ │ ├── EigenColumnVector.cpp
│ │ ├── EigenColumnVector.h
│ │ ├── EigenMatrix.cpp
│ │ ├── EigenMatrix.h
│ │ ├── EigenRowVector.cpp
│ │ └── EigenRowVector.h
│ ├── Geometry/
│ │ ├── Box2_EEK.cpp
│ │ ├── Box2_EEK.h
│ │ ├── Box2_EIK.cpp
│ │ ├── Box2_EIK.h
│ │ ├── Geometry2.h
│ │ ├── Geometry3.h
│ │ ├── HPoint2_EEK.cpp
│ │ ├── HPoint2_EEK.h
│ │ ├── HPoint2_EIK.cpp
│ │ ├── HPoint2_EIK.h
│ │ ├── Index.h
│ │ ├── IntersectionResult.h
│ │ ├── Intersections_geometry.h
│ │ ├── Intersections_geometry_EEK.cpp
│ │ ├── Intersections_geometry_EEK.h
│ │ ├── Intersections_geometry_EIK.cpp
│ │ ├── Intersections_geometry_EIK.h
│ │ ├── Intersections_shapes.h
│ │ ├── Intersections_shapes_EIK.cpp
│ │ ├── Intersections_shapes_EIK.h
│ │ ├── Line2_EEK.cpp
│ │ ├── Line2_EEK.h
│ │ ├── Line2_EIK.cpp
│ │ ├── Line2_EIK.h
│ │ ├── Matrices.h
│ │ ├── MinMax.h
│ │ ├── Point2_EEK.cpp
│ │ ├── Point2_EEK.h
│ │ ├── Point2_EIK.cpp
│ │ ├── Point2_EIK.h
│ │ ├── Ray2_EEK.cpp
│ │ ├── Ray2_EEK.h
│ │ ├── Ray2_EIK.cpp
│ │ ├── Ray2_EIK.h
│ │ ├── Segment2_EEK.cpp
│ │ ├── Segment2_EEK.h
│ │ ├── Segment2_EIK.cpp
│ │ ├── Segment2_EIK.h
│ │ ├── Triangle2_EEK.cpp
│ │ ├── Triangle2_EEK.h
│ │ ├── Triangle2_EIK.cpp
│ │ ├── Triangle2_EIK.h
│ │ ├── Vector2_EEK.cpp
│ │ ├── Vector2_EEK.h
│ │ ├── Vector2_EIK.cpp
│ │ └── Vector2_EIK.h
│ ├── Hull/
│ │ ├── ConvexHull2.h
│ │ ├── ConvexHull2_EEK.cpp
│ │ ├── ConvexHull2_EEK.h
│ │ ├── ConvexHull2_EIK.cpp
│ │ ├── ConvexHull2_EIK.h
│ │ ├── ConvexHull3.h
│ │ ├── ConvexHull3_EEK.cpp
│ │ ├── ConvexHull3_EEK.h
│ │ ├── ConvexHull3_EIK.cpp
│ │ └── ConvexHull3_EIK.h
│ ├── Meshing/
│ │ ├── ConformingTriangulation2.h
│ │ ├── ConformingTriangulation2_EEK.cpp
│ │ ├── ConformingTriangulation2_EEK.h
│ │ ├── ConformingTriangulation2_EIK.cpp
│ │ ├── ConformingTriangulation2_EIK.h
│ │ ├── SkinSurfaceMeshing_EEK.cpp
│ │ ├── SkinSurfaceMeshing_EEK.h
│ │ ├── SkinSurfaceMesing.h
│ │ ├── TetrahedralRemeshing.h
│ │ ├── TetrahedralRemeshing_EEK.cpp
│ │ └── TetrahedralRemeshing_EEK.h
│ ├── Polygons/
│ │ ├── Polygon2.h
│ │ ├── Polygon2_EEK.cpp
│ │ ├── Polygon2_EEK.h
│ │ ├── Polygon2_EIK.cpp
│ │ ├── Polygon2_EIK.h
│ │ ├── PolygonBoolean2.h
│ │ ├── PolygonBoolean2_EEK.cpp
│ │ ├── PolygonBoolean2_EEK.h
│ │ ├── PolygonBoolean2_EIK.cpp
│ │ ├── PolygonBoolean2_EIK.h
│ │ ├── PolygonMinkowski.h
│ │ ├── PolygonMinkowski_EEK.cpp
│ │ ├── PolygonMinkowski_EEK.h
│ │ ├── PolygonMinkowski_EIK.cpp
│ │ ├── PolygonMinkowski_EIK.h
│ │ ├── PolygonOffset2.h
│ │ ├── PolygonOffset2_EEK.cpp
│ │ ├── PolygonOffset2_EEK.h
│ │ ├── PolygonOffset2_EIK.cpp
│ │ ├── PolygonOffset2_EIK.h
│ │ ├── PolygonPartition2.h
│ │ ├── PolygonPartition2_EEK.cpp
│ │ ├── PolygonPartition2_EEK.h
│ │ ├── PolygonPartition2_EIK.cpp
│ │ ├── PolygonPartition2_EIK.h
│ │ ├── PolygonSimplification2.h
│ │ ├── PolygonSimplification2_EEK.cpp
│ │ ├── PolygonSimplification2_EEK.h
│ │ ├── PolygonSimplification2_EIK.cpp
│ │ ├── PolygonSimplification2_EIK.h
│ │ ├── PolygonVisibility_EEK.cpp
│ │ ├── PolygonVisibility_EEK.h
│ │ ├── PolygonVisibility_EIK.cpp
│ │ ├── PolygonVisibility_EIK.h
│ │ ├── PolygonVisiblity.h
│ │ ├── PolygonWithHoles2.h
│ │ ├── PolygonWithHoles2_EEK.cpp
│ │ ├── PolygonWithHoles2_EEK.h
│ │ ├── PolygonWithHoles2_EIK.cpp
│ │ └── PolygonWithHoles2_EIK.h
│ ├── Polyhedra/
│ │ ├── MeshBuilders.h
│ │ ├── MeshFace3.h
│ │ ├── MeshHalfedge3.h
│ │ ├── MeshHitResult.h
│ │ ├── MeshVertex3.h
│ │ ├── NefPolyhedron3.h
│ │ ├── NefPolyhedron3_EEK.cpp
│ │ ├── NefPolyhedron3_EEK.h
│ │ ├── NefPolyhedron3_EIK.cpp
│ │ ├── NefPolyhedron3_EIK.h
│ │ ├── PolygonalCount.h
│ │ ├── Polyhedron3.h
│ │ ├── Polyhedron3_EEK.cpp
│ │ ├── Polyhedron3_EEK.h
│ │ ├── Polyhedron3_EIK.cpp
│ │ ├── Polyhedron3_EIK.h
│ │ ├── PolyhedronMap.h
│ │ ├── SurfaceMesh3.h
│ │ ├── SurfaceMesh3_EEK.cpp
│ │ ├── SurfaceMesh3_EEK.h
│ │ ├── SurfaceMesh3_EIK.cpp
│ │ ├── SurfaceMesh3_EIK.h
│ │ └── SurfaceMeshMap.h
│ ├── Polylines/
│ │ ├── Polyline2.h
│ │ ├── Polyline2_EEK.cpp
│ │ ├── Polyline2_EEK.h
│ │ ├── Polyline2_EIK.cpp
│ │ ├── Polyline2_EIK.h
│ │ ├── Polyline3.h
│ │ ├── Polyline3_EEK.cpp
│ │ ├── Polyline3_EEK.h
│ │ ├── Polyline3_EIK.cpp
│ │ └── Polyline3_EIK.h
│ ├── Processing/
│ │ ├── HeatMethod.h
│ │ ├── HeatMethod_EEK.cpp
│ │ ├── HeatMethod_EEK.h
│ │ ├── HeatMethod_EIK.cpp
│ │ ├── HeatMethod_EIK.h
│ │ ├── MeshProcessingBoolean.h
│ │ ├── MeshProcessingBoolean_EEK.cpp
│ │ ├── MeshProcessingBoolean_EEK.h
│ │ ├── MeshProcessingBoolean_EIK.cpp
│ │ ├── MeshProcessingBoolean_EIK.h
│ │ ├── MeshProcessingConnections.h
│ │ ├── MeshProcessingConnections_EEK.cpp
│ │ ├── MeshProcessingConnections_EEK.h
│ │ ├── MeshProcessingConnections_EIK.cpp
│ │ ├── MeshProcessingConnections_EIK.h
│ │ ├── MeshProcessingFeatures.h
│ │ ├── MeshProcessingFeatures_EEK.cpp
│ │ ├── MeshProcessingFeatures_EEK.h
│ │ ├── MeshProcessingFeatures_EIK.cpp
│ │ ├── MeshProcessingFeatures_EIK.h
│ │ ├── MeshProcessingLocate.h
│ │ ├── MeshProcessingLocate_EEK.cpp
│ │ ├── MeshProcessingLocate_EEK.h
│ │ ├── MeshProcessingLocate_EIK.cpp
│ │ ├── MeshProcessingLocate_EIK.h
│ │ ├── MeshProcessingMeshing.h
│ │ ├── MeshProcessingMeshing_EEK.cpp
│ │ ├── MeshProcessingMeshing_EEK.h
│ │ ├── MeshProcessingMeshing_EIK.cpp
│ │ ├── MeshProcessingMeshing_EIK.h
│ │ ├── MeshProcessingOrientation.h
│ │ ├── MeshProcessingOrientation_EEK.cpp
│ │ ├── MeshProcessingOrientation_EEK.h
│ │ ├── MeshProcessingOrientation_EIK.cpp
│ │ ├── MeshProcessingOrientation_EIK.h
│ │ ├── MeshProcessingRepair.h
│ │ ├── MeshProcessingRepair_EEK.cpp
│ │ ├── MeshProcessingRepair_EEK.h
│ │ ├── MeshProcessingRepair_EIK.cpp
│ │ ├── MeshProcessingRepair_EIK.h
│ │ ├── MeshProcessingSlicer.h
│ │ ├── MeshProcessingSlicer_EEK.cpp
│ │ ├── MeshProcessingSlicer_EEK.h
│ │ ├── MeshProcessingSlicer_EIK.cpp
│ │ ├── MeshProcessingSlicer_EIK.h
│ │ ├── SurfaceSimplification.h
│ │ ├── SurfaceSimplification_EIK.cpp
│ │ ├── SurfaceSimplification_EIK.h
│ │ ├── SurfaceSubdivision.h
│ │ ├── SurfaceSubdivision_EEK.cpp
│ │ ├── SurfaceSubdivision_EEK.h
│ │ ├── SurfaceSubdivision_EIK.cpp
│ │ └── SurfaceSubdivision_EIK.h
│ ├── Triangulations/
│ │ ├── BaseTriangulation2.h
│ │ ├── BaseTriangulation3.h
│ │ ├── ConstrainedDelaunayTriangulation2.h
│ │ ├── ConstrainedDelaunayTriangulation2_EEK.cpp
│ │ ├── ConstrainedDelaunayTriangulation2_EEK.h
│ │ ├── ConstrainedDelaunayTriangulation2_EIK.cpp
│ │ ├── ConstrainedDelaunayTriangulation2_EIK.h
│ │ ├── ConstrainedTriangulation2.h
│ │ ├── ConstrainedTriangulation2_EEK.cpp
│ │ ├── ConstrainedTriangulation2_EEK.h
│ │ ├── ConstrainedTriangulation2_EIK.cpp
│ │ ├── ConstrainedTriangulation2_EIK.h
│ │ ├── DelaunayTriangulation2.h
│ │ ├── DelaunayTriangulation2_EEK.cpp
│ │ ├── DelaunayTriangulation2_EEK.h
│ │ ├── DelaunayTriangulation2_EIK.cpp
│ │ ├── DelaunayTriangulation2_EIK.h
│ │ ├── DelaunayTriangulation3.h
│ │ ├── DelaunayTriangulation3_EEK.cpp
│ │ ├── DelaunayTriangulation3_EEK.h
│ │ ├── TriCell3.h
│ │ ├── TriEdge2.h
│ │ ├── TriFace2.h
│ │ ├── TriUtil.h
│ │ ├── TriVertex2.h
│ │ ├── TriVertex3.h
│ │ ├── Triangulation2.h
│ │ ├── Triangulation2_EEK.cpp
│ │ ├── Triangulation2_EEK.h
│ │ ├── Triangulation2_EIK.cpp
│ │ ├── Triangulation2_EIK.h
│ │ ├── Triangulation3.h
│ │ ├── Triangulation3_EEK.cpp
│ │ ├── Triangulation3_EEK.h
│ │ └── TriangulationMap2.h
│ ├── Utility/
│ │ ├── ArrayUtil.h
│ │ ├── CGALGlobal.h
│ │ ├── CGALGlobal_EIK_EEK.cpp
│ │ ├── CGALGlobal_EIK_EEK.h
│ │ ├── VersionNumber.cpp
│ │ └── VersionNumber.h
│ ├── framework.h
│ ├── pch.cpp
│ ├── pch.h
│ └── resource.h
├── LICENSE
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
[*.cs]
# CS1591: Missing XML comment for publicly visible type or member
dotnet_diagnostic.CS1591.severity = none
================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
================================================
FILE: Binaries/CGALDotNet.xml
================================================
CGALDotNet
The generic arrangment class.
The kernel type.
The default constructor.
Create a arrangement from a unmanaged ptr.
The unmanaged pointer.
The arrangement as a string.
Assigns the contents of another arrangement.
The other arrangement.
Computes the overlay of two arrangements and return as a new arrangement.
The other arrangement.
The overlay of both arrangements.
Create a deep copy of this arrangment.
The deep copy.
Insert the polygon into this arrangement.
The polygon.
If the polygon intersects anything else in the arramgement.
Insert the polygon into this arrangement.
The polygon.
If the polygon intersects anything else in the arramgement.
The abstract base class.
The default constructor.
Create a arrangement from the kernel.
The kernel.
Create a arrangement from the kernel and unmanaged pointer.
The kernel.
The unmanaged pointer.
The arrangements kernel.
The number of vertices in the arrangement.
The number of vertices in the arrangement that are i
returns the number of arrangement vertices that lie at infinity a
nd are not associated with valid points.
Such vertices are not considered to be regular arrangement
vertices and VertexCount does not count them.
The number of half edges.
The number of edges. two half edges count as one edge.
The number of faces in the arrangement not counting
the unbounded face.
returns the number of unbounded faces in the arrangement.
Such faces are not considered to be regular arrangement
faces and FaceCount does not count them.
The type of locator used to find element
in the arrangement when queried.
Default is walk which is the best in most cases
Is the arrangement empty.
A number that will change if the unmanaged
arrangement model changes.
Clear the arrangement.
In particular, the functions checks the topological structure of the arrangement
and assures that it is valid. In addition, the function performs several simple
geometric tests to ensure the validity of some of the geometric properties of
the arrangement. Namely, it checks that all arrangement vertices are associated
with distinct points, and that the halfedges around every vertex are ordered clockwise.
Get a copy of all the points in the arrangement.
A point array that is the length of the vertex count.
The ararys length.
Get a copy of all the segments in the arrangment.
A segment array that is the length of the edge count.
The ararys length.
Get a copy of all the vertices in the arrangement.
A vertices array that is the length of the vertex count.
The ararys length.
Get the vertex from the arrangement.
The index of the vertex.
The vertex.
True if the vertex was found.
Get a copy of all the half edges in the arrangement.
A half edge array that is the length of the half edge count.
The ararys length.
Get the half edge from the arrangement.
The index of the half edge.
The half edge.
True if the half edge was found.
Get a copy of all the faces in the arrangement.
A face array that is the length of the facee count.
The ararys length.
Get the face from the arrangement.
The index of the half edge.
The face.
True if the face was found.
Create the locator used to find query the arrangement.
The locator type.
Release the locator. Default will be used..
Default is walk which is the best in most cases.
Query what the point hits in the arrangment.
The point to query.
What was hit.
True if something was hit.
Query multiple points in the arrangment.
The points to query.
The results for each point.
True if any point hit something.
Query using a ray going up or down (y axis) from the query point.
The point to start at.
True to shoot ray up, false to shoot down.
The result of what was hits.
True if some thing was hit.
Locate the vertex at this point.
The point to locate vertex at.
The vertex.
True if a vertex was located.
Locate the closest vertex in the hit face
The point
The radius te closest vertex has to be within.
The closest vertex.
True if point hit a face and found a vertex.
Locate the edge at this point.
The point to locate edge at.
The edge.
True if a edge was located.
Locate the closest edge in the hit face.
The point
The closest edge.
The radius from the point a edge counts as being clicked on.
True if the point hit a face and found a edge.
Locate the faces at this point.
The point to locate face at.
The face.
True if a face was located.
Find if the arrangement has a element that intersects the segment.
The segment.
True if the segment intersects something in the arrangement.
Inserts a given point into a given arrangement.
It uses a given point-location object to locate the given point in the given arrangement.
If the point conincides with an existing vertex, there is nothing left to do. if it lies
on an edge, the edge is split at the point. Otherwise, the point is contained inside a face,
and is inserted as an isolated vertex inside this face.
The point to insert.
Insert the segment in to the arrangement.
The segments start point.
The segments end point.
True if the segment is know not to
hit anything currently in the arrangement.
Insert a segment into the arrangement.
True if the segment is know not to
hit anything currently in the arrangement.
Insert a array of segments into the arrangement.
The segment array
The segment arrays length.
True if the segments are known not to
hit anything currently in the arrangement.
Attempts to removed a given vertex from a given arrangement.
The vertex can be removed if it is either an isolated vertex,
(and has no incident edge,) or if it is a redundant vertex.That is,
it has exactly two incident edges, whose associated curves can be
merged to form a single x-monotone curve.The function returns a
boolean value that indicates whether it succeeded removing the
vertex from the arrangement.
The index of the vertex in the arrangement.
True if the vertex was removed.
Attempts to removed a given vertex from a given arrangement.
The vertex can be removed if it is either an isolated vertex,
(and has no incident edge,) or if it is a redundant vertex.That is,
it has exactly two incident edges, whose associated curves can be
merged to form a single x-monotone curve.The function returns a
boolean value that indicates whether it succeeded removing the
vertex from the arrangement.
The poisition of the vertex in the arrangement.
True if the vertex was removed.
Removes an edge at the index from the arrangement.
Once the edge is removed, if the vertices associated with its endpoints
become isolated, they are removed as well.
The index of the one of the half edges in the arrangement.
True if the edge was removed.
Removes an edge at the index from the arrangement.
Once the edge is removed, if the vertices associated with its endpoints
become isolated, they are removed as well.
A segment with the same positions as the edge in the arrangement.
True if the edge was removed.
Release any unmanaged resources.
The generic sweep line class.
The kernel.
A static instanceof a sweep line.
Default constructor.
Create from a unmanaged pointer.
The sweep line as a string.
The abstract sweep line.
The default sweep line.
Create from the kernel.
A kernel that implements a sweep line.
Create from the kernel and unmanaged pointer.
A kernel that implements a sweep line.
A unmanaged pointer to a sweep line.
The sweep line kernel.
Do any of the segments in the array intersect.
The segment array.
The ararys length.
Do any of the segments in the array intersect.
Compute all the sub segemnts from the intersection
of the segments in the array.
The segment array.
The ararys length.
The sub segments.
Compute all the intersection points from the
segments in the array.
The segment array.
The ararys length.
The intersection points.
Get all the points in the point buffer.
A point array the size of the point buffer.
The ararys length.
Get all the segments in the point buffer.
A segment array the size of the segment buffer.
The ararys length.
Clear the point buffer.
Clear the segment buffer.
Release any unmanaged resources.
Global utility functions.
Get the version of CGAL in use.
Get the version of eigen being used.
Returns OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
The first vector.
The second vector.
OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
Returns OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
The first vector.
The second vector.
OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
Returns OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
The first vector.
The second vector.
OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
returns OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
The first vector.
The second vector.
OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
Returns an approximation of the angle between u and v.
The first vector.
The second vector.
The angle is given in degrees.
Returns an approximation of the angle between p-q and r-q.
The first tetrahedrons point.
The second tetrahedrons point.
The third tetrahedrons point.
The angle is given in degrees.
Returns an approximation of the angle between u and v.
The first vector.
The second vector.
The angle is given in degrees.
Returns an approximation of the angle between p-q and r-q.
The first tetrahedrons point.
The second tetrahedrons point.
The third tetrahedrons point.
The angle is given in degrees.
Returns an approximation of the signed dihedral angle
in the tetrahedron pqrs of edge pq.
p,q,r and p,q,s are not collinear.
The first tetrahedrons point.
The second tetrahedrons point.
The third tetrahedrons point.
The fourth tetrahedrons point.
The sign is negative if orientation(p,q,r,s)
is CGAL::NEGATIVE and positive otherwise.
The angle is given in degrees.
Returns true, if the three points are collinear
and q lies between p and r.
Note that true is returned, if q==p or q==r.
The first point.
The second point.
The third point.
Returns true, if the three points are
collinear and q lies between p and r.
Returns true, if the three points are collinear
and q lies between p and r.
Note that true is returned, if q==p or q==r.
The first point.
The second point.
The third point.
Returns true, if the three points are
collinear and q lies between p and r.
Returns true, if the three points are collinear
and q lies between p and r.
Note that true is returned, if q==p or q==r.
The first point.
The second point.
The third point.
Returns true, if the three points are
collinear and q lies between p and r.
Returns true, if the three points are collinear
and q lies between p and r.
Note that true is returned, if q==p or q==r.
The first point.
The second point.
The third point.
Returns true, if the three points are
collinear and q lies between p and r.
returns true, if the three points are collinear
and q lies strictly between p and r.
Note that false is returned, if q==p or q==r.
The first point.
The second point.
The third point.
returns true, iff the three points are
collinear and q lies strictly between p and r.
returns true, if the three points are collinear
and q lies strictly between p and r.
Note that false is returned, if q==p or q==r.
The first point.
The second point.
The third point.
returns true, iff the three points are
collinear and q lies strictly between p and r.
returns true, if the three points are collinear
and q lies strictly between p and r.
Note that false is returned, if q==p or q==r.
The first point.
The second point.
The third point.
returns true, iff the three points are
collinear and q lies strictly between p and r.
returns true, if the three points are collinear
and q lies strictly between p and r.
Note that false is returned, if q==p or q==r.
The first point.
The second point.
The third point.
returns true, iff the three points are
collinear and q lies strictly between p and r.
Returns true, if p, q, and r are collinear
The first point.
The second point.
The third point.
returns true, if p, q, and r are collinear
Returns true, if p, q, and r are collinear
The first point.
The second point.
The third point.
returns true, if p, q, and r are collinear
Returns true, if p, q, and r are collinear
The first point.
The second point.
The third point.
returns true, if p, q, and r are collinear
Returns true, if p, q, and r are collinear
The first point.
The second point.
The third point.
Returns true, iff p, q, and r are collinear
Compute the barycenter of the points p1, p2 and p3
with corresponding weights w1, w2 and w3 as 1.
The first point.
The second point.
The third point.
Compute the barycenter of the points.
Compute the barycenter of the points p1, p2 and p3
with corresponding weights w1, w2 and w3 as 1.
The first point.
The second point.
The third point.
Compute the barycenter of the points.
Compute the barycenter of the points p1, p2 and p3
with corresponding weights w1, w2 and w3 as 1.
The first point.
The second point.
The third point.
Compute the barycenter of the points.
Compute the barycenter of the points p1, p2 and p3
with corresponding weights w1, w2 and w3 as 1.
The first point.
The second point.
The third point.
Compute the barycenter of the points.
Constructs the bisector line of the two points p and q.
The bisector is oriented in such a way that p lies on its positive side.
The first point.
The second point.
Constructs the bisector line of the two points p and q.
Constructs the bisector of the two lines l1 and l2.
In the general case, the bisector has the direction of
the vector which is the sum of the normalized directions
of the two lines, and which passes through the intersection
of l1 and l2. If l1 and l2 are parallel, then the bisector
is defined as the line which has the same direction as l1,
and which is at the same distance from l1 and l2.
If Kernel::FT is not a model of FieldWithSqrt an
approximation of the square root will be used in this
function, impacting the exactness of the result even
with an (exact) multiprecision number type.
The first line.
The second line.
Constructs the bisector of the two lines l1 and l2.
Constructs the bisector of the two lines l1 and l2.
In the general case, the bisector has the direction of
the vector which is the sum of the normalized directions
of the two lines, and which passes through the intersection
of l1 and l2. If l1 and l2 are parallel, then the bisector
is defined as the line which has the same direction as l1,
and which is at the same distance from l1 and l2.
If Kernel::FT is not a model of FieldWithSqrt an
approximation of the square root will be used in this
function, impacting the exactness of the result even
with an (exact) multiprecision number type.
The first line.
The second line.
Constructs the bisector of the two lines l1 and l2.
Constructs the bisector of the two lines l1 and l2.
In the general case, the bisector has the direction of
the vector which is the sum of the normalized directions
of the two lines, and which passes through the intersection
of l1 and l2. If l1 and l2 are parallel, then the bisector
is defined as the line which has the same direction as l1,
and which is at the same distance from l1 and l2.
If Kernel::FT is not a model of FieldWithSqrt an
approximation of the square root will be used in this
function, impacting the exactness of the result even
with an (exact) multiprecision number type.
The first line.
The second line.
Constructs the bisector of the two lines l1 and l2.
Returns true, if p, q, r, and s are coplanar.
The first point.
The second point.
The third point.
The fourth point
Returns true, if p, q, r, and s are coplanar.
If p,q,r are collinear, then CGAL_COLLINEAR is returned.
If not, then p,q,r define a plane p. The return value in this
case is either CGAL_POSITIVE or CGAL_NEGATIVE, but we don't
specify it explicitly. However, we guarantee that all calls to
this predicate over 3 points in p will return a coherent
orientation if considered a 2D orientation in p
The first point.
The second point.
The third point.
If p,q,r are collinear, then CGAL_COLLINEAR is returned.
Let P be the plane defined by the points p, q, and r.
Note that the order defines the orientation of P. The function computes
the orientation of points p, q, and s in P: If p, q, s are collinear,
CGAL_COLLINEAR is returned. If P and the plane defined by p, q,
and s have the same orientation, CGAL_POSITIVE is returned;
otherwise CGAL_NEGATIVE is returned.
p, q, r, and s are coplanar and p, q, and r are not collinear.
The first point.
The second point.
The third point.
The fourth point
Constructs the line which is at the same distance from the three points p, q and r.
p, q and r are not collinear.
Constructs the line which is at the same distance from the three points p, q and r.
Returns true if p, q, and r form a left turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a left turn.
Returns true if p, q, and r form a left turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a left turn.
Returns true if p, q, and r form a left turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a left turn.
Returns true if p, q, and r form a right turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a right turn.
Returns true if p, q, and r form a right turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a right turn.
Returns true if p, q, and r form a right turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a right turn.
Returns LEFT_TURN, if r lies to the left of the oriented
line l defined by p and q, returns RIGHT_TURN if r lies
to the right of l, and returns COLLINEAR if r lies on l.
The first point.
The second point.
The third point.
Returns LEFT_TURN, if r lies to the left of the oriented
line l defined by p and q, returns RIGHT_TURN if r lies
to the right of l, and returns COLLINEAR if r lies on l.
The first point.
The second point.
The third point.
Returns LEFT_TURN, if r lies to the left of the oriented
line l defined by p and q, returns RIGHT_TURN if r lies
to the right of l, and returns COLLINEAR if r lies on l.
The first point.
The second point.
The third point.
returns LEFT_TURN if u and v form a left turn, returns
RIGHT_TURN if u and v form a right turn, and returns
COLLINEAR if u and v are collinear.
Returns LEFT_TURN, if r lies to the left of the oriented
line l defined by p and q, returns RIGHT_TURN if r lies
to the right of l, and returns COLLINEAR if r lies on l.
The first point.
The second point.
Returns LEFT_TURN, if r lies to the left of the oriented
line l defined by p and q, returns RIGHT_TURN if r lies
to the right of l, and returns COLLINEAR if r lies on l.
The first point.
The second point.
returns POSITIVE, if s lies on the positive side of the
oriented plane h defined by p, q, and r, returns NEGATIVE
if s lies on the negative side of h, and returns COPLANAR
if s lies on h.
The first point.
The second point.
The third point.
The fourth point
returns NEGATIVE if u, v and w are negatively oriented,
POSITIVE if u, v and w are positively oriented,
and COPLANAR if u, v and w are coplanar.
computes an orthogonal vector of the plane defined by p, q
and r, which is directed to the positive side of this plane.
The first point.
The second point.
The third point.
computes an orthogonal vector of the plane
returns true, if l1 and l2 are parallel or if one of those
(or both) is degenerate.
The first line.
The seconed line.
returns true, if l1 and l2 are parallel
returns true, if l1 and l2 are parallel or if one of those
(or both) is degenerate.
The first line.
The seconed line.
returns true, if l1 and l2 are parallel
returns true, if l1 and l2 are parallel or if one of those
(or both) is degenerate.
The first line.
The seconed line.
returns true, if l1 and l2 are parallel
returns true, if r1 and r2 are parallel or if one of
those (or both) is degenerate.
The first ray.
The second ray.
returns true, if r1 and r2 are parallel
returns true, if r1 and r2 are parallel or if one of
those (or both) is degenerate.
The first ray.
The second ray.
returns true, if r1 and r2 are parallel
returns true, if r1 and r2 are parallel or if one of
those (or both) is degenerate.
The first ray.
The second ray.
returns true, if r1 and r2 are parallel
returns true, if s1 and s2 are parallel or if one of
those (or both) is degenerate.
The first segment.
The secong segment.
returns true, if s1 and s2 are parallel
returns true, if s1 and s2 are parallel or if one of
those (or both) is degenerate.
The first segment.
The secong segment.
returns true, if s1 and s2 are parallel
returns true, if s1 and s2 are parallel or if one of
those (or both) is degenerate.
The first segment.
The secong segment.
returns true, if s1 and s2 are parallel
Base class for objects that referrence a CGAL object.
The pointer to the unmanged CGAL object.
Default constructor.
Constructor taking a referrence to a CGAL object.
A pointer to a CGAL object.
The destuctor.
Has the object been disposed.
Get the ptr to the CGAL object.
Dispose the CGAL object.
Print some information about the object.
Print some information about the object.
Print the object into the console.
Print the object into a string builder.
The builder to print into.
Release the CGAL object.
Swap the unmanaged pointer with another.
The old ptr will be released first.
The new ptr. The old ptr will be released first.
Allow derived class to release the unmanaged memory.
Allow derived class to release the unmanaged memory.
Check if the object is still valid.
enum for egien solvers.
Create a new matrix filled with zeros.
The number of rows.
The number of columns.
Create a new matrix fill with the array contents.
The array.
Create a new matrix filled with the contents of the column vectors.
All column vectors must have the same dimension.
Create a 2 x 2 matrix.
Create a 3 x 3 matrix.
Create a 4 x 4 matrix.
Create a new matrix from a pointer.
Create a identity matrix.
The number of rows and columns of the matrix. Must be square.
The identity matrix.
Create a matrix filled with the numbers 1, 2. 3, etc to end.
Used for debugging.
The number of rows.
The number columns.
The Matrix.
Create a new matrix fill with random numbers.
The number of rows.
The number columns.
The minimum random number generated.
The maximum random number generated.
The random generators seed.
The matrix.
The number of rows in the matrix.
The number of columns in the matrix.
The total size of the matrix which is
the rows times the number of columns.
The single dimension array accessor.
The array index.
The value at the index i.
The double dimension array accessor.
The row index.
The column index.
The value at the index i,j.
The matrix string info.
The matrix string info.
The matrix transposed.
Flips a matrix over its diagonal that is,
it switches the row and column indices of the matrix.
The matrices conjugate.
The matrix obtained by replacing each element a(ij) with its complex conjugate, A^=(a^(ij)).
The matrices adjoint.
The transpose of its cofactor matrix.
Is the matrix invertible.
The inverse of a square matrix A,
sometimes called a reciprocal matrix,
is a matrix A^(-1) such that AA^(-1)=I.
DOes not check if the matrix is invertible.
The determinant is a scalar value that is a
function of the entries of a square matrix.
The trace of a square matrix is defined to be the
sum of elements on the main diagonal from the upper left to the lower right.
A square matrix has the same number of rows and columns.
A diagonal matrix is a matrix in which the entries
outside the main diagonal are all zero.
A square matrix is called upper triangular
if all the entries below the main diagonal are zero.
A square matrix is called lower triangular
if all the entries above the main diagonal are zero.
Multiple each component in matrix by the scalar.
The matrix.
The scalar.
The matrix with each component multiplied by the scalar.
Divide each component in matrix by the scalar.
The matrix.
The scalar.
The matrix with each component divided by the scalar.
Multiple the two matrices.
The first matrices number of columns must
the same as the second matrices number of rows.
The first matrix.
The second matrix.
The product matrix.
Add two matrices.
The matrices must be the same size.
The first matrix.
The second matrix.
A matrix where each compoent is the sum of the other two matrices.
Subtract two matrices.
The matrices must be the same size.
The first matrix.
The second matrix.
A matrix where each compoent is the difference of the other two matrices.
Multiple a matrix and a column vector.
The matrix.
The column vector.
The product column vector.
Is this matrix the identity matrix.
The threshold the values in the
matrix can be to the expected value.
Is this matrix the identity matrix.
Is this matrix filled with zeros.
The threshold the values in the
matrix can be to the expected value.
Is this matrix filled with zeros.
Are all the values in this matrix positive.
Are all the values in this matrix positive.
Does the matrix have a component that is nan.
Does the matrix have a component that is nan.
Replaces all nan values in the matrix with 0.
Are all the values in the matrix finite (non-infinite and non-nan).
Are all the values in the matrix finite (non-infinite and non-nan).
Replaces all infinite and nan values in matrix with 0.
Are all the values in the matrix the same.
The threshold the values in the
matrix can be to the expected value.
Are all the values in the matrix the same.
Create a sub matrix from this matrix.
The row to start at.
THe column to start at.
The number of rows.
The number of columns.
A sub matrix from this matrix.
Create a sub matrix from this matrix.
The number of rows.
The number of columns.
A sub matrix from this matrix.
Solve the linear system.
The vector to solve.
The solver type.
The solution vector.
Solve the linear system.
The vector to solve.
The solver type.
The solution vector.
Find the relative error from the linear system.
The vector that was solved.
The vector that was the solution.
The relative error.
Find the relative error from the linear system.
The vector that was solved.
The vector that was the solution.
The relative error.
Find the eigen values of the matrix.
The eigen values if found, null otherwise.
True if the values could be determined.
Find the eigen vectors of the matrix.
The eigen vectors if found, null otherwise.
True if the vectors could be determined.
Try and find the inverse of the matrix.
The inverse if found, null otherwise.
True if the inverse was found.
Create a rotation from a angle and the rotation axis.
The rotation amount.
The axis to rotate on.
The rotation matrix.
/
The first value in the vector.
The second value in the vector.
The third value in the vector.
The fourth value in the vector.
The generic Box wrapper for a CGAL object.
The kernel type.
Create box from min and max values.
The min x and y value.
The max x and y value.
Create box from min and max points.
The min point.
The max point.
Create from a pointer.
The iso rectangle pointer.
The type of kernel object uses.
The iso rectangle as a string.
The iso rectangle as a string.
Translate the shape.
The amount to translate.
Rotate the shape.
The amount to rotate.
Scale the shape.
The amount to scale.
Transform the rectangle.
The amount to translate.
The amount to rotate
The amount to scale.
Create a deep copy of the rectangle.
The deep copy.
The abstract iso rectangle definition.
Default constructor.
Construct with a new kernel.
The geometry kernel.
The Box pointer.
The iso rectangle kernel.
Contains the functions to the unmanaged CGAL object.
Convert to shape struct.
The rectangles min point.
The rectangles max point.
The rectangles area.
Is the rectangle degenerate.
The side the rectangle the point is on.
The point.
If the point is iside, outside or on boundary.
Does the rectangle contain the point.
The point
Should a point on
the boundary count as being inside.
Does the rectangle contain the point
Release the unmanaged pointer.
Round the shape.
The number of digits to round to.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
The static intersection class.
The static intersection class.
The static intersection class.
--------------------------------------------------------
The Point DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Line DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Point Intersection functions
--------------------------------------------------------
--------------------------------------------------------
The Line Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Ray Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Segment Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Box Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Point SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Line SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Point DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Linet DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Point Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Ray Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Segment Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Box Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Point SqrDistance extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Point DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Line DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Point Intersection functions
--------------------------------------------------------
--------------------------------------------------------
The Line Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Ray Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Segment Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Box Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Point SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Line SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Point DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Linet DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Point Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Ray Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Segment Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Box Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Point SqrDistance extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Point DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Line DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Point Intersection functions
--------------------------------------------------------
--------------------------------------------------------
The Line Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Ray Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Segment Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Box Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Point SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Line SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Point DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Linet DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Point Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Ray Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Segment Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Box Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Point SqrDistance extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Point2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Vector2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The HPoint2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Line2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Ray2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Segment2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Box2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Point2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Vector2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The HPoint2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Line2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Ray2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Segment Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The IsoRectancle2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Point2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Vector2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The HPoint2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Ray2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Segment2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Box2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Point2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Vector2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The HPoint2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Line2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Ray2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Segment Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The IsoRectancle2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Point2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Vector2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The HPoint2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Ray2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Segment2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Box2 extern functions
-------------------------------------------------------
Weighted point class
Create a new weighted point.
Create a new weighted point from a value and weight as 1.
The points value.
Create a new weighted point from a x, y value and weight as 1.
The points x value.
The points y value.
Create a new weighted point from a x, y value and weight as the w value.
The points x value.
The points y value.
The points weight value.
Create a new weighted point from a pointer.
The pointer.
The type of kernel object uses.
Create a deep copy of the point.
The deep copy.
Create a new weighted point.
The points kernel.
Create a new weighted point from a x, y value and weight as the w value.
The points x value.
The points y value.
The points weight value.
The points kernel.
Create a new weighted point from a existing ponter and kernel.
The points kernel.
The points pointer
The points kernel.
Release the pointer.
Release the pointer.
The pointer to release.
Accessor or the points x value.
ccessor or the points y value.
Round the point.
The number of digits to round to.
Clamp the point.
The points min value.
The points max value.
Clamp the point.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
Enum for the type of intersection geomerty.
The intersection result struct.
May contain up tp 6 points of data.
The point data for the intersection.
Represents up to 6 points in xy order.
The number of points of data used.
Was there a intersection.
Is the intersection a polygon.
The intersection geometry type.
Array accessor for the point data.
The array index from 0 to 6.
The point at index i.
Results information as string.
esults information as string
If result type was point get the point geometry.
If result type was line get the line geometry.
If result type was ray get the ray geometry.
If result type was segment get the segment geometry.
If result type was box get the box geometry.
If result type was triangle get the triangle geometry.
If result type was polygon get the points that
make up the polygon geometry.
Should only ever have at most 6 points.
The intersection result as a polygon.
The polygons kernel.
The polygon.
A CGALObject that represents a line on 2D space.
A horizontal line on the x axis.
A vertical line on the y axis.
Create a new line where ax + by + c = 0 holds.
The constant in ax.
The constant in by.
The constant.
Create a new line that passes through the two points.
The first point.
The second point.
Create a line that passes through the point in the direction of the vector.
The point.
The vector.
Create a line from a existing pointer.
The pointer.
Create a new line that faces in the opposite direction.
Create a new line that is perpendicular to current line.
A point the line should turn ccw when turning.
The perpendicular line.
Translate the object.
The amount to translate.
Rotate the object.
The amount to rotate.
Scale the object.
The amount to scale.
Translate, rotate and scale the object.
The amount to translate.
The amount to rotate in degrees.
The amount to scale.
Create a deep copy of the line.
The deep copy.
The abstract class for the line object.
The lines kernel.
Convert to shape struct.
The lines constant in ax.
The lines constant in by.
The lines constant.
Is the line degenerate.
Is the line horizontal on the x axis.
Is the line vertical on the y axis.
Convert the line to a vector.
Does the point lie on the line.
The point.
True if the point lies on the line.
Does the point lies on the negative/cw side of the line.
The point.
True if the point lies on the negative/cw side of the line.
Does the point lies on the positive/ccw side of the line.
The point.
True if the point lies on the positive/ccw side of the line.
The lines x value given a y value.
The y value.
The lines x value given a y value.
The lines y value given a x value.
The x value.
The lines y value given a x value.
Release the unmanaged pointer.
Round the shape.
The number of digits to round to.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
The unit x point.
The unit y point.
A point of zeros.
A point of ones.
A point of halfs.
The type of kernel object uses.
Round the point.
The number of digits to round to.
Clamp the point.
The points min value.
The points max value.
Clamp the point.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
The unit x ray.
The unit y ray.
Translate the shape.
The amount to translate.
Rotate the shape.
The amount to rotate.
Scale the shape.
The amount to scale.
Convert to shape struct.
Round the shape.
The number of digits to round to.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
A horizontal line on the x axis.
A vertical line on the y axis.
Translate the shape.
The amount to translate.
Rotate the shape.
The amount to rotate.
Scale the shape.
The amount to scale.
Convert to shape struct.
Round the shape.
The number of digits to round to.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
Translate the shape.
The amount to translate.
Rotate the shape.
The amount to rotate.
Scale the shape.
The amount to scale.
Convert to shape struct.
Round the shape.
The number of digits to round to.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
A Vector2 object with kernel type K.
The type of kernel.
The unit x vector.
The unit y vector.
A vector of zeros.
A vector of ones.
Create a new Vector.
Create a new vector filled with the value.
The value to fill.
Create a new vector with the values x and y.
The vectors x value.
The vectors y value.
Create a new vector from a existing pointer.
The pointer object.
The type of kernel object uses.
Vector information.
The vectors string information.
Create a deep copy of the vector.
The deep copy.
The vectors abstract bass class.
Create a new vector with the kernel.
The vectors kernel.
Create a new vector from the x and y values.
The vectors x value.
The vectors y value.
The vectors kernel.
Create a new vector from a existing pointer.
The vectors kernel.
The existing pointer.
The vectors kernel.
The vectors sqr magnitude.
The vectors sqr magnitude.
Access the x component.
Access the y component.
Release the vectors pointer.
Release a pointer to a vector.
The pointer to release.
Round the vector.
The number of digits to round to.
Clamp the vector.
The vectors min value.
The vectors max value.
Clamp the vector.
Normalize the vector.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
The convex hull method to use.
The generic convex hull class.
The kernel type
The static instance.
Default constructor.
Find the convex of the points.
The point array.
The ararys length.
The hull ethod to use.
A polygon that represents the convex hull.
Find the upper hull of points.
The point array.
The ararys length.
A polygon that represents the upper hull.
Find the lower hull of points.
The point array.
The ararys length.
A polygon that represents the lower hull.
The convex hull abstract base class.
Default constructor.
Construct hull with the kernel.
The kernel
The hulls kernel type.
Is this set of points ccw orderer.
The point array.
The ararys length.
Is this set of points ccw orderer.
Is this set of points cw orderer.
The point array.
The ararys length.
Is this set of points cw orderer.
Checks if the minimum number of points have been provided.
The point array length.
Release any unmanaged resources.
The generic convex hull class.
The kernel type
The static instance.
Default constructor.
Create the convex hull from a set of points.
The point array.
The point arrays length
The hull as a polyhedron.
Create the convex hull from a set of points.
The point array.
The point arrays length
The hull as a surface mesh.
The convex hull abstract base class.
Default constructor.
Construct hull with the kernel.
The kernel
The hulls kernel type.
Check if the points in the polyhedron are convex.
The polyhedron.
True if the polyhedron is convex.
Check if the points in the mesh are convex.
The mesh.
True if the mesh is convex.
Checks if the minimum number of points have been provided.
The point array length.
Release any unmanaged resources.
A static instance of the triangulation.
The triangulation as a string.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points and the edges as constraints into the triangulation.
Will retain the poylgons edges.
The polygon to insert.
Insert the polygons points and the edges as constraints into the triangulation.
Will retain the poylgons edges.
The polygon to insert.
A deep copy of the triangulation.
The deep copy.
The max value the angle bounds can be.
The number of verices in the triangulation.
The number of triangles in the triangulation.
The number of indices need to represent the
triangulation (number of triangles * 3).
The conforming triangulation kernel.
Clear the triangulation.
Translate the triangulation.
The amount to translate.
Rotate the triangulation.
The amount to rotate in radians.
Scale the triangulation.
The amount to scale.
Transform the triangulation with a TRS matrix.
The amount to translate.
The amount to rotate.
The amount to scale.
Make the mesh delaunay.
Make the mesh
Refine the mesh into smaller triangles.
Default shape bound. 0.125 corresponds to abound 20.6 degree. Max 0.125 value.
Upper bound on the length of the longest edge.
Refine the mesh into smaller triangles.
Default shape bound. 0.125 corresponds to abound 20.6 degree. Max 0.125 value.
Upper bound on the length of the longest edge.
Seeds point in polygons that are not to be refined.
Release any unmanaged resources.
Release any unmanaged resources.
A static instance of the tetrahedral remeshing.
The tetrahedral remeshing kernel.
Release any unmanaged resources.
Generic polygon definition.
The kernel type.
Default constructor.
Create from a set of points.
The polygons points.
Create from a pointer.
The polygons pointer.
The polygon as a string.
The polygon as a string.
Copy the polygon.
The copied polygon.
Triangulate the polygon.
The triangle indices.
Do the polygons intersect.
The other polygon.
Do the polygons intersect.
Do the polygons intersect.
The other polygon.
Do the polygons intersect.
Do the polygons intersect.
The other polygon.
The intersection results.
Do the polygons intersect.
Do the polygons intersect.
The other polygon.
The intersection results.
Do the polygons intersect.
Refine the polygon to a triangulation.
Does not modify this polygon.
Upper bound on the length of the longest edge.
The base triangulation.
Refine the polygon to a triangulation.
Does not modify this polygon.
Default shape bound. 0.125 corresponds to abound 20.6 degree. Max 0.125 value.
Upper bound on the length of the longest edge.
The base triangulation.
Partition the polygon into convex pieces.
Does not modify this polygon.
The convex partition.
The type of partition method.
Simplify the polygon.
The simplification threshold.
Simplify the polygon.
The simplification parameters.
offset the polygon. Does not modify this polygon.
The type of offset.
The amount to offset.
The offset results.
Create a polyhedron3 mesh with one polygon face.
Should the y coord of the points be used for the z coord.
The new polyhedron mesh
Thrown if the polygon is not simple.
Get the dual polygon where every point s now a edge.
The dual polygon.
The abstract polygon definition.
Is the polygon simple.
Must be updated to find if simple.
The polygons orientation.
Must be updated to find orientation.
Default constructor.
Construct with a new kernel.
The polygon kernel.
Construct with a new kernel.
The polygon kernel.
The points to construct from.
Construct with a new kernel.
The polygon kernel.
The polygons pointer.
The number of points in the polygon.
The capacity of the point array.
Is this a simple polygon.
Certains actions can only be carried out on simple polygons.
The polygons orientation.
Certain actions depend on the polygons orientation.
The orientation expressed as the clock direction.
Is the polygon degenerate.
Polygons with less than 3 points are degenerate.
Is the polygon cw orientated.
Is the polygon ccw orientated.
Is the polygon updated.
The polygons kernel.
Contains the functions to the unmanaged CGAL polygon.
The type of kernel object uses.
Array accessor for the polygon.
Getting a point wraps around the polygon.
Mark th mesh as needing to be updated.
Valid polygons should be simple and ccw
for most algorithms to work on them.
Valid hole polygons should be simple
and cw to add to a polygon with holes.
Clear the polygon of all points.
Shrink the capacity to match the point count.
Resize the point array.
New elements will default to zero.
Remove the point at the index from the array.
The points index
Remove a range of points from the array.
The starting index
The number of points to remove.
Insert the point at the index into the array.
The points index.
The point to insert.
Insert a range of points into the array.
The starting index
The points to insert.
The number of points to insert.
Add the point to the end of the poylgon.
The point to add.
Get the point a the index.
The points index to get.
The point at index.
Get the point at the index
and wrap around the polygon.
The points index.
The point at the index.
Get the point at the index
and clamp to the polygons last point.
The points index.
The point at the index.
Get all the points in the polygon.
The point array to copy the data into.
The array length.
Get all the polygon points.
The list to copy the data into.
Triangulate the polygon.
The triangle indices.
Get all the polygon segments.
The segment array to copy the data into.
The array length.
Set the points at the index.
The points index.
The points value.
Set the points from the array.
If the array is larger than the polygon then
the new points will be appended to end of polygon.
The points array.
The array length.
Reverse the polygon.
Swithches the orientation.
Find the bounding box for the polygon.
The bounding box.
Find if the polygon is simple.
True if simple.
Find if the polygon is convex.
Must be simple to determine.
True if the polygon is convex.
Find the polygons orientation.
Must be simple to determine.
The polygons orientations.
Find the orientated side the point lies on.
Must be simple to determine.
The point.
The orientated side of the polygon the point is on.
Find the bounded side the point lies on.
Must be simple to determine.
The point.
The bounded side of the polygon the point is on.
Find the polygons signed area.
Must be simple to determine.
The signed area is positive if polygon is ccw
and negation if cw.
The area of the polygon.
Must be simple to determine.
The abs of the signed area.
Find the perimeter.
This is the length of the polygon boundary.
Find the square perimeter.
This is the square length of the polygon boundary.
Does the polygon contain the points.
Must be simple to determine.
The point to find.
Does the point on the boundary count
True if the point is inside the polygon.
Round each point it polygon to a number of digits.
The number of digits to round to.
Translate the polygon.
The amount to translate.
Rotate the polygon.
The amount to rotate in radians.
Scale the polygon.
The amount to scale.
Transform the polygon with a TRS matrix.
The amount to translate.
The amount to rotate.
The amount to scale.
Enumerate all points in the polygon.
Each point in polygon.
Enumerate all points in the polygon.
Each point in polygon.
Return all the points in the polygon in a array.
The array.
Get all the points in the polygon into a list.
Convert the polygon to a new polygon with a different kernel.
May result in different values due to precision issues.
The new kernel type.
The new polygon.
Truncate a point in the polygon by splitting
the point and shifting toward its neghbours.
The points index in mesh.
The amount to truncale.
Print the polygon into a styring builder.
Release the unmanaged pointer.
Release the unmanaged pointer.
Update the polygon if needed.
Update the polygon directly without calling the update
function.
Is the polygon simepl.
The polygons orientation.
Should the input polygon be checked.
Can disable for better performance if
it is know all input if valid.
Check if the polygon is valid to offset.
Should be simple and ccw.
The polygon to check.
Check if the polygon is valid to offset.
Should be simple and ccw.
The polygon to check.
The type of boolean ops.
Generic polygon boolean class.
The type of kernel
A static instance to the boolean class.
Create a new object.
Perform the boolean op on the two polygons.
The type of op.
A simple ccw polygon.
A simple ccw polygon.
The result of the op.
If the op was performed and the result list changed.
Perform the boolean op on the two polygons.
The type of op.
A simple ccw polygon.
A simple ccw polygon.
The result of the op.
If the op was performed and the result list changed.
Perform the boolean op on the two polygons.
The type of op.
A simple ccw polygon.
A simple ccw polygon.
The result of the op.
If the op was performed and the result list changed.
Check if the polygons intesect.
A simple ccw polygon.
A simple ccw polygon.
If the polygons intesect.
Check if the polygons intesect.
A simple ccw polygon.
A simple ccw polygon.
If the polygons intesect.
Check if the polygons intesect.
A simple ccw polygon.
A simple ccw polygon.
If the polygons intesect.
The union of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The union of the polygons.
If the op was performed and the result list changed.
The union of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The union of the polygons.
If the op was performed and the result list changed.
The union of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The union of the polygons.
If the op was performed and the result list changed.
The intersection of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The intersection of the polygons.
If the op was performed and the result list changed.
The intersection of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The intersection of the polygons.
If the op was performed and the result list changed.
The intersection of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The intersection of the polygons.
If the op was performed and the result list changed.
The difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The difference of the polygons.
If the op was performed and the result list changed.
The difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The difference of the polygons.
If the op was performed and the result list changed.
The difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The difference of the polygons.
If the op was performed and the result list changed.
The symmetric difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The symmetric difference of the polygons.
If the op was performed and the result list changed.
The symmetric difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The symmetric difference of the polygons.
If the op was performed and the result list changed.
The symmetric difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The symmetric difference of the polygons.
If the op was performed and the result list changed.
The complement of the polygon.
A simple ccw polygon.
The complement of the polygon.
Copy the unmanaged polygon objects created
into the result list.
The number of objects in the buffer.
The result lis.
Copy the unmanaged polygon object.
The index of the polygon in the buffer.
The polygon copy.
Abstract base class for polygon boolean.
The polygon boolean kernel.
Clear the unmanaged buffer.
Release the unmanaged resourses.
Factory for creating polygons.
The kernel type.
Create a empty polygon.
Create a polygon from a triangle.
The triangle first point.
The triangle second point.
The triangle third point.
True for a counter clock wise polygon, false for a clock wise polygon
The created polygon.
Create a polygon from a triangle.
The triangle.
True for a counter clock wise polygon, false for a clock wise polygon
The created polygon.
Create a polygon from a box.
The boxs min point.
The boxs max point.
True for a counter clock wise polygon, false for a clock wise polygon
The created polygon.
Create a polygon from a box.
The boxs min point.
The boxs max point.
True for a counter clock wise polygon, false for a clock wise polygon
The created polygon.
Create a polygon from a box.
The box.
True for a counter clock wise polygon, false for a clock wise polygon
The created polygon.
Create a polygon from a dounut.
Outer radius must be greater than inner.
The outer radius.
The inner radius
The number of segments.
The created polygon with holes
Create a polygon from a dounut.
Outer radius must be greater than inner.
The center position of the polygon.
The outer radius.
The inner radius
The number of segments.
The created polygon with holes
Create a polygon from a circle.
The radius of the circle.
The number of segments.
True for a counter clock wise polygon, false for a clock wise polygon
The polygon.
Create a polygon from a circle.
The center of the circle.
The radius of the circle.
The number of segments.
True for a counter clock wise polygon, false for a clock wise polygon
Create a polygon from a circle.
The cirlce.
The number of segments.
True for a counter clock wise polygon, false for a clock wise polygon
https://rosettacode.org/wiki/Koch_curve#C.2B.2B
The size of the polygon.
The number of times to sub divide.
True for a counter clock wise polygon, false for a clock wise polygon
https://rosettacode.org/wiki/Koch_curve#C.2B.2B
The stars center.
The size of the polygon.
The number of times to sub divide.
True for a counter clock wise polygon, false for a clock wise polygon
https://rosettacode.org/wiki/Koch_curve#C.2B.2B
Decomposition stratergy for polygons.
Decomposition stratergy for polygons with holes.
Generic Minkowski class.
The type of kernel
A static instance to the Minkowski class.
Create a new object.
Compute the Minkowski sum of two polygons.
Compute the Minkowski sum of two polygons.
Compute the Minkowski sum of two polygons.
The decomposition method.
Compute the Minkowski sum of two polygons.
The decomposition method.
It is based on the angle-bisector decomposition method suggested by Chazelle and Dobkin [4],
which runs in O(n2) time. In addition, it applies a heuristic by Flato that reduces the number
of output polygons in many common cases. The convex decompositions that it produces usually
yield efficient running times for Minkowski sum computations. It starts by examining each pair
of reflex vertices in the input polygon, such that the entire interior of the diagonal
connecting these vertices is contained in the polygon. Out of all available pairs, the vertices
pi and pj are selected, such that the number of reflex vertices encountered when traversing
the boundary of the polygon from pi to pj in clockwise order is minimal. The polygon is split
by the diagonal pipj. This process is repeated recursively on both resulting sub-polygons.
In case it is not possible to eliminate two reflex vertices at once any more, each reflex
vertex is eliminated by a diagonal that is closest to the angle bisector emanating from this
vertex and having rational-coordinate endpoints on both sides.
Uses the dynamic-programming algorithm of Greene [6] for computing an optimal decomposition of
a polygon into a minimal number of convex sub-polygons. While this algorithm results in a small
number of convex polygons, it consumes rather many resources, as it runs in O(n4) time and O(n3)
space in the worst case, where n is the number of vertices in the input polygon.
Implements the approximation algorithm suggested by Hertel and Mehlhorn [8], which triangulates
the input polygon and then discards unnecessary triangulation edges. After triangulation (carried
out by the constrained-triangulation procedure of CGAL) the algorithm runs in O(n) time and space,
and guarantees that the number of sub-polygons it generates is not more than four times the optimum.
Implementation of Greene's approximation algorithm [6], which computes a convex decomposition of the
polygon based on its partitioning into y-monotone polygons. This algorithm runs in O(nlogn) time and
O(n) space, and has the same guarantee on the quality of approximation as Hertel and Mehlhorn's algorithm.
Uses vertical decomposition to decompose the underlying arrangement.
Uses vertical decomposition to decompose the underlying arrangement.
Uses constrained triangulation to decompose the input polygons, which may have holes, into triangles.
Uses constrained triangulation to decompose the input polygons, which may have holes, into triangles.
Abstract base class for polygon minkowski.
The polygon Minkowski kernel.
Release the unmanaged resourses.
The generic polgon offset class
Static instance of polygon offset.
Create new polygon offset.
Create a interior or exterior offset.
The offset type
The polygon to offset.
The offset amount
The offset polygon
Create a interior or exterior offset.
The offset type
The polygon to offset.
The offset amount
The offset polygon
Create a interior offset.
The polygon to offset.
The offset amount
The offset polygon
Create a interior offset.
The polygon to offset.
The offset amount
The offset polygon
Create a exterior offset.
The polygon to offset.
The offset amount
The offset polygon
Create a exterior offset.
The polygon to offset.
The offset amount
The offset polygon
Create the interior skeleton of the polygon.
The polygon to offset.
Should the polygon be included as the border.
The skeletons segments.
Create the interior skeleton of the polygon.
The polygon to offset.
Should the polygon be included as the border.
The skeletons segments.
Create the exterior skeleton of the polygon.
The polygon to offset.
The bounding boxes offset from the polygons edges. Must be > 0.
Should the polygon be included as the border.
The skeletons segments.
Create the exterior skeleton of the polygon.
The polygon to offset.
The bounding boxes offset from the polygons edges. Must be > 0.
Should the polygon be included as the border.
The skeletons segments.
The abstract polygon offset class.
The offset kernel.
Get the number off polygons in the buffer.
The size of the segment buffer.
The number of segments in the buffer.
Get the unmanaged point to the polygon at the buffer index
The index in the buffer.
The pointer
Get the segment from buffer.
The segments index.
The segment.
Clear the polygon buffer.
Clear the segment buffer.
Release the unmanaged resources.
Type of polygon partitions.
Generic polygon partition class.
The kernel type.
Static instance of polygon partition.
Create new polygon partition.
Is this polygon Y monotonic.
The polygon.
True if y monotonic.
Is this polygon Y monotonic.
The polygon.
True if y monotonic.
Partition a polygon.
The polygon to partition.
The resulting polygons.
Partition a polygon.
The polygon to partition.
The resulting polygons.
Partition a polygon.
The type of partition to perfrom.
The polygon to partition.
The resulting polygons.
Partition a polygon.
The type of partition to perfrom.
The polygon to partition.
The resulting polygons.
Partition in to Y monotonic polygons.
The polygon to partition.
The resulting polygons.
Partition in to Y monotonic polygons.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is no more than four times the minimal number.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is no more than four times the minimal number.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is no more than four times the minimal number.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is no more than four times the minimal number.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is minimal.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is minimal.
The polygon to partition.
The resulting polygons.
Copy the new polygons into the result array
and the clear the buffer.
The number of polygons in buffer.
The resulting polygons.
The abstract base class.
The partition kernel.
Clear the unmanaged buffer.
Release the unmanaged resources.
Cost options for simplification.
Stop distance options for simplification.
Paramaters for poylgon simplification.
The default param settings.
The param as a string.
Generic polygon simplification class.
The kernel type.
Static instance of polygon simplification.
Simplify the polygon.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygon.
Simplify the polygon.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygon ptr.
Simplify the polygons boundary and all the holes.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygon.
Simplify the polygons boundary and all the holes.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygons ptr.
Simplify the polygons boundary.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygon.
Simplify the polygons holes.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygon.
Simplify one of the polygons holes.
The polygon to simplify. Must be simple.
The simplification parameters.
The hole index to simplify.
The simplified polygon.
Abstract polygon simplification class.
The simplification kernel.
Release unmanaged resources.
The generic polgon visibility class
Static instance of polygon visibility.
Create new polygon visibility.
Compute the visibility from a simple polygon with no holes.
This class implements the algorithm of B.Joe and R.B.Simpson [4]. The algorithm is a modification
and extension of the linear time algorithm of Lee [5]. It computes the visibility region from a
viewpoint that is in the interior or on the boundary of the polygon.
While scanning the boundary the algorithm uses a stack to manipulate the vertices, and ultimately
yields the visibility region.For each scanned edge, at most 2 points are pushed onto the stack.
Overall, at most 2 n points are pushed or popped. Thus, the time and space complexities of the
algorithm are O(n) even in case of degeneracies such as needles, where n is the number of the vertices of the polygon.
The visibility point.
A simple polygon that contains the point.
The visibility result.
True if result was computed
Compute the visibility from a polygon with holes.
The visibility point.
A polygon with holes that contains the point.
The visibility result.
True if result was computed
Compute the visibility from a polygon with holes.
What method to use.
The visibility point.
A polygon with holes that contains the point.
The visibility result.
True if result was computed
Compute the visibility from a polygon with holes using the triangular expansion method.
The algorithm does not require preprocessing. It relies on the algorithm of T.
Asano [1] based on angular plane sweep, with a time complexity of O(nlogn) in the number of vertices.
The visibility point.
A polygon with holes that contains the point.
The visibility result.
True if result was computed
Compute the visibility from a polygon with holes using the rotational sweep method.
The algorithm obtains a constrained triangulation from the input arrangement, then computes visibility by
expanding the triangle that contains the query point. Preprocessing takes O(n) time and O(n) space, where
n is the number of vertices of input polygon. The query time is O(nh), where h is the number of holes+1 of
input polygon. Thus, for simple polygons (or a polygon with a constant number of holes) the algorithm
complexity is linear, but it is O(n2) in the worst case, as the number of holes can be linear in n.
The visibility point.
A polygon with holes that contains the point.
The visibility result.
True if result was computed
The abstract polygon visibility class.
The offset kernel.
Release the unmanaged resources.
Polygon with holes consists of a boundary and holes.
Generic polygon definition.
The kernel type.
Default constuctor.
Construct polygon with the boundary.
A CCW polygon.
Construct polygon with the boundary points
A CCW set of points.
Create from a pointer.
The polygons pointer.
The polygon as a string.
The polygon as a string.
Create a deep copy of the polygon.
The copy.
Create a deep copy of the polygon element.
The element type to copy.
If element os a hole thiss is the holes index.
The copy.
Get the boundary as a copy.
If unbounded will return a empty polygon.
A copy of the hole polygon.
Get the hole as a copy.
The holes index
A copy of the hole polygon.
Add a polygon as a holes.
Holes must simple and CW.
The hole polygon.
Create a copy of boundary and hole polygons.
The list of polygons.
Triangulate the polygon.
The triangle indices.
Do the polygons intersect.
The other polygon.
Do the polygons intersect.
Do the polygons intersect.
The other polygon.
Do the polygons intersect.
Connect all the holes of the polygon
and return as a polygon.
Will result in a non simple polygon.
The connected non-simple polygon.
Partition the polygon into convex pieces.
The convex partition.
The type of partition method.
Simplify the polygon.
The simplification threshold.
Simplify the polygon.
The simplification parameters.
offset the polygon. Does not modify this polygon.
The type of offset.
The amount to offset.
The offset results.
The abstract polygon definition.
Default constructor.
Construct polygon with the kernel.
Construct the polygon with the kernel and boundary.
A CCW polygon.
Construct the polygon with the kernel and boundary.
A CCW set of points.
Construct the polygon with the kernel and pointer.
Is the polygon unbounded.
ie no boundary polygon has been set.
Is the polygon bounded.
ie a boundary polygon has been set.
Number of points in the boindary polygon.
The number of holes in polygon.
Is this a simple polygon.
Certains actions can only be carried out on simple polygons.
The polygons orientation.
Certain actions depend on the polygons orientation.
The orientation expressed as the clock direction.
Is the polygon degenerate.
Polygons with less than 3 points are degenerate.
Is the polygon cw orientated.
Is the polygon ccw orientated.
The polygon kernel.
The type of kernel object uses.
Valid polygon with holes must have a simple and ccw boundary
and all holes must be simple and cw.
Valid holes must be simple, cw and must be contained
within the boundary polygon.
True if the polygon is a valid hole.
Clear the polygon.
Clear the polygons boundary.
Clear the polygons holes.
Get the number of points of a polygon element.
The element type.
If element type is a hole this is the holes index.
Remove a polygon.
Can remove the boundary or a hole.
The element type.
If element type is a hole this is the holes index.
Remove a hole from the polygon.
The holes index.
Reverse the polygon.
The element type.
If element type is a hole this is the holes index.
Get a polygons point.
The element type.
The index of the point in the polygon.
If element type is a hole this is the holes index.
Get the points in the polygon element.
The element type.
The point array to copy points into.
The ararys length.
If element type is a hole this is the holes index.
Set a polygons point.
The element type.
The index of the point in the polygon.
The point to set.
If element type is a hole this is the holes index.
Set all the points in the polygon. If the point array is longer
than the polygon is current the extra points are appended to the end.
The element type.
The points to set.
The ararys length.
If element type is a hole this is the holes index.
Triangulate the polygon.
The triangle indices.
Add a hole from a set of points.
A CW set of points.
The ararys length.
Find if the polygon has a boundary.
True if the polygon has a boundary.
Find the polygons bounding box.
The element type.
If element type is a hole this is the holes index.
The polygons bounding box.
Find if the polygon is simple.
The element type.
If element type is a hole this is the holes index.
True if the polygon is simple.
Find if the polygon is convex.
The element type.
If element type is a hole this is the holes index.
True if polygon is convex.
Find the orientation of polygon.
The element type.
If element type is a hole this is the holes index.
The orientation of the polygon.
Find the orientated side the point is on.
The element type.
If element type is a hole this is the holes index.
The orientated side of point compared to the polygon.
The signed area of the polygon.
The element type.
If element type is a hole this is the holes index.
The signed area is positive if polygon is ccw
and negation if cw.
The area of the polygon.
The element type.
If element type is a hole this is the holes index.
The polygons area.
Enumerate all points in the polygon.
Each point in polygon.
Enumerate all points in the polygon.
Each point in polygon.
Return all the points in the polygon in a array.
The array.
Get all the points in the polygons boundary into a list.
Get all the points in the polygon boundary and holes.
The point array to copy into.
Round each point it polygon to a number of digits.
The number of digits to round to.
Convert the polygon to a new polygon with a different kernel.
May result in different values due to precision issues.
The new kernel type.
The new polygon.
Release the unmanaged resoures.
Release the unmanaged pointer.
Does the polygon fully contain the other polygon.
The other polygon.
Should the boundary be included.
True if the polygon is contained within this polygon.
Does this polygon contain the point.
The point.
Should points on the boundary be
counted as being inside the polygon.
True if the polygon contain the point.
Translate the polygon.
The amount to translate.
Translate the polygon.
The element type.
The amount to translate.
If element type is a hole this is the holes index.
Rotate the polygon.
The amount to rotate in radians.
Rotate the polygon.
The element type.
The amount to rotate in radians.
If element type is a hole this is the holes index.
Rotate the polygon.
The amount to scale.
Scale the polygon.
The element type.
The amount to scale.
If element type is a hole this is the holes index.
Transform the polygon.
The amount to translate.
The amount to rotate in radians.
The amount to scale.
Transform the polygon.
The element type.
The amount to translate.
The amount to rotate in radians.
The amount to scale.
If element type is a hole this is the holes index.
Print debug infomation.
Number of vertices.
Number of faces.
Number of halfedges.
Number of border edges.
Since each border edge of a polyhedral surface has exactly one
border halfedge, this number is equal to size of border halfedges.
Returns true if the polyhedral surface is combinatorially consistent.
Must be a valid mesh to check many other properties.
Returns true if there are no border edges.
Returns true if all faces are triangles.
Returns true if all faces are quads.
Is this a valid triangle mesh.
Is this a valid closed mesh.
Is this a valid closed triangle mesh.
The current build stamp.
Clear the mesh.
Clear the normal maps.
True to clear the vertex normal map.
True to clear the face normal map.
Create a mesh from the points and indices.
The meshes points.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Create a triangle mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a quad mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a mesh with quads and triangles.
The meshes points.
The point array length.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Create a mesh with riangles, quads, pentagons and hexagons.
The meshs points.
The length of the point array.
The faces indices.
Create a mesh consisting of one polygon face.
The faces points
The length of the point array.
Should the y coord of the points be used for the z coord.
Get the triangle and quad indices.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Get the meshes triangles.
The meshes triangles.
The triangle array length.
Get the meshes quads.
The meshes quads.
The quads array length.
Get the meshes triangles and quads.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Get the meshes triangles, quads, pentagons and hexagons.
The indices.
Array accessor for the polygon.
Getting a point wraps around the polygon.
The points index.
The vertices point.
Get the vertices point.
The vertex index in the mesh.
The vertices point.
If index is out of range.
Get the points in the mesh.
The array to copy points into.
The point array length.
Set the point at the index.
The points index
The pointsam>
If index is out of range.
Set the points from a array.
The point array.
The point arrays length.
Get a halfedges segment.
The halfedges index.
The segment.
True if halfedge found.
Get a segment for each halfedge in the mesh.
The segment array.
The segment array length.
Get the faces triangle.
Presumes face is a triangle with no checks.
The faces index.
The faces triangle
Get a triangle for each face in the mesh.
Presumes all faces are triangles with no checks.
The trainagle array.
The traingle arrays length.
Get the mesh vertex.
The vertices index.
The vertex.
True if the vertex was found.
Get the vertices in the mesh.
The vertex array.
The vertex array length.
Get the mesh face.
The faces index.
The face.
True if the face was found.
Get the faces in the mesh.
The face array.
The face array length.
Get the mesh halfedge.
The halfedges index.
The halfedge.
True if the halfedge was found.
Get the halfedges in the mesh.
The halfedge array.
The halfedge array length.
Count the number of triangles, quads and polygons in the mesh.
The number of triangles, quads and polygons in the mesh.
Count the number of triangles, quads and polygons in the dual mesh.
A dual mesh is were faces become vertices and vertices become faces.
The number of triangles, quads and polygons in the mesh.
Get a centroid (the avergae face position) for each face in the mesh.
The point array.
The points arrays lemgth.
Computes the vertex normals if needed.
Computes the face normals if needed.
Get the vertex normals.
The normals array.
The normals array length.
Get the face normals.
The normals array.
The normals array length.
Translate each point in the mesh.
The amount to translate.
Rotate each point in the mesh.
The amount to rotate.
Scale each point in the mesh.
The amount to scale.
Transform each point in the mesh.
The amount to translate.
The amount to rotate.
The amount to scale.
Make all faces triangles.
Read data from a off file into the pollyhedron.
The files name.
Write data from a off file into the pollyhedron.
The files name.
Print the mesh into a string builder.
Reverses the orientation of the vertices in each face.
Find what side of the mesh the lies in.
The point to check.
ON_BOUNDED_SIDE if point inside mesh,
ON_UNBOUNDED_SIDE if point not inside,
ON_BOUNDARY if point is on the surface.
Does the mesh contain the point.
The point.
If point is on the boundary does it count a being contained.
True if the poly contains the point
Locate the face the rays hits.
The ray.
The hit result.
Find the face closest to the point.
The point.
The hit result.
Locate the face hit by the ray.
The ray.
The hit face.
True if the ray hit a face.
Locate the vertex hit by the ray.
The ray.
The distance the vertex has to be within hit point.
The hit vertex.
True if the ray hit a vertex.
Locate the edge hit by the ray.
The ray.
The distance the edge has to be within hit point.
The hit edge.
True if the ray hit a edge.
The faces index
THe faces edge
A face where all compents are null index.
Are these faces equal.
Are these faces not equal.
Are these objects equal.
Are these faces equal.
The faces hash code.
Enmerate all edges in this edge loop.
The mesh the edges belong too.
The next edge
Enmerate all vertices in this edge loop.
The mesh the edges belong too.
The next vertex
https://github.com/caosdoar/spheres/blob/master/src/spheres.cpp
https://github.com/mrdoob/three.js/tree/dev/src/geometries
Is the edge a border to a hole.
The edges index.
The edges source vertices index.
The edges target vertices index.
The edges opposite edge.
The edges next edge.
The edges previous edge.
The edges face
A edge where everthing is set to null index.
Get the source point.
The mesh the point belongs to.
The source point
If point is null index.
Get the target point.
The mesh the point belongs to.
The target point
If point is null index.
Are these edges equal.
Are these edges not equal.
Are these objects equal.
Are these edges equal.
The edges hahe code
Enmerate all edges in this edge loop.
The mesh the edges belong too.
The next edge
Enmerate all vertices in this edge loop.
The mesh the edges belong too.
The next vertex
The vertices point.
The vertices degree is how mang edges connect to it.
The vertices index.
The vertices edge
A vertex where all components are null.
Are these vertices equal.
Are these vertices not equal.
Are these objects equal.
Are these vertices equal.
The vertices hash code
Enmerate all edges surrounding the vertex.
The mesh the edges belong too.
The next edge
Generic nef polyhedron definition.
A 3D Nef polyhedron is a subset of the 3-dimensional space that is the result of forming
complements and intersections starting from a finite set H of 3-dimensional halfspaces.
Nef polyhedra are closed under all binary set operations, i.e., intersection, union,
difference, complement, and under the topological operations boundary, closure, and interior.
The kernel type.
creates a Nef polyhedron and initializes it to the empty
set if plane == EMPTY and to the whole space if space == COMPLETE.
The nef's space
creates a Nef polyhedron containing the halfspace on the
negative side of plane including plane if boundary==INCLUDED,
excluding plane if boundary==EXCLUDED.
The plane.
The boundary.
creates a Nef polyhedron, which represents the same point
set as the polyhedral surface.
The polyhedron
Create from a pointer.
The polyhedrons pointer.
The nef polyhdron as a string.
The nef polyhedron as a string.
Return the intersection of nef and nef1.
Return the union of nef and nef1.
Return the difference between nef and nef1.
Return the symmetric difference of nef and nef1.
Returns the complement of nef.
Returns the interior of nef.
Returns the boundary of nef.
Returns the closure of nef.
Returns the regularization, i.e. the closure of the interior, of nef.
Returns the MinkowskiSum.
Converts nef into a Polyhedron.
nef must be simple to convert.
The result of the conversion.
True if nef is simple and the conversion was successful.
Converts nef into a surface mesh.
nef must be simple to convert.
The result of the conversion.
True if nef is simple and the conversion was successful.
Get a list of the nef volumes.
Get a list of the nef volumes.
The abstract nef polyhedra definition.
Default constructor.
creates a Nef polyhedron and initializes it to the empty
set if plane == EMPTY and to the whole space if space == COMPLETE.
The polyhedron kernel.
The nef's space
creates a Nef polyhedron containing the halfspace on the
negative side of plane including plane if boundary==INCLUDED,
excluding plane if boundary==EXCLUDED.
The polyhedron kernel.
The plane.
The boundary.
creates a Nef polyhedron, which represents the same point
set as the polyhedral surface.
The polyhedron kernel.
The polyhedron
Construct with a new kernel.
The polyhedron kernel.
The polyhedrons pointer.
The polyhedron kernel.
Contains the functions to the unmanaged CGAL polhedron.
Return the number of halfedge pairs.
Return the number of halfedges.
Return the number of faces.
Return the number of vertices.
Return the number of volumes.
Returns true, if nef is the empty point set.
Rreturns true, if nef is a 2-manifold.
Returns true, if nef is the complete 3D space.
Make nef the empty set if space == EMPTY and the complete
3D space if space == COMPLETE.
Checks the integrity of nef.
Decompose the nef into convex volumes.
Print the nef polyhedron into a string builder.
Release the unmanaged pointer.
Should the input polygon be checked.
Can disable for better performance if
it is know all input if valid.
Check if the mesh is valid.
The mesh to check.
Check if the mesh is valid.
The mesh to check.
Check if the mesh is a valid triangle mesh.
The mesh to check.
Check if the mesh is a valid triangle mesh.
The mesh to check.
Check if the mesh is a valid closed mesh.
The mesh to check.
Check if the mesh is a valid closed mesh.
The polygon to check.
Check if the mesh is a valid triangle mesh.
The mesh to check.
Check if the mesh is a valid triangle mesh.
The mesh to check.
A polyhedral surface consists of vertices, edges,
facets and an incidence relation on them.
Each edge is represented by two halfedges with opposite orientations.
The kernel type.
Default constructor.
Construct from points and triangle indices.
Construct from points and polygon indices.
Create from a pointer.
The meshs pointer.
The polyhdron as a string.
The mesh as a string.
Create a deep copy of the mesh.
A deep copy of the mesh.
Subdive the mesh.
The number of iterations to perfrom.
The subdivision method.
Simplify the polyhedra.
A number between 0-1 that represents the percentage of vertices to remove.
Refines a triangle mesh
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices.
Orient the faces in the mesh.
The orientation method.
Reverses the orientation of the vertices in each face.
Split the mesh into its unconnected components.
Each unconnect component as a new mesh.
Remove all unconnected compontents except the largest.
Largest is defined by the face count.
The numbero of largest components to keep.
The number of components removed in the mesh.
Create a mesh consisting of one polygon face.
The faces polygon.
Should the y coord of the points be used for the z coord.
Thrown if the polygon is not simple.
Create the dual mesh where each face becomes a vertex
and each vertex becomes a face.
Must be a valid closed mesh to create the dual.
The duel mesh.
Is thrown if the mesh is not a valid closed mesh.
Convert to a surface mesh.
The surface mesh.
Find the min, max and average edge lengths in the mesh
The min, max and average edge lengths in the mesh.
Find the min, max and average face areas in the mesh
The min, max and average face areas in the mesh.
Locate the face the rays hits.
The ray.
The hit result.
Find the face closest to the point.
The point.
The hit result.
The abstract polyhedra definition.
Cached values found by running Update.
Default constructor.
Construct with a new kernel.
The mesh kernel.
Construct with a new kernel.
The mesh kernel.
The meshs pointer.
The mesh kernel.
Contains the functions to the unmanaged CGAL polhedron.
Number of vertices.
Number of faces.
Number of half edges.
Number of border edges.
Since each border edge of a polyhedral surface has exactly one
border halfedge, this number is equal to size of border halfedges.
Number of border halfedges.
The current build stamp.
Returns true if the polyhedral surface is combinatorially consistent.
Must be a valid mesh to check many other properties.
Returns true if there are no border edges.
Returns true if all faces are triangles.
Returns true if all faces are quads.
Is the mesh a valid triangle mesh.
Is the mesh a valid closed mesh.
Is the mesh a valid closed triangle mesh.
Has the update function been called.
Mark th mesh as needing to be updated.
Clear the mesh.
Clear the index maps.
The index maps are used to access the meshes elemnts by index.
They are automaticaly created when a elements is accessed
be a function requiring it.
True to clear the vertex index map.
True to clear the face index map.
True to clear the edges index map.
Clear the normal maps.
True to clear the vertex normal map.
True to clear the face normal map
Builds the vertex and/or face index maps if needed.
True to build the vertex index map.
True to build the face index map.
True to build the face index map.
True to force the build even if already built.
A tetrahedron is added to the polyhedral surface
with its vertices initialized to p1, p2, p3, and p4.
A edge in the tetrahdron.
A triangle with border edges is added to the
polyhedral surface with its vertices initialized to p1, p2, and p3.
A edge in the triangle.
Create a mesh from the points and indices.
The meshes points.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Create a triangle mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a quad mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a mesh with quads and triangles.
The meshes points.
The point array length.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Create a mesh with riangles, quads, pentagons and hexagons.
The meshs points.
The length of the point array.
The faces indices.
Create a mesh consisting of one polygon face.
The faces points
The point array length.
Should the y coord of the points be used for the z coord.
Get the triangle and quad indices.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Get the meshes triangles.
The meshes triangles.
The triangle array length.
Get the meshes quads.
The meshes quads.
The quads array length.
Get the meshes triangles and quads.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Get the meshes triangles, quads, pentagons and hexagons.
The indices.
Get the dual meshes triangles, quads, pentagons and hexagons.
A dual mesh is were faces become vertices and vertices become faces.
The indices
Array accessor for the polygon.
Getting a point wraps around the polygon.
The points index.
The vertices point.
Get the vertices point.
The vertex index in the mesh.
The vertices point.
If index is out of range.
Get the point at the index
and wrap around the polygon.
The points index.
The point at the index.
Get the point at the index
and clamp to the polygons last point.
The points index.
The point at the index.
Get the vertices point but wraps the index.
The vertex index in the mesh.
The vertices point.
Get the points in the mesh.
The array to copy points into.
The point array length.
Set the point at the index.
The points index
The pointsam>
If index is out of range.
Set the points from a array.
The point array.
The point arrays length.
Get a halfedges segment.
The halfedges index.
The segment.
True if halfedge found.
Get the segment.
The segment index.
The segment
If segmentwith the index not found.
Get a segment for each halfedge in the mesh.
The segment array.
The segment array length.
Get the faces triangle.
Presumes face is a triangle with no checks.
The faces index.
The faces triangle
Get the triangle.
The triangle index.
The triangle
If triangle with the index not found.
Get a triangle for each face in the mesh.
Presumes all faces are triangles with no checks.
The trainagle array.
The traingle arrays length.
Get the mesh vertex.
The vertices index.
The vertex.
True if the vertex was found.
Get the mesh vertex.
The vertexs index.
The vertexs
If vertex with the index not found.
Get the vertices in the mesh.
The vertex array.
The vertex array length.
Get the mesh face.
The faces index.
The face.
True if the face was found.
Get the mesh face.
The faces index.
The faces
If face with the index not found.
Get the faces in the mesh.
The face array.
The face array length.
Get the mesh halfedge.
The halfedges index.
The halfedge.
True if the halfedge was found.
Get the mesh Halfedge.
The Halfedges index.
The Halfedges
If Halfedge with the index not found.
Get the halfedges in the mesh.
The halfedge array.
The halfedge array length.
Count the number of triangles, quads and polygons in the mesh.
The number of triangles, quads and polygons in the mesh.
Count the number of triangles, quads and polygons in the dual mesh.
A dual mesh is were faces become vertices and vertices become faces.
The number of triangles, quads and polygons in the mesh.
Get a centroid (the avergae face position) for each face in the mesh.
The point array.
The points arrays lemgth.
Computes the vertex normals if needed.
Computes the face normals if needed.
Get the vertex normals.
The normals array.
The normals array length.
Get the face normals.
The normals array.
The normals array length.
Translate each point in the mesh.
The amount to translate.
Rotate each point in the mesh.
The amount to rotate.
Scale each point in the mesh.
The amount to scale.
Transform each point in the mesh.
The amount to translate.
The amount to rotate.
The amount to scale.
Make all faces triangles.
sorts halfedges such that the non-border edges precede the border edges.
For each border edge the halfedge iterator will reference the halfedge
incident to the facet right before the halfedge incident to the hole.
returns true if the border halfedges are in normalized representation,
which is when enumerating all halfedges with the iterator:
The non-border edges precede the border edges and for border edges,
the second halfedge is the border halfedge.
Find what side of the mesh the lies in.
The point to check.
ON_BOUNDED_SIDE if point inside mesh,
ON_UNBOUNDED_SIDE if point not inside,
ON_BOUNDARY if point is on the surface.
Does the mesh contain the point.
The point.
If point is on the boundary does it count a being contained.
True if the poly contains the point
Locate the face the rays hits.
The ray.
The hit result.
Find the face closest to the point.
The point.
The hit result.
Locate the face hit by the ray.
The ray.
The hit face.
True if the ray hit a face.
Locate the vertex hit by the ray.
The ray.
The distance the vertex has to be within hit point.
The hit vertex.
True if the ray hit a vertex.
Locate the edge hit by the ray.
The ray.
The distance the edge has to be within hit point.
The hit edge.
True if the ray hit a edge.
Tests if a set of faces of a triangulated surface mesh self-intersects.
Must be a triangle mesh.
True/Fasle if a valid triangle polyhedra,or UNDETERMINED if not.
returns true if the polyhedral surface is combinatorially consistent.
For level == 1 the normalization of the border edges is checked too.
This method checks that each face is at least a triangle and that the
two incident facets of a non-border edge are distinct.
Computes the bounding box.
The bounding box.
Computes the area of a range of faces
of a given triangulated surface mesh.
The area or 0 if poyhedron is not valid triangle mesh.
computes the centroid of a volume bounded
by a closed triangulated surface mesh.
The centroid or 0 if poyhedron is not valid.
Computes the volume of the domain bounded by a
closed triangulated surface mesh.
The volume or 0 if poyhedron is not valid closed triangle mesh.
Returns true if there are no border edges.
True/Fasle if valid, or UNDETERMINED if not a valid polyhedra.
Returns true if all vertices have exactly two incident edges.
True/Fasle if valid, or UNDETERMINED if not a valid polyhedra.
Returns true if all vertices have exactly three incident edges.
True/Fasle if valid, or UNDETERMINED if not a valid polyhedra.
Returns true if all faces are triangles.
True/Fasle if valid, or UNDETERMINED if not a valid polyhedra.
Returns true if all faces are quads.
True/Fasle if valid, or UNDETERMINED if not a valid polyhedra.
Indicates if the mesh bounds a volume.
Must be a closed and triangulated.
True/Fasle if a valid triangle closed polyhedra,or UNDETERMINED if not.
Builds the aabb tree used for location.
Tree will be automatically built if need so not
actually necessary to call this function.
Will delete the aabb tree.
Returns true if there exists a face of this poly and
a face of other poly which intersect, and false otherwise.
Must be a triangle mesh
The other triangle poly.
If test_bounded_sides is set to true,
the overlap of bounded sides are tested as well. In that case, the meshes must be closed.
True/Fasle if a valid triangle closed polyhedra,or UNDETERMINED if not.
Subdive the mesh.
The number of iterations to perfrom.
The subdivision method.
Simplify the polyhedra.
A number between 0-1 that represents the percentage of vertices to remove.
Refines a triangle mesh
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices.
Orient the faces in the mesh.
The orientation method.
Reverses the orientation of the vertices in each face.
Remove all unconnected compontents except the largest.
Largest is defined by the face count.
The numbero of largest components to keep.
The number of components removed in the mesh.
Find the min, max and average edge lengths in the mesh
The min, max and average edge lengths in the mesh.
Find the min, max and average face areas in the mesh
The min, max and average face areas in the mesh.
Enumerate all points in the mesh.
Each point in mesh.
Enumerate all points in the mesh.
Each point in mesh.
Read data from a off file into the pollyhedron.
The files name.
Write data from a off file into the pollyhedron.
The files name.
Return all the points in the mesh in a array.
The array.
Return all the points in the mesh in a list.
The list.
https://doc.cgal.org/latest/Polyhedron/classCGAL_1_1Polyhedron__3.html#a73119c0c90bf8612da003305af25a52a
creates a new facet within the hole incident to h and g by connecting the
vertex denoted by g with the vertex denoted by h with a new halfedge and
filling this separated part of the hole with a new facet, such that the
new facet is incident to g.
Precondition
h->is_border(), g->is_border(), h != g, h->next() != g,
and g can be reached along the same hole starting with h.
a halfedge index
a halfedge index
Returns the halfedge of the new edge that is incident to the new facet.
creates a new facet within the hole incident to h and g by connecting the
tip of g with the tip of h with two new halfedges and a new vertex and
filling this separated part of the hole with a new facet, such that the
new facet is incident to g.
Precondition
h->is_border(), g->is_border(), h != g, and g can be reached along the same hole starting with h.
a halfedge index
a halfedge index
Returns the halfedge of the new edge that is incident to the new facet and the new vertex.
barycentric triangulation of h->facet().
Creates a new vertex, a copy of h->vertex(), and connects it to each vertex incident
to h->facet() splitting h->facet() into triangles.h remains incident to the original
facet, all other triangles are copies of this facet.
Precondition
h is not a border halfedge.
a halfedge index
Returns the halfedge h->next()
after the operation, i.e., a halfedge pointing to the new vertex.The time is
proportional to the size of the facet.
reverses create_center_vertex().
Erases the vertex pointed to by g and all incident halfedges thereby merging all
incident facets.Only g->facet() remains. The neighborhood of g->vertex() may not
be triangulated, it can have larger facets.
Precondition
None of the incident facets of g->vertex() is a hole. There are at least two distinct facets incident to the facets that are incident to g->vertex(). (This prevents the operation from collapsing a volume into two facets glued together with opposite orientations, such as would happen with any vertex of a tetrahedron.)
Supports_removal must be CGAL::Tag_true.
a halfedge index
Returns the halfedge g->prev().
Thus, the invariant h == erase_center_vertex(create_center_vertex(h))
holds if h is not a border halfedge.The time is proportional to the sum of the size of all incident facets.
removes the incident facet of h and changes all halfedges incident to the facet
into border edges or removes them from the polyhedral surface if they were already border edges.
If this creates isolated vertices they get removed as well.See make_hole(h) for a more specialized variant.
Precondition
h->is_border() == false.
Supports_removal must be CGAL::Tag_true
a halfedge index
Erase a facet.
a halfedge index
returns a range of handles over the facets.
fills a hole with a newly created facet.
Makes all border halfedges of the hole denoted
by h incident to the new facet.Returns h.
Precondition
h.is_border().
a halfedge index
performs an edge flip.
Precondition
h != Halfedge_handle() and both facets incident to h are triangles.
a halfedge index
It returns h after rotating the edge h one vertex in the direction of the face orientation.
joins the two facets incident to h.
The facet incident to h->opposite() gets removed.Both facets might be holes.
Precondition
The degree of both vertices incident to h is at least three(no antennas).
Supports_removal must be CGAL::Tag_true.
a halfedge index
Returns the predecessor of h around the facet. The invariant join_facet(split_facet(h, g))
returns h and keeps the polyhedron unchanged.The time is proportional to the size of
the facet removed and the time to compute h->prev().
glues the boundary of the two facets denoted by h and g together and returns h.
Both facets and the vertices along the facet denoted by g gets removed.Both facets may be holes.
The invariant join_loop(h, split_loop(h, i, j))
Precondition
The facets denoted by h and g are different and have equal degree(i.e., number of edges).
Supports_removal must be CGAL::Tag_true.
a halfedge index
a halfedge index
returns h and keeps the polyhedron unchanged.
joins the two vertices incident to h.
The vertex denoted by h->opposite() gets removed.
Precondition
The size of both facets incident to h is at least four(no multi-edges).
Supports_removal must be CGAL::Tag_true.
a halfedge index
Returns the predecessor of h around the vertex, i.e.,
h->opposite()->prev(). The invariant join_vertex(split_vertex(h, g))
returns h and keeps the polyhedron unchanged.The time is proportional
to the degree of the vertex removed and the time to compute h->prev() and h->opposite()->prev().
removes the incident facet of h and changes all halfedges incident to the facet into border edges.
Precondition
None of the incident halfedges of the facet is a border edge.
Supports_removal must be CGAL::Tag_true.
a halfedge index
Returns h.See erase_facet(h) for a more generalized variant.
splits the halfedge h into two halfedges inserting a new vertex that is a copy of h->opposite()->vertex().
Is equivalent to split_vertex(h->prev(), h->opposite())->opposite(). The call of prev() can make this method
slower than a direct call of split_vertex() if the previous halfedge is already known and computing
it would be costly when the halfedge data structure does not support the prev() member function.
a halfedge index
Returns the new halfedge now pointing to the inserted vertex.The new halfedge is followed
by the old halfedge, i.e., hnew->next() == h.
splits the facet incident to h and g into two facets with a new diagonal between
the two vertices denoted by h and g respectively.
The second(new) facet is a copy of the first facet.
Precondition
h and g are incident to the same facet.h != g (no loops). h->next() != g and g->next() != h (no multi-edges).
a halfedge index
a halfedge index
Returns h->next() after the
operation, i.e., the new diagonal.The new face is to the right of the new diagonal,
the old face is to the left.The time is proportional to the distance from h to g around the facet.
cuts the polyhedron into two parts along the cycle (h,i,j) (edge j runs on the backside of the three dimensional figure above).
Three new vertices(one copy for each vertex in the cycle) and three new halfedges(one copy for each halfedge in the cycle),
and two new triangles are created.h,i,j will be incident to the first new triangle.
Precondition
h, i, j denote distinct, consecutive vertices of the polyhedron and form a cycle: i.e., h->vertex() == i->opposite()->vertex(),
… , j->vertex() == h->opposite()->vertex(). The six facets incident to(h, i, j) are all distinct.
a halfedge index
a halfedge index
a halfedge index
The return value will be the halfedge
incident to the second new triangle which is the copy of h-opposite().
splits the vertex incident to h and g into two vertices, the old vertex remains and a
new copy is created, and connects them with a new edge.
Let hnew be h->next()->opposite() after the split, i.e., a halfedge of the new edge.
The split regroups the halfedges around the two vertices.The halfedge sequence hnew,
g->next()->opposite(), … , h remains around the old vertex, while the halfedge
sequence hnew->opposite(), h->next()->opposite() (before the split), … , g is
regrouped around the new vertex.
Precondition
h and g are incident to the same vertex. h != g (antennas are not allowed).
a halfedge index
a halfedge index
The split returns hnew, i.e., the new halfedge
incident to the old vertex.The time is proportional to the distance from h to
g around the vertex.
Update the mesh if needed.
Print the mesh into a string builder.
Release the unmanaged pointer.
This class is a data structure that can be used as halfedge data structure.
It is an alternative to the classes Polyhedron3.The main difference is that it is indexed based and not pointer based,
and that the mechanism for adding information to vertices, halfedges, edges, and faces is much simpler.
When elements are removed, they are only marked as removed, and a garbage collection function must be called to really remove them.
The kernel type
Default constructor.
Construct from points and triangle indices.
Construct from points and polygon indices.
Create from a pointer.
The surface meshes pointer.
The mesh as a string.
The mesh as a string.
Create a deep copy of the mesh.
The deep copy.
Subdive the mesh.
The number of iterations to perfrom.
The subdivision method.
Simplify the polyhedra.
A number between 0-1 that represents the percentage of vertices to remove.
Refines a triangle mesh
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices.
Orient the faces in the mesh.
The orientation method.
Reverses the orientation of the vertices in each face.
Split the mesh into its unconnected components.
Each unconnect component as a new mesh.
Remove all unconnected compontents except the largest.
Largest is defined by the face count.
The numbero of largest components to keep.
The number of components removed in the mesh.
Copy the other mesh to this one.
Create a mesh consisting of one polygon face.
The faces polygon.
Should the y coord of the points be used for the z coord.
Thrown if the polygon is not simple.
Convert to a polyhedron mesh.
The polyhedron mesh.
Find the min, max and average edge lengths in the mesh
The min, max and average edge lengths in the mesh.
Find the min, max and average face areas in the mesh
The min, max and average face areas in the mesh.
Locate the face the rays hits.
The ray.
The hit result.
Find the face closest to the point.
The point.
The hit result.
The surface mesh abstract base class.
Cached values found by running Update.
Default constructor.
Construct mesh with the kernel.
The kernel
Construct with a new kernel.
The surface meshes kernel.
The surface meshes pointer.
The meshes kernel type.
The number of vertices in the mesh.
The number of half edges in the mesh.
The number of edges in the mesh.
The number of faces in the mesh.
The number of border edges.
The current build stamp.
The number of vertices currenly maked to be removed
but have not. Calling collect garbage will remove them.
The number of vertices marked to be removed.
The number of halfedges currenly maked to be removed
but have not. Calling collect garbage will remove them.
The number of half edges marked to be removed.
The number of edges currenly maked to be removed
but have not. Calling collect garbage will remove them.
The number of edges marked to be removed.
The number of faces currenly maked to be removed
but have not. Calling collect garbage will remove them.
The number of face marked to be removed.
Returns true if the meshl surface is combinatorially consistent.
Must be a valid mesh to check many other properties.
Returns true if there are no border edges.
Returns true if all faces are triangles.
Returns true if all faces are quads.
Is the mesh a valid triangle mesh.
Is the mesh a valid closed mesh.
Is the mesh a valid closed triangle mesh.
Has the update function been called.
Mark the mesh as needing to be updated.
Clear the mesh.
Clear the index maps.
The index maps are used to access the meshes elemnts by index.
They are automaticaly created when a elements is accessed
be a function requiring it.
True to clear the vertex index map.
True to clear the face index map.
True to clear the edges index map.
True to clear the halfedges index map.
Clear the normal maps.
True to clear the vertex normal map.
True to clear the face normal map
Clear the property maps.
Build the index maps.
The index maps are used to access the meshes elemnts by index.
They are automaticaly created when a elements is accessed
be a function requiring it but can be create ahead of time.
True to build the vertex index maps.
True to build the face index maps.
True to build the edge index maps.
True to build the halfedge index maps.
The index maps wont be build if the mesh knows they are already built and upto date.
Setting force to true will build them always.
Adds a vertex to the mesh.
The vertices position
The vertices index in the mesh.
Adds a edge between the two vertices.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the edge in the mesh.
Adds a triangle face to the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the face in the mesh.
Adds a quad face to the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the face in the mesh.
Adds a pentagon face to the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the face in the mesh.
Adds a hexagon face to the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the face in the mesh.
Add a polygon face to the mesh.
The indices of the points in the mesm.
The indices array length.
The index of the face in the mesh.
Checks if any vertices, halfedges, edges, or faces are marked as removed.
Really removes vertices, halfedges, edges, and faces which are marked removed.
By garbage collecting elements get new indices. In case you store indices in an
auxiliary data structure or in a property these indices are potentially no
longer refering to the right elements.
Controls the recycling or not of simplices previously marked as removed
upon addition of new elements.
When set to true (default value), new elements are first picked in the
garbage(if any) while if set to false only new elements are created.
Array accessor for the polygon.
Getting a point wraps around the polygon.
Get the vertices point.
The vertex index in the mesh.
The vertices point.
If index is out of range.
Get the points in the mesh.
The array to copy points into.
The point array length.
Set the point at the index.
The points index
The pointsam>
If index is out of range.
Set the points from a array.
The point array.
The point arrays length.
Get a halfedges segment.
The halfedges index.
The segment.
True if halfedge found.
Get a segment for each halfedge in the mesh.
The segment array.
The segment array length.
Get the faces triangle.
Presumes face is a triangle with no checks.
The faces index.
The faces triangle
Get a triangle for each face in the mesh.
Presumes all faces are triangles with no checks.
The trainagle array.
The traingle arrays length.
Get the mesh vertex.
The vertices index.
The vertex.
True if the vertex was found.
Get the mesh vertex.
The vertices index.
The vertex.
Get the vertices in the mesh.
The vertex array.
The vertex array length.
Get the mesh face.
The faces index.
The face.
True if the face was found.
Get the mesh face.
The faces index.
The face.
Get the faces in the mesh.
The face array.
The face array length.
Get the mesh halfedge.
The halfedges index.
The halfedge.
True if the halfedge was found.
Get the mesh halfedge.
The halfedges index.
THe healfedge.
Get the halfedges in the mesh.
The halfedge array.
The halfedge array length.
Returns the number of incident halfedges of vertex.
The index of the vertex in the mesh.
Returns the number of incident halfedges of vertex.
Returns the number of incident halfedges of face.
The index of the face in the mesh.
Returns the number of incident halfedges of face.
Returns whether vertex is isolated.
The index of the vertex in the mesh.
Returns whether vertex is isolated.
Returns whether vertex is a border vertex.
If the data contained in the Surface_mesh is not
a 2-manifold, then this operation is not
guaranteed to return the right result.
he index of the vertex in the mesh.
With the default value for
check_all_incident_halfedges the function iteratates over the incident
halfedges. With check_all_incident_halfedges == false the function
returns true, if the incident halfedge associated to vertex is a
border halfedge, or if the vertex is isolated.
Returns whether vertex is a border vertex.
Returns whether edge is a border edge, i.e., if any of its two halfedges is a border halfedge.
The index of the edge in the mesh.
Returns whether edge is a border edge.
Returns the next halfedge within the incident face.
The index of the halfedge in the mesh.
Returns the next halfedge within the incident face.
Returns the previous halfedge within the incident face.
The index of the halfedge in the mesh.
Returns the previous halfedge within the incident face.
Returns the opposite halfedge of halfedge.
The index of the halfedge in the mesh.
Returns the opposite halfedge of halfedge.
Returns the vertex the halfedge emanates from.
The index of the halfedge in the mesh.
Returns the vertex the halfedge emanates from.
Returns the vertex the halfedge points to.
The index of the halfedge in the mesh.
Returns the vertex the halfedge points to.
Removes vertex from the halfedge data structure without adjusting anything.
The index of the vertex in the mesh.
True if face removed.
Removes the two halfedges corresponding to edge from the halfedge
data structure without adjusting anything.
The index of the edge in the mesh.
True if face removed.
Removes face from the halfedge data structure without adjusting anything.
The index of the face in the mesh.
True if face removed.
Has this vertex been marked to be removed.
The vertices index in the mesh.
Has this vertex been marked to be removed.
Has this face been marked to be removed.
The faces index in the mesh.
Has this face been marked to be removed.
Has this halfedge been marked to be removed.
The halfedge index in the mesh.
Has this halfedge been marked to be removed.
Has this edge been marked to be removed.
The edges index in the mesh.
Has this edge been marked to be removed.
Performs a validity check on a single vertex.
The index of the vertex in the mesh.
True if valid.
Performs a validity check on a single edge.
The index of the edge in the mesh.
True if valid.
Performs a validity check on a single halfedge.
The index of the halfedge in the mesh.
True if valid.
Performs a validity check on a single face.
The index of the face in the mesh.
True if valid.
Translate each point in the mesh.
The amount to translate.
Rotate each point in the mesh.
The amount to rotate.
Scale each point in the mesh.
The amount to scale.
Transform each point in the mesh.
The amount to translate.
The amount to rotate.
The amount to scale.
Create a mesh from the points and indices.
The meshes points.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Create a triangle mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a quad mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a mesh with quads and triangles.
The meshes points.
The point array length.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Create a mesh with riangles, quads, pentagons and hexagons.
The meshs points.
The length of the point array.
The faces indices.
Create a mesh consisting of one polygon face.
The faces points
The paoint array length.
Should the y coord of the points be used for the z coord.
Get the triangle and quad indices.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Get the meshes triangles.
The meshes triangles.
The triangle array length.
Get the meshes quads.
The meshes quads.
The quads array length.
Get the meshes triangles and quads.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Get the meshes triangles, quads, pentagons and hexagons.
The indices.
Whether v is a border vertex.
The vertices index.
With the default value for
check_all_incident_halfedges the function iteratates over the incident halfedges.
With check_all_incident_halfedges == false the function returns true,
if the incident halfedge associated to vertex v is a border halfedge,
or if the vertex is isolated.
Whether v is a border vertex.
Whether half edge is a border halfege, that is if its incident face is null.
The halfedges index.
Whether half edge is a border halfege.
Whether e is a border edge, i.e., if any of its two halfedges is a border halfedge.
The edges index.
Whether e is a border edge.
Count the number of triangles, quads and polygons in the mesh.
The number of triangles, quads and polygons in the mesh.
Count the number of triangles, quads and polygons in the dual mesh.
A dual mesh is were faces become vertices and vertices become faces.
The number of triangles, quads and polygons in the mesh.
Build the aabb tree.
Release the aabb tree.
Find the bounding box of the meshes points.
Read the mesh from a off file format.
The files name.
Write the mesh to off file format.
The files name.
Make all faces triangles.
Tests if a set of faces of a triangulated surface mesh self-intersects.
Must be a triangle mesh.
True/Fasle if a valid triangle mesh,or UNDETERMINED if not.
Perform an expensive validity check on the data structure.
If the mesh is valid.
Find if all the faces in the mesh are triangles.
True if all the faces in the mesh are triangles, Will be undetermined if no a valid mesh.
Find if all the faces in the mesh are quads.
True if all the faces in the mesh are quads, Will be undetermined if no a valid mesh.
Find if the mesh is closed, ie has no border edges.
Computes the area of a range of faces
of a given triangulated surface mesh.
The area or 0 if mesh is not valid triangle mesh.
computes the centroid of a volume bounded
by a closed triangulated surface mesh.
The centroid or 0 if mesh is not valid.
Computes the volume of the domain bounded by a
closed triangulated surface mesh.
The volume or 0 if mesh is not valid closed triangle mesh.
Indicates if the mesh bounds a volume.
Must be a closed and triangulated.
True/Fasle if a valid triangle closed mesh,or UNDETERMINED if not.
Find what side of the mesh the lies in.
The point to check.
ON_BOUNDED_SIDE if point inside mesh,
ON_UNBOUNDED_SIDE if point not inside,
ON_BOUNDARY if point is on the surface.
Does the mesh contain the point.
The point.
If point is on the boundary does it count a being contained.
True if the poly contains the point
Locate the face the rays hits.
The ray.
The hit result.
Find the face closest to the point.
The point.
The hit result.
Locate the face hit by the ray.
The ray.
The hit face.
True if the ray hit a face.
Locate the vertex hit by the ray.
The ray.
The distance the vertex has to be within hit point.
The hit vertex.
True if the ray hit a vertex.
Locate the edge hit by the ray.
The ray.
The distance the edge has to be within hit point.
The hit edge.
True if the ray hit a edge.
Returns true if there exists a face of this poly and
a face of other mesh which intersect, and false otherwise.
Must be a triangle mesh
The other triangle poly.
If test_bounded_sides is set to true,
the overlap of bounded sides are tested as well. In that case, the meshes must be closed.
True/Fasle if a valid triangle closed mesh,or UNDETERMINED if not.
Find the min, max and average edge lengths in the mesh
The min, max and average edge lengths in the mesh.
Find the min, max and average face areas in the mesh
The min, max and average face areas in the mesh.
Subdive the mesh.
The number of iterations to perfrom.
The subdivision method.
Simplify the polyhedra.
A number between 0-1 that represents the percentage of vertices to remove.
Refines a triangle mesh
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices.
Orient the faces in the mesh.
The orientation method.
Reverses the orientation of the vertices in each face.
Remove all unconnected compontents except the largest.
Largest is defined by the face count.
The numbero of largest components to keep.
The number of components removed in the mesh.
Get a centroid (the avergae face position) for each face in the mesh.
The point array.
The points arrays lemgth.
Compute the vertex normal map.
Will only be computed if mesh has
changed since last computation or
no current nomral maps have been computed.
Compute the face normal map.
Will only be computed if mesh has
changed since last computation or
no current nomral maps have been computed.
Get the vertex normals.
Will be compute if they have not aready.
The normal map array.
The normal maps array length.
Get the face normals.
Will be compute if they have not aready.
The normal map array.
The normal maps array length.
Enumerate all points in the mesh.
Each point in mesh.
Enumerate all points in the mesh.
Each point in mesh.
Return all the points in the mesh in a array.
The array.
Return all the points in the mesh in a list.
The list.
Update the mesh if needed.
Print the mesh into a string builder.
Release any unmanaged resources.
Generic polyline definition.
The kernel type.
Default constructor.
Create from a set of points.
The polylines points.
Create from a pointer.
The polylines pointer.
The polyline as a string.
The polyline as a string.
Copy the polyline.
The copied polyline.
Create a polygon from the line.
Threshold for the firat and last points being equal.
The polygon.
The abstract polyline definition.
Default constructor.
Construct with a new kernel.
The polyline kernel.
Construct with a new kernel.
The polyline kernel.
The points to construct from.
Construct with a new kernel.
The polyline kernel.
The polylines pointer.
The number of points in the polyline.
The capacity of the point array.
Get the first point.
Get the last point.
The polylines kernel.
Contains the functions to the unmanaged CGAL polyline.
Array accessor for the polyline.
Getting a point clamps to the last point in polyline.
Clear the polyline of all points.
Shrink the capacity to match the point count.
Resize the point array.
New elements will default to zero.
Reverse the polints in the line.
Remove the point at the index from the array.
The points index
Remove a range of points from the array.
The starting index
The number of points to remove.
Remove the last point.
Remove the point at the index from the array.
The points index.
The point to insert.
Remove a range of points from the array.
The points to insert.
The starting index.
The number of points to insert.
Add the point to the end of the poylline.
The point to add.
Does the first and last point match.
The distance threshold that counts as match.
Get the point a the index.
The points index to get.
The point at index.
Get the point at the index
and wrap around the polyline.
The points index.
The point at the index.
Get the point at the index
and clamp to the polylines last point.
The points index.
The point at the index.
Get all the points in the polyline.
The point array to copy the data into.
The array length.
Get all the polyline points.
The list to copy the data into.
Get all the polyline segments.
The segment array to copy the data into.
The array length.
Set the points at the index.
The points index.
The points value.
Set the points from the array.
If the array is larger than the polyline then
the new points will be appended to end of polyline.
The points array.
The array length.
Finds the length of the polyline.
Finds the square length of the polyline.
Translate the polyline.
The amount to translate.
Rotate the polyline.
The amount to rotate in radians.
Scale the polyline.
The amount to scale.
Transform the polyline with a TRS matrix.
The amount to translate.
The amount to rotate.
The amount to scale.
Enumerate all points in the polyline.
Each point in polyline.
Enumerate all points in the polyline.
Each point in polyline.
Return all the points in the polyline in a array.
The array.
Return all the points in the polyline in a list.
The list.
Convert the polyline to a new polyline with a different kernel.
May result in different values due to precision issues.
The new kernel type.
The new polline.
Print the polyline into a styring builder.
Release the unmanaged pointer.
Release the unmanaged pointer.
Generic polyline definition.
The kernel type.
Default constructor.
Create from a set of points.
The polylines points.
Create from a pointer.
The polylines pointer.
The polyline as a string.
The polyline as a string.
Copy the polyline.
The copied polyline.
The abstract polyline definition.
Default constructor.
Construct with a new kernel.
The polyline kernel.
Construct with a new kernel.
The polyline kernel.
The points to construct from.
Construct with a new kernel.
The polyline kernel.
The polylines pointer.
The number of points in the polyline.
The capacity of the point array.
Get the first point.
Get the last point.
The polylines kernel.
Contains the functions to the unmanaged CGAL polyline.
Array accessor for the polyline.
Getting a point clamps to the last point in polyline.
Clear the polyline of all points.
Shrink the capacity to match the point count.
Resize the point array.
New elements will default to zero.
Reverse the polints in the line.
Remove the point at the index from the array.
The points index
Remove a range of points from the array.
The starting index
The number of points to remove.
Remove the last point.
Remove the point at the index from the array.
The points index.
The point to insert.
Remove a range of points from the array.
The points to insert.
The starting index.
The number of points to insert.
Add the point to the end of the poylline.
The point to add.
Does the first and last point match.
The distance threshold that counts as match.
Get the point a the index.
The points index to get.
The point at index.
Get the point at the index
and wrap around the polyline.
The points index.
The point at the index.
Get the point at the index
and clamp to the polylines last point.
The points index.
The point at the index.
Get all the points in the polyline.
The point array to copy the data into.
The array length.
Get all the polyline points.
The list to copy the data into.
Get all the polyline segments.
The segment array to copy the data into.
The array length.
Set the points at the index.
The points index.
The points value.
Set the points from the array.
If the array is larger than the polyline then
the new points will be appended to end of polyline.
The points array.
The array length.
Finds the length of the polyline.
Finds the square length of the polyline.
Translate each point in the polyline.
The amount to translate.
Rotate each point in the polyline.
The amount to rotate.
Scale each point in the polyline.
The amount to scale.
Transform each point in the polyline.
The amount to translate.
The amount to rotate.
The amount to scale.
Enumerate all points in the polyline.
Each point in polyline.
Enumerate all points in the polyline.
Each point in polyline.
Return all the points in the polyline in a array.
The array.
Return all the points in the polyline in a list.
The list.
Convert the polyline to a new polyline with a different kernel.
May result in different values due to precision issues.
The new kernel type.
The new polline.
Print the polyline into a styring builder.
Release the unmanaged pointer.
Release the unmanaged pointer.
The heat method is an algorithm that solves the single- or multiple-source shortest
path problem by returning an approximation of the geodesic distance for all vertices
of a triangle mesh to the closest vertex in a given set of source vertices.
The geodesic distance between two vertices of a mesh is the distance when walking
on the surface, potentially through the interior of faces. Two vertices that are
close in 3D space may be far away on the surface.
Create a static instance.
Create a new instance.
Create a new instance from a existing pointer to a unmanaged object.
The unmanaged objects pointer.
Find the distances for each vertex in the mesh to the vertex at the provided index.
The mesh containing the vertices.
The vertices index to find the distances to.
The distances for each vertex in the mesh.
Should the intrinsitic delaunay triangulation be used.
This will improve the results for meshes that have bad triangle quality.
The maximum distance value.
Find the distances for each vertex in the mesh to the vertex at the provided index.
The mesh containing the vertices.
The vertices index to find the distances to.
The distances for each vertex in the mesh.
This will improve the results for meshes that have bad triangle quality.
The maximum distance value.
Create a new instance.
Create a new instance from a existing pointer to a unmanaged object.
The unmanaged objects pointer.
Release any unmanaged resources.
Returns the number of unconnect components in the mesh.
A valid mesh.
Returns the number of unconnect components in the mesh.
Returns a list of face indices that are part of the same component as the provided face index.
A valid mesh.
The faces index in the mesh.
A list of face indices that are part of the same component as the provided face index.
Returns a list of face indices that are part of the same component as the provided face index.
A valid mesh.
The faces index in the mesh.
A list of face indices that are part of the same component as the provided face index.
Split each component in the mesh into individual meshes.
A valid mesh.
The split meshes.
Split each component in the mesh into individual meshes.
A valid mesh.
The split meshes.
Removes connected components with less than a given number of faces.
A valid mesh.
The number of faces a component must have so that it is kept
The number of components removed.
Removes connected components with less than a given number of faces.
A valid mesh.
The number of faces a component must have so that it is kept
The number of components removed.
Removes the small connected components and all isolated vertices.
A valid mesh.
Keep this number of the largest connected components.
The number of components removed.
Removes the small connected components and all isolated vertices.
A valid mesh.
Keep this number of the largest connected components.
The number of components removed.
Release any unmanaged resources.
Detects the edges that are considered to be sharp with respect to the given angle bound.
A valid mesh.
Angle in deg gives the maximum angle between
the two normal vectors of adjacent triangles. For an edge of the input polygon mesh,
if the angle between the two normal vectors of its incident facets is bigger than
the given bound, then the edge is marked as being a feature edge.
The halfedge indices of the edges that count as sharp.
Detects the edges that are considered to be sharp with respect to the given angle bound.
A valid mesh.
Angle in deg gives the maximum angle between
the two normal vectors of adjacent triangles. For an edge of the input polygon mesh,
if the angle between the two normal vectors of its incident facets is bigger than
the given bound, then the edge is marked as being a feature edge.
The halfedge indices of the edges that count as sharp.
Find the min, max and average edge lengths in the mesh.
A valid mesh.
The min, max and average edge lengths in the mesh.
Find the min, max and average edge lengths in the mesh.
A valid mesh.
The min, max and average edge lengths in the mesh.
Find the min, max and average face areas in the mesh.
A valid mesh.
The min, max and average face areas in the mesh.
Find the min, max and average face areas in the mesh.
A valid mesh.
The min, max and average face areas in the mesh.
Detects the sharp edges of mesh according to angle as the DetectSharpEdges function does.
The sharp edges are then used to define a segmentation of a mesh, that is done by computing
a surface patch id for each face.
A valid mesh.
Angle in deg gives the maximum angle between
the two normal vectors of adjacent triangles. For an edge of the input polygon mesh,
if the angle between the two normal vectors of its incident facets is bigger than
the given bound, then the edge is marked as being a feature edge.
The halfedge indices of the edges that count as sharp.
The face indices for each patch found.
Detects the sharp edges of pmesh according to angle as the DetectSharpEdges function does.
The sharp edges are then used to define a segmentation of a mesh, that is done by computing
a surface patch id for each face.
A valid mesh.
Angle in deg gives the maximum angle between
the two normal vectors of adjacent triangles. For an edge of the input polygon mesh,
if the angle between the two normal vectors of its incident facets is bigger than
the given bound, then the edge is marked as being a feature edge.
The face indices for each patch found.
Release any unmanaged resources.
Find a random point on mesh surface.
The mesh.
A random point on mesh surface.
Find a random point on mesh surface.
The mesh.
A random point on mesh surface.
Find the face the ray intersects with.
The mesh.
Th ray.
The hit result with theface index, hit point and the barycentric coords.
Find the face the ray intersects with.
The mesh.
Th ray.
The hit result with theface index, hit point and the barycentric coords.
Find the closest face to the point.
The mesh.
Th point.
The hit result with the face index, closest point and the barycentric coords.
Find the closest face to the point.
The mesh.
Th point.
The hit result with the face index, closest point and the barycentric coords.
Release any unmanaged resources.
Fills output with a closed mesh bounding the volume swept by input when translating its vertices by dir.
The mesh is oriented so that the faces corresponding to input in output have the same orientation.
The a valid closed mesh.
The direction vector.
The extuded mesh.
Fills output with a closed mesh bounding the volume swept by input when translating its vertices by dir.
The mesh is oriented so that the faces corresponding to input in output have the same orientation.
The a valid closed mesh.
The direction vector.
The extuded mesh.
Fairs a region on a triangle mesh based on a ring of k vertices from the index vertex.
The points of the selected vertices are relocated to yield an as-smooth-as-possible surface patch,
based on solving a linear bi-Laplacian system with boundary constraints
The region described by vertices might contain multiple disconnected components.
Note that the mesh connectivity is not altered in any way, only vertex locations get updated.
Fairing might fail if fixed vertices, which are used as boundary conditions,
do not suffice to solve constructed linear system.
Note that if the vertex range to which fairing is applied contains all the vertices of the triangle mesh,
fairing does not fail, but the mesh gets shrinked to the origin.
A valid triangle mesh.
The vertex index in the mesh to start hthe k ring region from.
The number of vertics to expand the region to.
If the fairing was successfully run.
Refines a triangle mesh
A valid triangle mesh.
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices added.
Refines a triangle mesh
A valid triangle mesh.
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices added.
Remeshes a triangulated region of a meshgon mesh.
This operation sequentially performs edge splits, edge collapses, edge flips,
tangential relaxation and projection to the initial surface to generate
a smooth mesh with a prescribed edge length.
A valid triangle mesh.
The number of times to perform the remeshing.
the edge length that is targeted in the remeshed patch.
If 0 is passed then only the edge-flip, tangential relaxation, and projection steps will be done.
The number of new vertices added.
Remeshes a triangulated region of a meshgon mesh.
This operation sequentially performs edge splits, edge collapses, edge flips,
tangential relaxation and projection to the initial surface to generate
a smooth mesh with a prescribed edge length.
A valid triangle mesh.
The number of times to perform the remeshing.
the edge length that is targeted in the remeshed patch.
If 0 is passed then only the edge-flip, tangential relaxation, and projection steps will be done.
The number of new vertices added.
randomly perturbs the locations of vertices of a triangulated surface mesh.
By default, the vertices are re-projected onto the input surface after
perturbation.Note that no geometric checks are done after the perturbation
(face orientation might become incorrect and self-intersections might be introduced).
A mesh.
The maximun amount a vertex will be pertured. Must be greater tha 0.
randomly perturbs the locations of vertices of a triangulated surface mesh.
By default, the vertices are re-projected onto the input surface after
perturbation.Note that no geometric checks are done after the perturbation
(face orientation might become incorrect and self-intersections might be introduced).
A mesh.
The maximun amount a vertex will be pertured. Must be greater tha 0.
Smooths a triangulated mesh.
This function attempts to make the triangle angle and area distributions as uniform
as possible by moving(non-constrained) vertices.
Angle-based smoothing does not change the combinatorial information of the mesh.
Area-based smoothing might change the combinatorial information, unless specified otherwise.
It is also possible to make the smoothing algorithm "safer" by rejecting moves that,
when applied, would worsen the quality of the mesh, e.g.that would decrease the value
of the smallest angle around a vertex or create self-intersections.
Optionally, the points are reprojected after each iteration.
A valid triangle mesh.
The edge angle that counts a feature and wont be smoothed.
The number of iterations for the sequence of the smoothing iterations performed
splits the edges listed in edges into sub-edges that are not longer than the given threshold max_length.
Note this function is useful to split constrained edges before calling isotropic_remeshing() with protection
of constraints activated (to match the constrained edge length required by the remeshing algorithm to be guaranteed to terminate)
A valid mesh.
The edge length above which an edge from edges is split into to sub-edges
The number of new edges added to the mesh.
splits the edges listed in edges into sub-edges that are not longer than the given threshold max_length.
Note this function is useful to split constrained edges before calling isotropic_remeshing() with protection
of constraints activated (to match the constrained edge length required by the remeshing algorithm to be guaranteed to terminate)
A valid mesh.
The edge length above which an edge from edges is split into to sub-edges
The number of new edges added to the mesh.
Triangulate a single face in the mesh.
A valid mesh.
The faces index in the mesh.
True if successful.
Triangulate a single face in the mesh.
A valid mesh.
The faces index in the mesh.
True if successful.
Triangulate a range of faces in the mesh.
A valid mesh.
The faces to triangulate.
The length of the face array.
True if successful.
Triangulate a range of faces in the mesh.
A valid mesh.
The faces to triangulate.
The length of the face array.
True if successful.
Release any unmanaged resources.
Indicates if mesh bounds a volume.
A closed triangle mesh.
Indicates if mesh bounds a volume.
A closed triangle mesh.
Tests whether a closed triangle mesh has a positive orientation.
A closed triangle mesh is considered to have a positive orientation
if the normal vectors to all its faces point outside the domain bounded
by the triangle mesh.The normal vector to each face is chosen pointing
on the side of the face where its sequence of vertices is seen counterclockwise.
A closed triangle mesh.
Tests whether a closed triangle mesh has a positive orientation.
A closed triangle mesh is considered to have a positive orientation
if the normal vectors to all its faces point outside the domain bounded
by the triangle mesh.The normal vector to each face is chosen pointing
on the side of the face where its sequence of vertices is seen counterclockwise.
A closed triangle mesh.
Orient the faces in the mesh.
The orientation method.
A valid closed triangle mesh.
Orient the faces in the mesh.
The orientation method.
A valid closed triangle mesh.
Makes each connected component of a closed triangulated surface mesh inward or outward oriented.
A closed triangle mesh.
Makes each connected component of a closed triangulated surface mesh inward or outward oriented.
A closed triangle mesh.
Orients the connected components of tm to make it bound a volume.
A closed triangle mesh.
Orients the connected components of tm to make it bound a volume.
A closed triangle mesh.
Reverses for each face the order of the vertices along the face boundary.
A valid mesh.
Reverses for each face the order of the vertices along the face boundary.
A valid mesh.
Release any unmanaged resources.
Find the number of degenerate edges in the mesh.
The polygon mesh.
The number of degenerate edges in the mesh.
Find the number of degenerate faces in the mesh.
A triangle polygon mesh.
The number of degenerate faces in the mesh.
Find the number of degenerate faces in the mesh.
A triangle polygon mesh.
The number of degenerate faces in the mesh.
Checks whether a triangle face is needle.
A triangle is said to be a needle if its longest edge is much longer than its shortest edge.
A triangle polygon mesh.
A bound on the ratio of the longest edge length and the shortest edge length.
The number of needle triangles.
Checks whether a triangle face is needle.
A triangle is said to be a needle if its longest edge is much longer than its shortest edge.
A triangle polygon mesh.
A bound on the ratio of the longest edge length and the shortest edge length.
The number of needle triangles.
Collects the non-manifold vertices (if any) present in the mesh.
A non-manifold vertex v is returned via one incident halfedge h such that target(h, pm) = v
for all the umbrellas that v appears in (an umbrella being the set of faces incident to all
the halfedges reachable by walking around v using hnext = prev(opposite(h, pm), pm), starting from h).
A triangle polygon mesh.
The non manifold vertex count.
Collects the non-manifold vertices (if any) present in the mesh.
A non-manifold vertex v is returned via one incident halfedge h such that target(h, pm) = v
for all the umbrellas that v appears in (an umbrella being the set of faces incident to all
the halfedges reachable by walking around v using hnext = prev(opposite(h, pm), pm), starting from h).
A triangle polygon mesh.
The non manifold vertex count.
Cleans a given polygon soup through various repairing operations.
More precisely, this function carries out the following tasks, in the same order as they are listed:
merging of duplicate points.
simplification of polygons to remove geometrically identical consecutive vertices;
splitting of "pinched" polygons, that is polygons in which a geometric position appears more than once.
The splitting process results in multiple non-pinched polygons;
removal of invalid polygons, that is polygons with fewer than 2 vertices;
removal of duplicate polygons.
removal of isolated points.
The polygon mesh.
Cleans a given polygon soup through various repairing operations.
More precisely, this function carries out the following tasks, in the same order as they are listed:
merging of duplicate points.
simplification of polygons to remove geometrically identical consecutive vertices;
splitting of "pinched" polygons, that is polygons in which a geometric position appears more than once.
The splitting process results in multiple non-pinched polygons;
removal of invalid polygons, that is polygons with fewer than 2 vertices;
removal of duplicate polygons.
removal of isolated points.
The polygon mesh.
stitches together, whenever possible, two halfedges belonging to the same boundary cycle.
Two border halfedges h1 and h2 can be stitched if the points associated to the source and
target vertices of h1 are the same as those of the target and source vertices of h2, respectively.
The polygon mesh.
The number of stiched boundaries.
stitches together, whenever possible, two halfedges belonging to the same boundary cycle.
Two border halfedges h1 and h2 can be stitched if the points associated to the source and
target vertices of h1 are the same as those of the target and source vertices of h2, respectively.
The polygon mesh.
The number of stiched boundaries.
Stitches together border halfedges in a polygon mesh.
The polygon mesh.
The number of stiched borders.
Stitches together border halfedges in a polygon mesh.
The polygon mesh.
The number of stiched borders.
Removes the isolated vertices from any polygon mesh.
A vertex is considered isolated if it is not incident to any simplex of higher dimension.
The polygon mesh.
The number of vertices that were removed.
Removes the isolated vertices from any polygon mesh.
A vertex is considered isolated if it is not incident to any simplex of higher dimension.
The polygon mesh.
The number of vertices that were removed.
Release any unmanaged resources.
Find the line formed from the intersection of the plane and the mesh.
The mesh. Is not modified.
The plane.
The polylines from the intersection.
Find the line formed from the intersection of the plane and the mesh.
The mesh. Is not modified.
The plane.
The polylines from the intersection.
Find the lines formed by slicing the mesh from the start
point to the end point creating a plane at each increment.
The mesh. Is not modified.
The point to start from.
The point to end at.
Amount to increment each plane.
he polylines from the intersection.
Find the lines formed by slicing the mesh from the start
point to the end point creating a plane at each increment.
The mesh. Is not modified.
The point to start from.
The point to end at.
Amount to increment each plane.
he polylines from the intersection.
Release any unmanaged resources.
Simplify the mesh.
A valid triangle mesh.
A percentage 0-1 of edges to remove.
Simplify the mesh.
A valid triangle mesh.
A percentage 0-1 of edges to remove.
Release the unmanaged resourses.
Subdive each face in the mesh.
A valid mesh. Must be a triangle mesh for loop or sqrt3.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid mesh. Must be a triangle mesh for loop or sqrt3.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid triangle mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid triangle mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid triangle mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid triangle mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid triangle mesh.
The number of subdivision iterations.
Release the unmanaged resourses.
Base triangulation class for Triangulation, DelaunayTriangulation,
ConstrainedTriangulation and ConstrainedDelaunayTriangulation.
The triangulations kernel.
The number of verices in the triangulation.
The number of triangles in the triangulation.
The number of indices need to represent the
triangulation (number of triangles * 3).
A number that will change if the unmanaged
triangulation model changes.
Clear the triangulation.
Is this a valid triangulation.
True if valid.
Force the face and vertex indices to be set.
Inserts point p in the triangulation.
If point coincides with an already existing vertex the triangulation remains unchanged.
If point is on an edge, the two incident faces are split in two.
If point is strictly inside a face of the triangulation, the face is split in three.
If point is strictly outside the convex hull, p is linked to all visible points on the
convex hull to form the new triangulation.
The point to insert.
Inserts points into the triangulation.
If point coincides with an already existing vertex the triangulation remains unchanged.
If point is on an edge, the two incident faces are split in two.
If point is strictly inside a face of the triangulation, the face is split in three.
If point is strictly outside the convex hull, p is linked to all visible points on the
convex hull to form the new triangulation.
The points to insert.
The ararys length.
Get a array of all the points in the triangulation.
The point array.
The ararys length.
Get a array of the triangle indices.
The ararys length.
Get the vertices point.
The vertex index.
The vertices point.
True if the vertex was found.
Get the point.
The points index.
The point
If point with the index not found.
Get a vertex.
The vertex index.
The vertex.
True if the vertex was found.
Get the vertex.
The vertexs index.
The vertexs
If vertex with the index not found.
Get a array of all the vertices.
The vertex array.
The ararys length.
Get a triangule face.
The faces index
The face
True if the face was found.
Get the face.
The faces index.
The Faces
If face with the index not found.
Get a array of all the triangle faces.
A array of faces.
The ararys length.
Get the segment between the face and a neighbour.
The faces index
The neighbour (0-2) index in the face.
The segment.
True if the face was found.
Get the segment between the face and a neighbour.
The faces index
The neighbour (0-2) index in the face.
The segment
If segment with the index not found.
Get a faces triangle.
The faces index
The triangle
True if the face was found
Get the triangle.
The triangles index.
The triangle
If triangle with the index not found.
Get a array of all the triangles.
A array of triangules.
The ararys length.
Get a faces circumcenter.
The faces index
The circumcenter. A circle
that passes through all three of the triangules vertices.
True if the face was found.
Get the circumcenter.
The circumcenters index.
The circumcenter
If circumcenter with the index not found.
Get a array of all the circumcenters.
A array of circumcenters.
The ararys length.
Get the index of the faces neighbour.
The faces index.
The neighbour (0-2) index in the face.
The index of the neighbour face in the triangulation.
-1 if there is no neighbour face at this index.
Locate the face the point hits.
The point.
The face the point has hit.
True if the point hit a face.
Locate the closest vertex to point.
The point
The distance the point must be within to count as hitting the vertex.
The closest vertex.
True if point hit a face and found a vertex.
Locate the closest edge and segment to point.
The point
The distance the point must be within to count as hitting the edge.
The closest edge.
True if the point hit a face and found a edge.
Remove the vertex.
The vertices index.
True if removed.
Flip a edge between the face and a neighbour.
The faces index
The neighbour (0-2) index in the face.
True if the edge was flipped.
Translate the triangulation.
The amount to translate.
Rotate the triangulation.
The amount to rotate in radians.
Scale the triangulation.
The amount to scale.
Transform the triangulation with a TRS matrix.
The amount to translate.
The amount to rotate.
The amount to scale.
Release any unmanaged resources.
Base triangulation class for Triangulation, DelaunayTriangulation
and ConstrainedTriangulation.
The triangulations kernel.
Returns the buildStamp.
The build stamp will change if
the triangulation model has changed
Returns the dimension of the affine hull.
Returns the number of vertices.
Returns the number of finite vertices.
Returns the number of cells or 0 if Dimension less than 3.
The number of finite cells.
Returns 0 if Dimension less than 3.
The number of edges.
Returns 0 if Dimension less than 1.
The number of finite edges.
Returns 0 if Dimension less than 1.
The number of facets.
Returns 0 if Dimension less than 2.
The number of facets.
Returns 0 if Dimension less than 2.
The number of indices needed for the finite tetrahedrons.
Clear the triangulation.
Inserts the point p in the triangulation.
If point p coincides with an already existing vertex the triangulation remains unchanged.
If point p lies in the convex hull of the points, it is added naturally:
if it lies inside a cell, the cell is split into four cells, if it lies
on a facet, the two incident cells are split into three cells, if it lies
on an edge, all the cells incident to this edge are split into two cells.
If point p is strictly outside the convex hull but in the affine hull, p
is linked to all visible points on the convex hull to form the new triangulation.
If point p is outside the affine hull of the points, p is linked to all the points,
and the dimension of the triangulation is incremented. All the points now belong to
the boundary of the convex hull, so, the infinite vertex is linked to all the points
to triangulate the new infinite face.
The point to insert
Insert all the points in the array.
The points to insert.
The arrays length
Insert a vertex into a cell.
The cells index.
The point to insert.
If the point query lies inside the convex hull of the points, the cell that contains the query in its interior is returned.
If query lies on a facet, an edge or on a vertex, one of the cells having query on its boundary is returned.
If the point query lies outside the convex hull of the points, an infinite cell with vertices { p,q,r,∞} is
returned such that the tetrahedron(p, q, r, query) is positively oriented(the rest of the triangulation lies
on the other side of facet (p, q, r)).
Note that locate works even in degenerate dimensions: in dimension 2 (resp. 1, 0) the Cell_handle returned
is the one that represents the facet(resp.edge, vertex) containing the query point.
The optional argument start is used as a starting place for the search.
The optional argument could_lock_zone is used by the concurrency-safe version of the triangulation.When the
pointer is not null, the locate will try to lock all the cells along the walk. If it succeeds,
could_lock_zone is true, otherwise it is false. In any case, the locked cells are not unlocked by locate,
leaving this choice to the user.
The point to query
The cell thats closest to point.
The closest cell to point.
Get the centroids of each cell.
The array of points
The array of points length
Get all the points in the triangulation.
The array to copy into.
The arrays length.
Get all the points in the triangulation.
The array to copy into.
Get the triangulation vertices.
The vertex array.
The vertex array length.
Get a triangulation vertex.
The vertices index
The vertex.
Get the triangulation vertices.
The vertex array.
The vertex array length.
Get a triangulation vertex.
The vertices index
The vertex.
Get the indices of the cells edges in the triangulation.
The indices array.
The indices array length.
Get the indices of the cells triangles in the triangulation.
The indices array.
The indices array length.
Get the indices of the tetrahedron cells in the triangulation.
The indices array.
The indices array length.
Translate each point in the mesh.
The amount to translate.
Rotate each point in the mesh.
The amount to rotate.
Scale each point in the mesh.
The amount to scale.
Transform each point in the mesh.
The amount to translate.
The amount to rotate.
The amount to scale.
Release any unmanaged resources.
The generic constrained triangulation class.
The kernel
A static instance of the triangulation.
The triangulation as a string.
A deep copy of the triangulation.
The deep copy.
Compute the convex of the triagulation.
The convex hull polygon.
The abstract triangulation class.
The kernel with the functions unique to the constrained triangulation.
The number of constrainted edges in the triangulation.
Move the vertex.
The moved vertex
True if the vertex was found.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points and the edges as constraints into the triangulation.
Will retatin the poylgons edges.
The polygon to insert.
Insert the polygons points and the edges as constraints into the triangulation.
Will retatin the poylgons edges.
The polygon to insert.
Get the number of constrainted edges incident to this vertex.
The vertex index in the triagulation.
The number of constrainted edges to the vertex.
Does this vertex have a constrainted edge.
The vertex index in the triagulation.
Does this vertex have a constrainted edge.
Add a segment as a constraint.
The segment to add.
Add the two points as a segment constraint.
The segments point a.
The segments point b.
Add a list of segments as constraint to the triangulation.
The segment array.
The length of the segment array.
Get a array of all the constraint edges in the triangulation.
The edge array.
The ararys length.
Get a array of all the constraint segments in the triangulation.
The segment array.
The ararys length.
Get the constraints incident to the vertex.
The vertex index in the triangulation.
The array of edges.
The ararys length.
Remove a constraint between a face and its neighbour.
The faces index in the triangultion.
The neighbours index in the faces neighbour array between 0-2.
Remove all constraints incident to a vertex.
The vertex index in the triangulation.
Get the triangle indices for domain in the triangultion.
Used to triangulate polygons.
The indices.
The generic constrained triangulation class.
The kernel
A static instance of the triangulation.
The triangulation as a string.
A deep copy of the triangulation.
The deep copy.
Compute the convex of the triagulation.
The convex hull polygon.
The abstract triangulation class.
The kernel with the functions unique to the constrained triangulation.
The number of constrainted edges in the triangulation.
Move the vertex.
The moved vertex
True if the vertex was found.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points and the edges as constraints into the triangulation.
Will retatin the poylgons edges.
The polygon to insert.
Insert the polygons points and the edges as constraints into the triangulation.
Will retatin the poylgons edges.
The polygon to insert.
Get the number of constrainted edges incident to this vertex.
The vertex index in the triagulation.
The number of constrainted edges to the vertex.
Does this vertex have a constrainted edge.
The vertex index in the triagulation.
Does this vertex have a constrainted edge.
Add a segment as a constraint.
The segment to add.
Add the two points as a segment constraint.
The segments point a.
The segments point b.
Add a list of segments as constraint to the triangulation.
The segment array.
The length of the segment array.
Get a array of all the constraint edges in the triangulation.
The edge array.
The ararys length.
Get a array of all the constraint segments in the triangulation.
The segment array.
The ararys length.
Get the constraints incident to the vertex.
The vertex index in the triangulation.
The array of edges.
The ararys length.
Remove a constraint between a face and its neighbour.
The faces index in the triangultion.
The neighbours index in the faces neighbour array between 0-2.
Remove all constraints incident to a vertex.
The vertex index in the triangulation.
Get the triangle indices for domain in the triangultion.
Used to triangulate polygons.
The indices.
The generic delaunay triangulation class.
The kerne
A static instance of the delaunay triangulation.
The triangulation as string.
A deep copy of the triangulation.
Insert the polygons points into the triangulation.
May not retatin the poylgons edges.
The polygon to insert.
Insert the polygons points into the triangulation.
May not retatin the poylgons edges.
The polygon to insert.
Compute the convex of the triagulation.
The convex hull polygon.
The anstract base class for the delaunay triangulation.
The kernel with the functions unique to the delaunay triangulation.
Move the vertex.
If there is not already another vertex placed on the point,
the triangulation is modified such that the new position of vertex same as point.
The moved vertex
True if the vertex was found.
If the dual voronoi diagram of the triangulation is taken
How many segments and rays would be produced.
The number of segments.
The number of rays.
Get a array of the voronoi's segments.
A array of the voronoi's segments.
Get a array of the voronois rays.
These are the segment at edge of triangulation that
a end point can not be determined.
A array of the voronoi's rays.
Generic triangulation class.
The kerel.
Static instance of a triangulation.
Default constructor.
Construct a triangulation from the points.
The triangulation points.
Construct from a existing triangulation.
A pointer to the unmanaged object.
The triangulation as a string.
Create a deep copy of the triangulation.
The deep copy.
Refine the triangulation.
The target edge lengths.
The number of iterations.
Compute the convex of the triagulation.
The convex hull polygon.
Abstract base class for the triagulation.
The kernel with the functions unique to the triangulation.
Move a vertex.
The vertices index.
The point to move to.
Should the vertex only be moved if there is no coliision.
If the vertex was moved.
Find the index of the nearest vertex to the point.
The point.
The index of the nearest vertex to the point.
Find the index of the nearest vertex to the point.
Presumes poimt is in a cell.
The cells index.
The point.
The index of the nearest vertex to the point.
Remobe a vertex.
The vertex index.
True if vertex was removed.
Generic triangulation class.
The kerel.
Static instance of a triangulation.
Default constructor.
Construct a triangulation from the points.
The triangulation points.
Construct from a existing triangulation.
A pointer to the unmanaged object.
The triangulation as a string.
Create a deep copy of the triangulation.
The deep copy.
Insert the points of the polygon into the triagulation.
May no have the same edges as polygon.
The polygon to insert/
Insert the points of the polygon into the triagulation.
May no have the same edges as polygon.
The polygon to insert/
Compute the convex of the triagulation.
The convex hull polygon.
Abstract base class for the triagulation.
The kernel with the functions unique to the triangulation.
Move the vertex.
If there is not already another vertex placed on the point,
the triangulation is modified such that the new position of vertex same as point.
The moved vertex
True if the vertex was found.
Generic triangulation class.
The kerel.
Static instance of a triangulation.
Default constructor.
Construct a triangulation from the points.
The triangulation points.
Construct from a existing triangulation.
A pointer to the unmanaged object.
The triangulation as a string.
Create a deep copy of the triangulation.
The deep copy.
Refine the triangulation.
The target edge lengths.
The number of iterations.
Compute the convex of the triagulation.
The convex hull polygon.
Abstract base class for the triagulation.
The kernel with the functions unique to the triangulation.
From Index to HalfEdgeIndex must match layout
of the unmanaged TriFace2 in the TriFace2 header file.
Is this the infinite cell.
The cells index in the triangulation.
The cells 4 vertices.
The cells 4 neighbor cells.
Are the two cells equal.
The first cell.
The second cell.
True if the cells are equal.
Are the two cells not equal.
The first cell.
The second cell.
True if the cells are not equal.
Are these objects equal.
The other object.
True if the objects are equal.
Are these cells equal.
The other cell.
True if the cells are equal.
The cells hash code.
The cells hash code.
Get a vertex index.
The vertices index 0-3.
The vertices index in the triangulation.
Get a neighbor cell index.
The neighbor cell index 0-3.
A neighbor cell index in the triangulation.
Enumerate the vertices of the cell.
The triangle the vertices below too.
The cell vertices.
Enumerate the vertices of the cell.
The vertices array.
The cell vertices.
Enumerate the vertices of the cell.
The triangle the vertices below too.
The cell vertices.
Enumerate the neighbors of the cell.
The cell array.
The cell neighbors.
Are the two vertex arrays equal.
Are the two neighbor arrays equal.
From Index to TwinIndex must match layout
of the unmanaged TriEdge2 in the TriEdge2 header file.
The edges face index in the triangulation.
The neighbours index in the face array betwen 0 and 2.
The edges segment.
The face index in the triangulation
The neighbours index in the face array betwen 0 and 2.
Are the two edges equal.
The first edge.
The second edge.
True if the edges are equal.
Are the two edges not equal.
The first edge.
The second edge.
True if the edges are not equal.
Are these objects equal.
The other object.
True if the objects are equal.
Are these edges equal.
The other edge.
True if the edges are equal.
The edges hash code.
The edges hash code.
From Index to HalfEdgeIndex must match layout
of the unmanaged TriFace2 in the TriFace2 header file.
Is this the infinite face.
The faces index in the triangulation.
The faces 3 vertices.
Are the two faces equal.
The first face.
The second face.
True if the faces are equal.
Are the two faces not equal.
The first face.
The second face.
True if the faces are not equal.
Are these objects equal.
The other object.
True if the objects are equal.
Are these faces equal.
The other face.
True if the faces are equal.
The faces hash code.
The faces hash code.
Get a vertex index and wrap around array.
The vertices index wrapped to 0-2.
The vertices index in the triangulation.
Enumerate the vertices of the face.
The triangle the vertices below too.
The face vertices.
Enumerate the vertices of the face.
The vertices array.
The face vertices.
From Point to HalfEdgeIndex must match layout
of the unmanaged TriVertex2 in the TriVertex2 header file.
The vertices point.
Is this a infinite vertex.
The number of egdes connected to the vertex.
The vertices index in the triangulation.
The one of the vertexs the vertex is connected to.
Are the two vertexs equal.
The first vertex.
The second vertex.
True if the vertexs are equal.
Are the two vertexs not equal.
The first vertex.
The second vertex.
True if the vertexs are not equal.
Are these objects equal.
The other object.
True if the objects are equal.
Are these vertexs equal.
The other vertex.
True if the vertexs are equal.
The vertexs hash code.
The vertexs hash code.
The vertices point.
Is this a infinte vertex.
The vertices degree is the
number of edges connecting to it.
The vertices index in the triangulation.
The one of the cells the vertex is connected to.
Are the two vertices equal.
The first vertex.
The second vertex.
True if the vertexs are equal.
Are the two vertices not equal.
The first vertex.
The second vertex.
True if the vertexs are not equal.
Are these objects equal.
The other object.
True if the objects are equal.
Are these vertexs equal.
The other vertex.
True if the vertexs are equal.
The vertexs hash code.
The vertexs hash code.
Enumerate around all the other vertices in this vertexs cell.
The triangulation the vertex belongs to.
All the other vertices in this vertexs cell
Enumerate around all the other vertices in this vertexs cell.
A array of the other vertices in the triangulation.
A array of the other cells in the triangulation.
All the other vertices in this vertexs cell
Cache to reuse arrays.
Thread safe?
Returns a array of Point2d objects that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of Point2d objects that is at least the size of count.
Returns a array of Segment2d objects that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of Segment2d objects that is at least the size of count.
Returns a array of Point3d objects that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of Point3d objects that is at least the size of count.
Returns a array of HPoint3d objects that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of HPoint3d objects that is at least the size of count.
Returns a array of ints that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of ints that is at least the size of count.
Returns a array of ints that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of ints that is at least the size of count.
Should a new array be created.
The current array.
The required new array size.
Creates a new array if disabled, the current one is null or to small.
Check a array that is passed to the c++ dll.
If the array is invalid it will cause a hard crash.
Array can be null if count is 0;
================================================
FILE: Binaries/CGALDotNetGeometry.xml
================================================
CGALDotNetGeometry
Add two colors.
Add vector and scalar.
Add vector and scalar.
Subtract two colors.
Subtract vector and scalar.
Subtract vector and scalar.
Multiply two colors.
Multiply a vector and a scalar.
Multiply a vector and a scalar.
Divide two colors.
Divide a vector and a scalar.
Are these colors equal.
Are these colors not equal.
Are these colors equal.
Are these colors equal given the error.
Are these colors equal.
colors hash code.
color as a string.
color as a string.
color from bytes.
The distance between two colors.
The square distance between two colors.
Convert to RGB color space.
Generates a list of colors with hues ranging from 0 360
and a saturation and value of 1.
Add two colors.
Add vector and scalar.
Add vector and scalar.
Subtract two colors.
Subtract vector and scalar.
Subtract vector and scalar.
Multiply two colors.
Multiply a vector and a scalar.
Multiply a vector and a scalar.
Divide two colors.
Divide a vector and a scalar.
Are these colors equal.
Are these colors not equal.
Are these colors equal.
Are these colors equal given the error.
Are these colors equal.
colors hash code.
color as a string.
color as a string.
color from bytes.
The distance between two colors.
The square distance between two colors.
The minimum value between s and each component in vector.
The maximum value between s and each component in vector.
Clamp the each component to specified min and max.
Lerp between two vectors.
Convert to HSV color space.
Create a palette of 6 colors from the rainbow.
Create a palette of colors.
Create a custom palette of hues with the same saturation and value.
The number of hues in the palette.
The saturation of the colors.
The values of the colors.
Add two colors.
Add color and scalar.
Add color and scalar.
Subtract two colors.
Subtract color and scalar.
Subtract color and scalar.
Multiply two colors.
Multiply a color and a scalar.
Multiply a color and a scalar.
Divide two colors.
Divide a color and a scalar.
Are these colors equal.
Are these colors not equal.
Are these colors equal.
Are these colors equal given the error.
Are these colors equal.
colors hash code.
color as a string.
color as a string.
color from bytes.
The distance between two colors.
The square distance between two colors.
color from ints.
The minimum value between s and each component in vector.
The maximum value between s and each component in vector.
Clamp the each component to specified min and max.
Lerp between two colors.
Convert to HSV color space.
Represents a angle in degrees.
The angle in degrees.
The degrees angle in radians.
0 degrees.
90 degrees.
180 degrees.
270 degrees.
360 degrees.
Create a new degree from a value.
The angle in degrees.
Add two angles.
Add angle and scalar.
Negate the angle.
Add angle and scalar.
Subtract two angles.
Subtract angle and scalar.
Subtract angle and scalar.
Multiply two angles.
Multiply a angle and a scalar.
Multiply a angle and a scalar.
Divide two angles.
Divide a angle and a scalar.
Is the degree less than the scalar.
Is the degree less than or equal to the scalar.
Is the degree greater than the scalar.
Is the degree greater than or equal to the scalar.
Is the degree less than the other degree.
Is the degree less than or equal to the other degree.
Is the degree greater than the other degree.
Is the degree greater than or equal to the other degree.
Cast from a radian to degrees.
The angle in radians.
Are these angles equal.
Are these angles not equal.
Are these angles equal.
Are these angles equal.
Angles hash code.
Angles as a string.
Angles as a string.
A rounded angle.
The number of digits to round to.
The rounded angle
A Homogenous 2D point struct.
The unit x point.
The unit y point.
A point of zeros.
A point of ones.
A point all with the value v.
A point from the varibles.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Are all the components of vector finite.
Make a point with no non finite conponents.
Are any of the points components nan.
Make a point with no nan conponents.
Convert from homogenous to cartesian space.
Add two points.
Add point and scalar.
Add point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide a point and a scalar.
Divide a point and a scalar.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Are these points equal given the error.
Vectors hash code.
Vector as a string.
Vector as a string.
A rounded point.
The number of digits to round to.
The rounded point
Round the point.
The number of digits to round to.
Floor each component if point.
Ceilling each component if point.
Create a array of random points.
The seed
The number of points to create.
The number of points weight.
The range of the points.
The point array.
A Homogenous 2D point struct.
The unit x point.
The unit y point.
A point of zeros.
A point of ones.
A point all with the value v.
A point from the varibles.
A point from the varibles.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Are all the components of vector finite.
Make a point with no non finite conponents.
Are any of the points components nan.
Make a point with no nan conponents.
Convert from homogenous to cartesian space.
Add two points.
Add point and scalar.
Add point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide a point and a scalar.
Divide a point and a scalar.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Are these points equal given the error.
Vectors hash code.
Vector as a string.
Vector as a string.
A rounded point.
The number of digits to round to.
The rounded point
Round the point.
The number of digits to round to.
Floor each component if point.
Ceilling each component if point.
Create a array of random points.
The seed
The number of points to create.
The number of points weight.
The range of the points.
The point array.
The unit x point.
The unit y point.
The unit z point.
A point of zeros.
A point of ones.
A point of 0.5.
A point of positive infinity.
A point of negative infinity.
A point all with the value v.
A point all with the value v.
A point from the varibles.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Are all the components of vector finite.
Make a point with no non finite conponents.
Are any of the points components nan.
Make a point with no nan conponents.
Convert from homogenous to cartesian space.
Point as vector.
Point as vector.
Add two points.
Add point and scalar.
Add point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide a point and a scalar.
Divide a point and a scalar.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Are these points equal given the error.
Vectors hash code.
Vector as a string.
Vector as a string.
A rounded point.
The number of digits to round to.
The rounded point
Round the point.
The number of digits to round to.
Floor each component if point.
Ceilling each component if point.
Create a array of random points.
The seed
The number of points to create.
The number of points weight.
The range of the points.
The point array.
The unit x point.
The unit y point.
The unit z point.
A point of zeros.
A point of ones.
A point of 0.5.
A point of positive infinity.
A point of negative infinity.
A point all with the value v.
A point all with the value v.
A point from the varibles.
A point from the varibles.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Are all the components of vector finite.
Make a point with no non finite conponents.
Are any of the points components nan.
Make a point with no nan conponents.
Convert from homogenous to cartesian space.
Point as vector.
Point as vector.
Add two points.
Add point and scalar.
Add point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide a point and a scalar.
Divide a point and a scalar.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Are these points equal given the error.
Vectors hash code.
Vector as a string.
Vector as a string.
A rounded point.
The number of digits to round to.
The rounded point
Round the point.
The number of digits to round to.
Floor each component if point.
Ceilling each component if point.
Create a array of random points.
The seed
The number of points to create.
The number of points weight.
The range of the points.
The point array.
WARNING - Must match layout of unmanaged c++ CGAL struct in Index.h file.
Wrap a value between 0 and count-1 (inclusive).
Mirror a value between 0 and count-1 (inclusive).
Is number a power of 2.
Return the closest pow2 number to num.
Return the closest pow2 number thats less than num.
Simple int pow function.
System Math.Pow may produce precision errors.
Return the Binomial coefficients.
N
n
Returns the factorial of number.
Must be less than or equal MAX_FACTORIAL or overflow will occur.
Returns the factorial of number using a BigInteger.
Given N objects, how many unique sets exist.
Given N objects, how many unique sets exist of size n
where the order matters and objects may repeat.
The size of the sets
The total number of objects
The number of sets possible
Given N objects, how many unique sets exist of size n
where the order does not matters and objects may repeat.
The size of the sets
The total number of objects
The number of sets possible
Given N objects, how many unique sets exist of size n
where the order matters and objects may not repeat.
The size of the sets
The total number of objects
The number of sets possible
Given N objects, how many unique sets exist of size n
where the order does not matters and objects may not repeat.
The size of the sets
The total number of objects
The number of sets possible
Creates a look up table for factorials.
Matrix is column major. Data is accessed as: row + (column*2).
Matrices can be indexed like 2D arrays but in an expression like mat[a, b],
a refers to the row index, while b refers to the column index
(note that this is the opposite way round to Cartesian coordinates).
The matrix
The matrix
The Matrix Idenity.
A matrix from the following varibles.
A matrix from the following column vectors.
A matrix from the following varibles.
A matrix copied from a array of varibles.
Access the varible at index i
Is this the identity matrix.
Access the varible at index ij
The transpose of the matrix. The rows and columns are flipped.
The determinate of a matrix.
The inverse of the matrix.
A matrix multipled by its inverse is the idenity.
Add two matrices.
Subtract two matrices.
Multiply two matrices.
Multiply a vector by a matrix.
Multiply a point by a matrix.
Multiply a matrix by a scalar.
Multiply a matrix by a scalar.
Cast to double matrix from a float matrix.
The other matrix
Are these matrices equal.
Are these matrices not equal.
Are these matrices equal.
Are these matrices equal.
Are these matrices equal.
Matrices hash code.
A matrix as a string.
The Inverse of the matrix copied into mInv.
Returns false if the matrix has no inverse.
A matrix multipled by its inverse is the idenity.
Get the ith column as a vector.
Set the ith column from avector.
Get the ith row as a vector.
Set the ith row from avector.
Create a rotation out of a angle.
Convert to a float precision 3 dimension matrix.
Matrix is column major. Data is accessed as: row + (column*2).
Matrices can be indexed like 2D arrays but in an expression like mat[a, b],
a refers to the row index, while b refers to the column index
(note that this is the opposite way round to Cartesian coordinates).
The matrix
The matrix
The Matrix Idenity.
A matrix from the following varibles.
A matrix from the following column vectors.
A matrix from the following varibles.
A matrix copied from a array of varibles.
Access the varible at index i
Access the varible at index ij
Is this the identity matrix.
The transpose of the matrix. The rows and columns are flipped.
The determinate of a matrix.
The inverse of the matrix.
A matrix multipled by its inverse is the idenity.
Add two matrices.
Subtract two matrices.
Multiply two matrices.
Multiply a vector by a matrix.
Multiply a point by a matrix.
Multiply a matrix by a scalar.
Multiply a matrix by a scalar.
Cast to float matrix from a double matrix.
The other matrix
Are these matrices equal.
Are these matrices not equal.
Are these matrices equal.
Are these matrices equal.
Are these matrices equal.
Matrices hash code.
A matrix as a string.
The Inverse of the matrix copied into mInv.
Returns false if the matrix has no inverse.
A matrix multipled by its inverse is the idenity.
Get the ith column as a vector.
Set the ith column from avector.
Get the ith row as a vector.
Set the ith row from avector.
Create a rotation out of a angle.
Convert to a single precision 3 dimension matrix.
Matrix is column major. Data is accessed as: row + (column*3).
Matrices can be indexed like 2D arrays but in an expression like mat[a, b],
a refers to the row index, while b refers to the column index
(note that this is the opposite way round to Cartesian coordinates).
The matrix
The matrix
The matrix
The Matrix Idenity.
A matrix from the following varibles.
A matrix from the following column vectors.
A matrix from the following varibles.
A matrix copied from a array of varibles.
Is this the identity matrix.
Does the matric have scale.
Access the varible at index i
Access the varible at index ij
The transpose of the matrix. The rows and columns are flipped.
The determinate of a matrix.
The inverse of the matrix.
A matrix multipled by its inverse is the idenity.
Add two matrices.
Subtract two matrices.
Multiply two matrices.
Multiply a vector by a matrix.
Multiply a vector by a matrix.
Multiply a point by a matrix.
Multiply a point by a matrix.
Multiply a matrix by a scalar.
Multiply a matrix by a scalar.
Cast to double matrix from a float matrix.
The other matrix
Are these matrices equal.
Are these matrices not equal.
Are these matrices equal.
Are these matrices equal.
Are these matrices equal.
Matrices hash code.
A matrix as a string.
The Inverse of the matrix copied into mInv.
Returns false if the matrix has no inverse.
A matrix multipled by its inverse is the idenity.
Invert a 3x3 using cofactors. This is about 8 times faster than
the Numerical Recipes code which uses Gaussian elimination.
Get the ith column as a vector.
Set the ith column from avector.
Get the ith row as a vector.
Set the ith row from avector.
Convert to a REAL precision 4 dimension matrix.
Create a translation out of a vector.
Create a translation out of a point.
Create a scale out of a vector.
Create a scale out of a point.
Create a scale out of a vector.
Create a rotation out of a angle.
Create a rotation out of a angle.
Create a rotation out of a angle.
Create a rotation out of a vector.
Matrix is column major. Data is accessed as: row + (column*3).
Matrices can be indexed like 2D arrays but in an expression like mat[a, b],
a refers to the row index, while b refers to the column index
(note that this is the opposite way round to Cartesian coordinates).
The matrix
The matrix
The matrix
The Matrix Idenity.
A matrix from the following varibles.
A matrix from the following column vectors.
A matrix from the following varibles.
A matrix copied from a array of varibles.
Access the varible at index i
Access the varible at index ij
Is this the identity matrix.
Does the matric have scale.
The transpose of the matrix. The rows and columns are flipped.
The determinate of a matrix.
The inverse of the matrix.
A matrix multipled by its inverse is the idenity.
Add two matrices.
Subtract two matrices.
Multiply two matrices.
Multiply a vector by a matrix.
Multiply a vector by a matrix.
Multiply a point by a matrix.
Multiply a point by a matrix.
Multiply a matrix by a scalar.
Multiply a matrix by a scalar.
Cast to float matrix from a double matrix.
The other matrix
Are these matrices equal.
Are these matrices not equal.
Are these matrices equal.
Are these matrices equal.
Are these matrices equal.
Matrices hash code.
A matrix as a string.
The Inverse of the matrix copied into mInv.
Returns false if the matrix has no inverse.
A matrix multipled by its inverse is the idenity.
Invert a 3x3 using cofactors. This is about 8 times faster than
the Numerical Recipes code which uses Gaussian elimination.
Get the ith column as a vector.
Set the ith column from avector.
Get the ith row as a vector.
Set the ith row from avector.
Convert to a single precision 4 dimension matrix.
Create a translation out of a vector.
Create a translation out of a point.
Create a scale out of a vector.
Create a scale out of a point.
Create a scale out of a vector.
Create a rotation out of a angle.
Create a rotation out of a angle.
Create a rotation out of a angle.
Create a rotation out of a vector.
Matrix is column major. Data is accessed as: row + (column*4).
Matrices can be indexed like 2D arrays but in an expression like mat[a, b],
a refers to the row index, while b refers to the column index
(note that this is the opposite way round to Cartesian coordinates).
The matrix
The matrix
The matrix
The matrix
The Matrix Idenity.
A matrix from the following varibles.
A matrix from the following column vectors.
A matrix from the following varibles.
A matrix copied from a array of varibles.
Access the varible at index i
Access the varible at index ij
Is this the identity matrix.
Does the matric have scale.
The transpose of the matrix. The rows and columns are flipped.
The determinate of a matrix.
The adjoint of a matrix.
The inverse of the matrix.
A matrix multipled by its inverse is the idenity.
Add two matrices.
Subtract two matrices.
Multiply two matrices.
Multiply a vector by a matrix.
Acts like z is 0, and w is 0.
Multiply a vector by a matrix.
Acts like w is 0.
Multiply a point by a matrix.
Acts like z is 0, and w is 1.
Multiply a point by a matrix.
Acts like w is 1.
Multiply a vector by a matrix.
Multiply a point by a matrix.
Multiply a matrix by a scalar.
Multiply a matrix by a scalar.
Cast to double matrix from a float matrix.
The other matrix
Are these matrices equal.
Are these matrices not equal.
Are these matrices equal.
Are these matrices equal.
Are these matrices equal.
Matrices hash code.
A matrix as a string.
The minor of a matrix.
The inverse of the matrix.
A matrix multipled by its inverse is the idenity.
Get the ith column as a vector.
Set the ith column from a vector.
Get the ith row as a vector.
Set the ith row from a vector.
Convert to a 3 dimension matrix.
Create a translation, rotation and scale.
Create a translation and rotation.
Create a translation and scale.
Create a rotation and scale.
Create a translation out of a vector.
Create a scale out of a vector.
Create a scale out of a vector.
Create a rotation out of a angle in degrees.
Create a rotation out of a angle in degrees.
Create a rotation out of a angle in degrees.
Create a rotation out of a vector.
Create a perspective matrix.
Create a ortho matrix.
Creates the matrix need to look at target from position.
Matrix is column major. Data is accessed as: row + (column*4).
Matrices can be indexed like 2D arrays but in an expression like mat[a, b],
a refers to the row index, while b refers to the column index
(note that this is the opposite way round to Cartesian coordinates).
The matrix
The matrix
The matrix
The matrix
The Matrix Idenity.
A matrix from the following varibles.
A matrix from the following column vectors.
A matrix from the following varibles.
A matrix copied from a array of varibles.
Access the varible at index i
Access the varible at index ij
Is this the identity matrix.
Does the matric have scale.
The transpose of the matrix. The rows and columns are flipped.
The determinate of a matrix.
The adjoint of a matrix.
The inverse of the matrix.
A matrix multipled by its inverse is the idenity.
Add two matrices.
Subtract two matrices.
Multiply two matrices.
Multiply a vector by a matrix.
Acts like z is 0, and w is 0.
Multiply a vector by a matrix.
Acts like w is 0.
Multiply a point by a matrix.
Acts like z is 0, and w is 1.
Multiply a point by a matrix.
Acts like w is 1.
Multiply a vector by a matrix.
Multiply a point by a matrix.
Multiply a matrix by a scalar.
Multiply a matrix by a scalar.
Cast to float matrix from a double matrix.
The other matrix
Are these matrices equal.
Are these matrices not equal.
Are these matrices equal.
Are these matrices equal.
Are these matrices equal.
Matrices hash code.
A matrix as a string.
The minor of a matrix.
The inverse of the matrix.
A matrix multipled by its inverse is the idenity.
Get the ith column as a vector.
Set the ith column from a vector.
Get the ith row as a vector.
Set the ith row from a vector.
Convert to a 3 dimension matrix.
Create a translation, rotation and scale.
Create a translation and rotation.
Create a translation and scale.
Create a rotation and scale.
Create a translation out of a vector.
Create a scale out of a vector.
Create a scale out of a vector.
Create a rotation out of a angle in degrees.
Create a rotation out of a angle in degrees.
Create a rotation out of a angle in degrees.
Create a rotation out of a vector.
Create a perspective matrix.
Create a ortho matrix.
Creates the matrix need to look at target from position.
The unit x point.
The unit y point.
A point of zeros.
A point of ones.
A point of 0.5.
A point of positive infinity.
A point of negative infinity.
2D point to 3D point with z as 0.
2D point to 3D point with y as z.
2D point to 3D point with z as 1.
2D point to 4D point with z as 0 and w as 0.
2D point to 4D point with z as 0 and w as 1.
A point all with the value v.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Are all the components ofpoint finite.
Make a point with no non finite conponents.
Are any of the points components nan.
Make a point with no nan conponents.
Point as a vector.
Point as a homogenous point.
Point as a homogenous point.
The sum of the points components.
The product of the points components.
The points absolute values.
The length of the vector.
The length of the vector squared.
Add two point and vector.
Add two points.
Add point and scalar.
Add point and scalar.
Negate point.
Subtract two points.
Subtract a point and a vector.
Subtract point and scalar.
Subtract point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide two points.
Divide a point and a scalar.
Divide a scalar and a point.
Cast from Point2f to Point2d.
Cast from Point2i to Point2d.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal given the error.
Are these points equal.
Vectors hash code.
Vector as a string.
Vector as a string.
Distance between two points.
Square distance between two points.
Direction between two points.
The first point.
The second point.
Should the vector be normalized.
The vector from v0 to v1.
The minimum value between s and each component in point.
The minimum value between each component in points.
The maximum value between s and each component in point.
The maximum value between each component in points.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two points.
A rounded point.
The number of digits to round to.
The rounded point
Round the point.
The number of digits to round to.
Floor each component if point.
Ceilling each component if point.
Create a array of random points.
The seed
The number of points to create.
The range of the points.
The point array.
The unit x point.
The unit y point.
A point of zeros.
A point of ones.
A point of 0.5.
A point of positive infinity.
A point of negative infinity.
2D point to 3D point with z as 0.
2D point to 3D point with y as z.
2D point to 3D point with z as 1.
2D point to 4D point with z as 0 and w as 0.
2D point to 4D point with z as 0 and w as 1.
A point all with the value v.
A point from the varibles.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Are all the components of point finite.
Make a point with no non finite conponents.
Are any of the points components nan.
Make a point with no nan conponents.
Point as a vector.
The sum of the points components.
The product of the points components.
The points absolute values.
The length of the point.
The length of the vector squared.
Add two point and vector.
Add two points.
Add point and scalar.
Add point and scalar.
Negate point.
Subtract two points.
Subtract a point and a vector.
Subtract point and scalar.
Subtract point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide two points.
Divide a point and a scalar.
Divide a scalar and a point.
Cast from Point2d to Point2f.
Cast from Point2i to Point2f.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal given the error.
Are these points equal.
Vectors hash code.
Vector as a string.
Vector as a string.
Distance between two points.
Square distance between two points.
Direction between two points.
The first point.
The second point.
Should the vector be normalized.
The vector from v0 to v1.
The minimum value between s and each component in point.
The minimum value between each component in points.
The maximum value between s and each component in point.
The maximum value between each component in points.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two points.
A rounded point.
The number of digits to round to.
The rounded point
Round the point.
The number of digits to round to.
Floor each component if point.
Ceilling each component if point.
Create a array of random points.
The seed
The number of points to create.
The range of the points.
The point array.
The unit x point.
The unit y point.
A point of zeros.
A point of ones.
A point of positive infinity.
A point of negative infinity.
2D point to 3D point with z as 0.
2D point to 3D point with y as z.
2D point to 3D point with z as 1.
2D point to 4D point with z as 0 and w as 0.
2D point to 4D point with z as 0 and w as 1.
A point all with the value v.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Convert to float vector.
Convert to double vector.
Convert to float point.
Convert to double point.
The sum of the points components.
The product of the points components.
The points absolute values.
The length of the point squared.
Add two points.
Add point and scalar.
Add point and scalar.
Negate point.
Subtract two points.
Subtract point and scalar.
Subtract point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide two points.
Divide a point and a scalar.
Divide a scalar and a point.
Cast from Point2f to Point2i.
Cast from Point2d to Point2i.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Vectors hash code.
Vector as a string.
Vector as a string.
Distance between two points.
Square distance between two points.
Direction between two points.
The minimum value between s and each component in point.
The minimum value between each component in points.
The maximum value between s and each component in point.
The maximum value between each component in points.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
The unit x point.
The unit y point.
The unit z point.
A point of zeros.
A point of ones.
A point of 0.5.
A point of positive infinity.
A point of negative infinity.
3D point to 3D swizzle point.
3D point to 2D point.
3D point to 2D point.
3D point to 2D point.
3D point to 4D point with w as 0.
3D point to 4D point with w as 1.
A point all with the value v.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Are all the components ofpoint finite.
Make a point with no non finite conponents.
Are any of the points components nan.
Make a point with no nan conponents.
Point as vector.
Point as vector.
Point as a homogenous point.
Point as a homogenous point.
The sum of the points components.
The product of the points components.
The points absolute values.
The length of the vector.
The length of the vector squared.
Add two point and vector.
Add two points.
Add point and scalar.
Add point and scalar.
Negate point.
Subtract two points.
Subtract a point and a vector.
Subtract point and scalar.
Subtract point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide two points.
Divide a scalar and a point.
Divide a point and a scalar.
Cast from Point43f to Point3d.
Cast from Point3i to Point3d.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Are these points equal given the error.
Vectors hash code.
Vector as a string.
Vector as a string.
Distance between two points.
Square distance between two points.
Direction between two points.
The first point.
The second point.
Should the vector be normalized.
The vector from v0 to v1.
The minimum value between s and each component in point.
The minimum value between each component in points.
The maximum value between s and each component in point.
The maximum value between each component in points.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two points.
A rounded point.
The number of digits to round to.
The rounded point
Round the point.
The number of digits to round to.
Floor each component if point.
Ceilling each component if point.
Create a array of random points.
The seed
The number of points to create.
The range of the points.
The point array.
The unit x point.
The unit y point.
The unit z point.
A point of zeros.
A point of ones.
A point of 0.5.
A point of positive infinity.
A point of negative infinity.
3D point to 3D swizzle point.
3D point to 2D point.
3D point to 2D point.
3D point to 2D point.
3D point to 4D point with w as 0.
3D point to 4D point with w as 1.
A point all with the value v.
A point from the varibles.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Are all the components ofpoint finite.
Make a point with no non finite conponents.
Are any of the points components nan.
Make a point with no nan conponents.
Point as vector.
Point as vector.
The sum of the points components.
The product of the points components.
The points absolute values.
The length of the vector.
The length of the vector squared.
Add two point and vector.
Add two points.
Add point and scalar.
Add point and scalar.
Negate point.
Subtract two points.
Subtract a point and a vector.
Subtract point and scalar.
Subtract point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide two points.
Divide a point and a scalar.
Divide a scalar and a point.
Cast from Point3d to Point3f.
Cast from Point3i to Point3f.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Are these points equal given the error.
Vectors hash code.
Vector as a string.
Vector as a string.
Distance between two points.
Square distance between two points.
Direction between two points.
The first point.
The second point.
Should the vector be normalized.
The vector from v0 to v1.
The minimum value between s and each component in point.
The minimum value between each component in points.
The maximum value between s and each component in point.
The maximum value between each component in points.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two points.
A rounded point.
The number of digits to round to.
The rounded point
Round the point.
The number of digits to round to.
Floor each component if point.
Ceilling each component if point.
Create a array of random points.
The seed
The number of points to create.
The range of the points.
The point array.
The unit x point.
The unit y point.
The unit z point.
A point of zeros.
A point of ones.
A point of positive infinity.
A point of negative infinity.
3D point to 3D swizzle point.
3D point to 2D point.
3D point to 2D point.
3D point to 4D point with w as 0.
3D point to 4D point with w as 1.
A point all with the value v.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Convert to float vector.
Convert to double vector.
Convert to float point.
Convert to double point.
The sum of the points components.
The product of the points components.
The points absolute values.
The length of the vector squared.
Add two points.
Add point and scalar.
Add point and scalar.
Negate point.
Subtract two points.
Subtract point and scalar.
Subtract point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide two points.
Divide a point and a scalar.
Divide a scalar and a point.
Cast from Point3f to Point3i.
Cast from Point3d to Point3i.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Vectors hash code.
Vector as a string.
Vector as a string.
Distance between two points.
Square distance between two points.
Direction between two points.
The minimum value between s and each component in point.
The minimum value between each component in points.
The maximum value between s and each component in point.
The maximum value between each component in points.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
The unit x point.
The unit y point.
The unit z point.
The unit z point.
A point of zeros.
A point of ones.
A point of 0.5.
A point of positive infinity.
A point of negative infinity.
4D point to 2D point.
4D point to 3D point.
A point all with the value v.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Are all the components ofpoint finite.
Make a point with no non finite conponents.
Are any of the points components nan.
Make a point with no nan conponents.
Point as vector.
Point as vector.
The sum of the points components.
The product of the points components.
The points absolute values.
The length of the vector.
The length of the vector squared.
Add two points.
Add a point and a vector.
Add point and scalar.
Add point and scalar.
Negate point.
Subtract two points.
Add a point and a vector.
Subtract point and scalar.
Subtract point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide two points.
Divide a point and a scalar.
Divide a scalar and a point.
Cast from Point4f to Point4d.
Cast from Point4i to Point4d.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Are these points equal given the error.
Vectors hash code.
Vector as a string.
Vector as a string.
Distance between two points.
Square distance between two points.
Direction between two points.
The first point.
The second point.
Should the vector be normalized.
The vector from v0 to v1.
The minimum value between s and each component in point.
The minimum value between each component in points.
The maximum value between s and each component in point.
The maximum value between each component in points.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two points.
A rounded point.
The number of digits to round to.
The rounded point
Round the point.
The number of digits to round to.
Floor each component if point.
Ceilling each component if point.
The unit x point.
The unit y point.
The unit z point.
The unit z point.
A point of zeros.
A point of ones.
A point of 0.5.
A point of positive infinity.
A point of negative infinity.
4D point to 2D point.
4D point to 3D point.
A point all with the value v.
A point from the varibles.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Are all the components of point finite.
Make a point with no non finite conponents.
Are any of the points components nan.
Make a point with no nan conponents.
Point as vector.
Point as vector.
The sum of the points components.
The product of the points components.
The points absolute values.
The length of the vector.
The length of the vector squared.
Add two points.
Add a point and a vector.
Add point and scalar.
Add point and scalar.
Negate point.
Subtract two points.
Subtract a point and a vector.
Subtract point and scalar.
Subtract point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide two points.
Divide a point and a scalar.
Divide a scalar and a point.
Cast from Point4d to Point4f.
Cast from Point4i to Point4f.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Are these points equal given the error.
Vectors hash code.
Vector as a string.
Vector as a string.
Distance between two points.
Square distance between two points.
Direction between two points.
The first point.
The second point.
Should the vector be normalized.
The vector from v0 to v1.
The minimum value between s and each component in point.
The minimum value between each component in points.
The maximum value between s and each component in point.
The maximum value between each component in points.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two points.
A rounded point.
The number of digits to round to.
The rounded point
Round the point.
The number of digits to round to.
Floor each component if point.
Ceilling each component if point.
The unit x point.
The unit y point.
The unit z point.
The unit z point.
A point of zeros.
A point of ones.
A point of positive infinity.
A point of negative infinity.
4D point to 2D point.
4D point to 3D point.
A point all with the value v.
A point from the varibles.
Array accessor for variables.
The variables index.
The variable value
Convert to float vector.
Convert to double vector.
Convert to float point.
Convert to double point.
The sum of the points components.
The product of the points components.
The points absolute values.
The length of the vector squared.
Add two points.
Add point and scalar.
Add point and scalar.
Negate point.
Subtract two points.
Subtract point and scalar.
Subtract point and scalar.
Multiply two points.
Multiply a point and a scalar.
Multiply a point and a scalar.
Divide two points.
Divide a point and a scalar.
Divide a scalar and a point.
Cast from Point4f to Point4i.
Cast from Point4d to Point4i.
Are these points equal.
Are these points not equal.
Are these points equal.
Are these points equal.
Vectors hash code.
Vector as a string.
Vector as a string.
The minimum value between s and each component in point.
The minimum value between each component in points.
The maximum value between s and each component in point.
The maximum value between each component in points.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
A Quaternion from varibles.
A Quaternion from a vector axis and angle.
The axis is the up direction and the angle is the rotation.
A quaternion with the rotation required to
rotation from the from direction to the to direction.
Returns the conjugate of a quaternion value.
The inverse of the quaternion.
The length of the quaternion.
The sqr length of the quaternion.
The a normalized quaternion.
Subtract a quaternion and a scalar.
Negate a quaternion.
Subtract two quaternions.
Add a quaternion and a scalar.
Add two quaternions.
Multiply a quaternion and a scalar.
Divide a quaternion and a scalar.
Multiply two quternions together.
Multiply a quaternion and a vector together.
Multiply a quaternion and a vector together.
Are these Quaternions equal.
Are these Quaternions not equal.
Are these Quaternions equal.
Are these Quaternions equal.
Quaternions hash code.
Quaternion as a string.
Quaternion as a string.
Convert to a single precision 3 dimension matrix.
Convert to a single precision 4 dimension matrix.
The normalize the quaternion.
The dot product of two quaternion..
Slerp the quaternion from the from rotation to the to rotation by t.
Create a rotation out of a vector.
Uses Unity euler axis (+x right, +y up, +z forward)
Returns a 4x4 matrix that rotates around the x-axis by a given number of degrees.
The clockwise rotation angle when looking along the x-axis towards the origin in degrees.
Returns a 4x4 matrix that rotates around the y-axis by a given number of degrees.
The clockwise rotation angle when looking along the y-axis towards the origin in degrees.
Returns a 4x4 matrix that rotates around the z-axis by a given number of degrees.
The clockwise rotation angle when looking along the z-axis towards the origin in degrees.
A Quaternion from varibles.
A Quaternion from varibles.
A Quaternion from a vector axis and angle.
The axis is the up direction and the angle is the rotation.
A quaternion with the rotation required to
rotation from the from direction to the to direction.
Returns the conjugate of a quaternion value.
The inverse of the quaternion.
The length of the quaternion.
The sqr length of the quaternion.
The a normalized quaternion.
Subtract a quaternion and a scalar.
Subtract two quaternions.
Negate a quaternion.
Add a quaternion and a scalar.
Add two quaternions.
Multiply a quaternion and a scalar.
Divide a quaternion and a scalar.
Multiply two quaternions together.
Multiply a quaternion and a vector together.
Multiply a quaternion and a vector together.
Are these Quaternions equal.
Are these Quaternions not equal.
Are these Quaternions equal.
Are these Quaternions equal.
Quaternions hash code.
Quaternion as a string.
Quaternion as a string.
Convert to a single precision 3 dimension matrix.
Convert to a single precision 4 dimension matrix.
The normalize the quaternion.
The dot product of two quaternion..
Slerp the quaternion from the from rotation to the to rotation by t.
Create a rotation out of a vector.
Uses Unity euler axis (+x right, +y up, +z forward)
Returns a 4x4 matrix that rotates around the x-axis by a given number of degrees.
The clockwise rotation angle when looking along the x-axis towards the origin in degrees.
Returns a 4x4 matrix that rotates around the y-axis by a given number of degrees.
The clockwise rotation angle when looking along the y-axis towards the origin in degrees.
Returns a 4x4 matrix that rotates around the z-axis by a given number of degrees.
The clockwise rotation angle when looking along the z-axis towards the origin in degrees.
Represents a angle in degrees.
The angle in radians.
The radian angle in degees.
Pi.
0 degrees.
90 degrees.
90 degrees.
180 degrees.
270 degrees.
360 degrees.
Create a new radian from a value.
The angle in radians.
Add two angles.
Add angle and scalar.
Negate the angle.
Add angle and scalar.
Subtract two angles.
Subtract angle and scalar.
Subtract angle and scalar.
Multiply two angles.
Multiply a angle and a scalar.
Is the radian less than the scalar.
Is the radian less than or equal to the scalar.
Is the radian greater than the scalar.
Is the radian greater than or equal to the scalar.
Is the radian less than the other radian.
Is the radian less than or equal to the other radian.
Is the radian greater than the other radian.
Is the radian greater than or equal to the other radian.
Multiply a angle and a scalar.
Cast from a degrees to radians.
The angle in radians.
Are these angles equal.
Are these angles not equal.
Are these angles equal.
Are these angles equal.
Angles hash code.
Angles as a string.
Angles as a string.
A rounded angle.
The number of digits to round to.
The rounded angle
The unit x vector.
The unit y vector.
A vector of zeros.
A vector of ones.
A vector of 0.5.
A vector of positive infinity.
A vector of negative infinity.
Convert to a 3 dimension vector.
Convert to a 3 dimension vector.
Convert to a 4 dimension vector.
Convert to a 4 dimension vector.
A vector all with the value v.
A vector from the varibles.
Are all the components of vector finite.
Make a vector with no non finite conponents.
Are any of the vectors components nan.
Make a vector with no nan conponents.
Convert the vector to a point.
The sum of the vectors components.
The product of the vectors components.
The length of the vector.
The length of the vector squared.
The vector normalized.
Counter clock-wise perpendicular.
Clock-wise perpendicular.
The vectors absolute values.
Add two vectors.
Add vector and scalar.
Add vector and scalar.
Negate vector.
Subtract two vectors.
Subtract vector and scalar.
Subtract vector and scalar.
Multiply two vectors.
Multiply a vector and a scalar.
Multiply a vector and a scalar.
Divide two vectors.
Divide a vector and a scalar.
Divide a scalar and a vector.
Cast from Vector2f to Vector2f.
Are these vectors equal.
Are these vectors not equal.
Are these vectors equal.
Are these vectors equal given the error.
Are these vectors equal.
Vectors hash code.
Compare two vectors by axis.
Vector as a string.
Vector as a string.
The dot product of two vectors.
The dot product of vector and point.
The abs dot product of two vectors.
Normalize the vector.
Cross two vectors.
Project vector v onto u.
Given an incident vector i and a normal vector n.
Returns the refraction vector given the incident vector i,
the normal vector n and the refraction index eta.
Angle between two vectors in degrees from 0 to 180.
A and b origin treated as 0,0 and do not need to be normalized.
Angle between two vectors in degrees from 0 to 360.
Angle represents moving ccw from a to b.
A and b origin treated as 0,0 and do not need to be normalized.
The minimum value between s and each component in vector.
The minimum value between each component in vectors.
The maximum value between s and each component in vector.
The maximum value between each component in vectors.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two vectors.
Slerp between two vectors arc.
Round vector.
number of digits to round to.
Round the vector.
The number of digits to round to.
Floor each component of vector.
Ceilling each component of vector.
The unit x vector.
The unit y vector.
A vector of zeros.
A vector of ones.
A vector of 0.5.
A vector of positive infinity.
A vector of negative infinity.
Convert to a 3 dimension vector.
Convert to a 3 dimension vector.
Convert to a 4 dimension vector.
Convert to a 4 dimension vector.
A vector all with the value v.
A vector from the variables.
A vector from the varibles.
Are all the components of vector finite.
Make a vector with no non finite conponents.
Are any of the vectors components nan.
Make a vector with no nan conponents.
Convert the vector to a point.
The sum of the vectors components.
The product of the vectors components.
The length of the vector.
The length of the vector squared.
The vector normalized.
Counter clock-wise perpendicular.
Clock-wise perpendicular.
The vectors absolute values.
Add two vectors.
Add vector and scalar.
Add vector and scalar.
Negate vector.
Subtract two vectors.
Subtract vector and scalar.
Subtract vector and scalar.
Multiply two vectors.
Multiply a vector and a scalar.
Multiply a vector and a scalar.
Divide two vectors.
Divide a vector and a scalar.
Divide a scalar and a vector.
Cast from Vector2d to Vector2f.
Are these vectors equal.
Are these vectors not equal.
Are these vectors equal.
Are these vectors equal given the error.
Are these vectors equal.
Vectors hash code.
Compare two vectors by axis.
Vector as a string.
Vector as a string.
The dot product of two vectors.
The dot product of vector and point.
The abs dot product of two vectors.
Normalize the vector.
Cross two vectors.
Project vector v onto u.
Given an incident vector i and a normal vector n.
Returns the refraction vector given the incident vector i,
the normal vector n and the refraction index eta.
Angle between two vectors in degrees from 0 to 180.
A and b origin treated as 0,0 and do not need to be normalized.
Angle between two vectors in degrees from 0 to 360.
Angle represents moving ccw from a to b.
A and b origin treated as 0,0 and do not need to be normalized.
The minimum value between s and each component in vector.
The minimum value between each component in vectors.
The maximum value between s and each component in vector.
The maximum value between each component in vectors.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two vectors.
Slerp between two vectors arc.
Round vector.
number of digits to round to.
Round the vector.
The number of digits to round to.
Floor each component of vector.
Ceilling each component of vector.
The unit x vector.
The unit y vector.
The unit z vector.
A vector of zeros.
A vector of ones.
A vector of 0.5.
A vector of positive infinity.
A vector of negative infinity.
3D vector to 3D swizzle vector.
3D vector to 2D vector.
3D vector to 2D vector.
3D vector to 2D vector.
3D vector to 4D vector with w as 0.
3D vector to 4D vector with w as 1.
A vector all with the value v.
A vector from the varibles.
A vector from a 2d vector and the z varible.
Are all the components of vector finite.
Make a vector with no non finite conponents.
Are any of the vectors components nan.
Make a vector with no nan conponents.
Convert the vector to a point.
The sum of the vectors components.
The product of the vectors components.
The length of the vector.
The length of the vector squared.
The vector normalized.
The vectors absolute values.
Convert a normalized vector to tangent space.
Add two vectors.
Add vector and scalar.
Add vector and scalar.
Negate vector.
Subtract two vectors.
Subtract vector and scalar.
Subtract vector and scalar.
Multiply two vectors.
Multiply a vector and a scalar.
Multiply a vector and a scalar.
Divide two vectors.
Divide a vector and a scalar.
Divide a scalar and a vector.
Cast from Vector3f to Vector3d.
Are these vectors equal.
Are these vectors not equal.
Are these vectors equal.
Are these vectors equal given the error.
Are these vectors equal.
Vectors hash code.
Compare two vectors by axis.
Vector as a string.
Vector as a string.
The dot product of two vectors.
The dot product of vector and point.
The abs dot product of two vectors.
Normalize the vector.
Angle between two vectors in degrees from 0 to 180.
A and b origin treated as 0,0 and do not need to be normalized.
Cross two vectors.
Cross two vectors.
Cross a vector andpoint.
Cross two points.
Project vector v onto u.
Given an incident vector i and a normal vector n.
Returns the refraction vector given the incident vector i,
the normal vector n and the refraction index eta.
Create a set of orthonormal vectors.
The minimum value between s and each component in vector.
The minimum value between each component in vectors.
The maximum value between s and each component in vector.
The maximum value between each component in vectors.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two vectors.
Slerp between two vectors arc.
Round vector.
number of digits to round to.
Round the vector.
The number of digits to round to.
Floor each component of vector.
Ceilling each component of vector.
The unit x vector.
The unit y vector.
The unit z vector.
A vector of zeros.
A vector of ones.
A vector of 0.5.
A vector of positive infinity.
A vector of negative infinity.
3D vector to 3D swizzle vector.
3D vector to 2D vector.
3D vector to 2D vector.
3D vector to 2D vector.
3D vector to 4D vector with w as 0.
3D vector to 4D vector with w as 1.
A vector all with the value v.
A vector from the varibles.
A vector from the varibles.
A vector from a 2d vector and the z varible.
Are all the components of vector finite.
Make a vector with no non finite conponents.
Are any of the vectors components nan.
Make a vector with no nan conponents.
Convert the vector to a point.
The sum of the vectors components.
The product of the vectors components.
The length of the vector.
The length of the vector squared.
The vector normalized.
The vectors absolute values.
Convert a normalized vector to tangent space.
Add two vectors.
Add vector and scalar.
Add vector and scalar.
Negate vector.
Subtract two vectors.
Subtract vector and scalar.
Subtract vector and scalar.
Multiply two vectors.
Multiply a vector and a scalar.
Multiply a vector and a scalar.
Divide two vectors.
Divide a vector and a scalar.
Divide a scalar and a vector.
Cast from Vector3d to Vector3f.
Are these vectors equal.
Are these vectors not equal.
Are these vectors equal.
Are these vectors equal given the error.
Are these vectors equal.
Vectors hash code.
Compare two vectors by axis.
Vector as a string.
Vector as a string.
The dot product of two vectors.
The dot product of vector and point.
The abs dot product of two vectors.
Normalize the vector.
Angle between two vectors in degrees from 0 to 180.
A and b origin treated as 0,0 and do not need to be normalized.
Cross two vectors.
Cross two vectors.
Cross a vector andpoint.
Cross two points.
Project vector v onto u.
Given an incident vector i and a normal vector n.
Returns the refraction vector given the incident vector i,
the normal vector n and the refraction index eta.
Create a set of orthonormal vectors.
The minimum value between s and each component in vector.
The minimum value between each component in vectors.
The maximum value between s and each component in vector.
The maximum value between each component in vectors.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two vectors.
Slerp between two vectors arc.
Round vector.
number of digits to round to.
Round the vector.
The number of digits to round to.
Floor each component of vector.
Ceilling each component of vector.
The unit x vector.
The unit y vector.
The unit z vector.
The unit w vector.
A vector of zeros.
A vector of ones.
A vector of 0.5.
A vector of positive infinity.
A vector of negative infinity.
Convert to a 2 dimension vector.
Convert to a 2 dimension vector.
Convert to a 3 dimension vector.
A copy of the vector with w as 0.
A vector all with the value v.
A vector from the varibles.
A vector from a 2d vector and the z and w varibles.
A vector from a 3d vector and the w varible.
Are all the components of vector finite.
Make a vector with no non finite conponents.
Are any of the vectors components nan.
Make a vector with no nan conponents.
Convert the vector to a point.
The sum of the vectors components.
The product of the vectors components.
The length of the vector.
The length of the vector squared.
The vector normalized.
The vectors absolute values.
Add two vectors.
Add vector and scalar.
Add vector and scalar.
Negate vector.
Subtract two vectors.
Subtract vector and scalar.
Subtract vector and scalar.
Multiply two vectors.
Multiply a vector and a scalar.
Multiply a vector and a scalar.
Divide two vectors.
Divide a vector and a scalar.
Divide a scalar and a vector.
Cast from Vector4f to Vector4d.
Are these vectors equal.
Are these vectors not equal.
Are these vectors equal.
Are these vectors equal given the error.
Are these vectors equal.
Vectors hash code.
Compare two vectors by axis.
Vector as a string.
Vector as a string.
The dot product of two vectors.
The dot product of vector and point.
The abs dot product of two vectors.
Normalize the vector.
The minimum value between s and each component in vector.
The minimum value between each component in vectors.
The maximum value between s and each component in vector.
The maximum value between each component in vectors.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two vectors.
Round vector.
number of digits to round to.
Round the vector.
The number of digits to round to.
Floor each component of vector.
Ceilling each component of vector.
The unit x vector.
The unit y vector.
The unit z vector.
The unit w vector.
A vector of zeros.
A vector of ones.
A vector of 0.5.
A vector of positive infinity.
A vector of negative infinity.
Convert to a 2 dimension vector.
Convert to a 2 dimension vector.
Convert to a 3 dimension vector.
A copy of the vector with w as 0.
A vector all with the value v.
A vector from the varibles.
A vector from the varibles.
A vector from a 2d vector and the z and w varibles.
A vector from a 3d vector and the w varible.
Are all the components of vector finite.
Make a vector with no non finite conponents.
Are any of the vectors components nan.
Make a vector with no nan conponents.
Convert the vector to a point.
The sum of the vectors components.
The product of the vectors components.
The length of the vector.
The length of the vector squared.
The vector normalized.
The vectors absolute values.
Add two vectors.
Add vector and scalar.
Add vector and scalar.
Negate vector.
Subtract two vectors.
Subtract vector and scalar.
Subtract vector and scalar.
Multiply two vectors.
Multiply a vector and a scalar.
Multiply a vector and a scalar.
Divide two vectors.
Divide a vector and a scalar.
Divide a scalar and a vector.
Cast from Vector4d to Vector4f.
Are these vectors equal.
Are these vectors not equal.
Are these vectors equal.
Are these vectors equal given the error.
Are these vectors equal.
Vectors hash code.
Compare two vectors by axis.
Vector as a string.
Vector as a string.
The dot product of two vectors.
The dot product of vector and point.
The abs dot product of two vectors.
Normalize the vector.
The minimum value between s and each component in vector.
The minimum value between each component in vectors.
The maximum value between s and each component in vector.
The maximum value between each component in vectors.
Clamp each component to specified min and max.
Clamp each component to specified min and max.
Lerp between two vectors.
Round vector.
number of digits to round to.
Round the vector.
The number of digits to round to.
Floor each component of vector.
Ceilling each component of vector.
A 2D box represented by its min and max values.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
The boxes lower left corner.
The boxes lower right corner.
The boxes upper right corner.
The boxes upper left corner.
The center of the box.
The size of the boxes sides.
The size of the box on the x axis.
The size of the box on the y axis.
The area of the box.
Is the box equal to this obj.
The object.
Is the box equal to this obj.
Is the box equal to the other box.
The other box.
Is the box equal to the other box.
The boxes hash code.
The boxes hash code.
Get the boxes corner points as a array.
The boxes corner points as a array
Copy the boxes corner points in the array.
A array that has a size of at least 4.
Copy the boxes corner points in the array.
Convert the 2d points into 3d points with the
y component now as the z component.
A array that has a size of at least 4.
The 3d points y value.
Returns the bounding box containing this box and the given point.
Returns the bounding box containing this box and the given box.
Return a new box expanded by the amount.
The box to expand.
The amount to expand.
The expanded box.
Returns true if this box intersects the other box.
The other box.
True if on border counts as inside.
Returns true if this box intersects the other box.
Does the box fully contain the other box.
The other box.
True if on border counts as inside.
Does the box fully contain the other box.
Does the box contain the point.
The point.
True if on border counts as inside.
True if the box contains the point.
Find the closest point to the box.
If point inside box return point.
Return the signed distance to the point.
If point is outside box field is positive.
If point is inside box field is negative.
Round the boxes components.
The number of digits to round to.
Caculate the bounding box of the points.
The points.
The bounding box.
Calculate the bounds of 2 points.
The first point.
The second point
The bounding box.
Caculate the bounding box of a set of segments.
The segments.
The bounding box
A 2D box represented by its min and max values.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
The boxes lower left corner.
The boxes lower right corner.
The boxes upper right corner.
The boxes upper left corner.
The center of the box.
The size of the boxes sides.
The size of the box on the x axis.
The size of the box on the y axis.
The area of the box.
Is the box equal to this obj.
The object.
Is the box equal to this obj.
Is the box equal to the other box.
The other box.
Is the box equal to the other box.
The boxes hash code.
The boxes hash code.
Get the boxes corner points as a array.
The boxes corner points as a array
Copy the boxes corner points in the array.
A array that has a size of at least 4.
Copy the boxes corner points in the array.
Convert the 2f points into 3f points with the
y component now as the z component.
A array that has a size of at least 4.
The 3f points y value.
Returns the bounding box containing this box and the given point.
Returns the bounding box containing this box and the given box.
Return a new box expanded by the amount.
The box to expand.
The amount to expand.
The expanded box.
Returns true if this box intersects the other box.
The other box.
True if on border counts as inside.
Returns true if this box intersects the other box.
Does the box fully contain the other box.
The other box.
True if on border counts as inside.
Does the box fully contain the other box.
Does the box contain the point.
The point.
True if on border counts as inside.
True if the box contains the point.
Find the closest point to the box.
If point inside box return point.
Return the signed distance to the point.
If point is outside box field is positive.
If point is inside box field is negative.
Round the boxes components.
The number of digits to round to.
Caculate the bounding box of the points.
The points.
The bounding box.
Calculate the bounds of 2 points.
The first point.
The second point
The bounding box.
Caculate the bounding box of a set of segments.
The segments.
The bounding box
A 2D box represented by its min and max values.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
The boxes lower left corner.
The boxes lower right corner.
The boxes upper right corner.
The boxes upper left corner.
The center of the box.
The size of the boxes sides.
The size of the box on the x axis.
The size of the box on the y axis.
The area of the box.
Enumerate each point on the boxes perimeter.
Enumerate each point in the box.
Is the box equal to this obj.
The object.
Is the box equal to this obj.
Is the box equal to the other box.
The other box.
Is the box equal to the other box.
The boxes hash code.
The boxes hash code.
Get the boxes corner points as a array.
The boxes corner points as a array
Copy the boxes corner points in the array.
A array that has a size of at least 4.
Copy the boxes corner points in the array.
Convert the 2i points into 3i points with the
y component now as the z component.
A array that has a size of at least 4.
The 3i points y value.
Returns the bounding box containing this box and the given point.
Returns the bounding box containing this box and the given box.
Return a new box expanded by the amount.
The box to expand.
The amount to expand.
The expanded box.
Returns true if this box intersects the other box.
The other box.
True if on border counts as inside.
Returns true if this box intersects the other box.
Does the box fully contain the other box.
The other box.
True if on border counts as inside.
Does the box fully contain the other box.
Does the box contain the point.
The point.
True if on border counts as inside.
True if the box contains the point.
Find the closest point to the box.
If point inside box return point.
Caculate the bounding box of the points.
The points.
The bounding box.
Calculate the bounds of 2 points.
The first point.
The second point
The bounding box.
A 3D box represented by its min and max values.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
The center of the box.
The size of the boxes sides.
The size of the box on the x axis.
The size of the box on the y axis.
The size of the box on the z axis.
The volume of the box.
THe boxes surface area.
Is the box equal to this obj.
The object.
Is the box equal to this obj.
Is the box equal to the other box.
The other box.
Is the box equal to the other box.
The boxes hash code.
The boxes hash code.
Get the boxes corner points as a array.
The boxes corner points as a array
Copy the boxes corner points in the array.
A array that has a size of at least 8.
Copy the boxes corner points in the array.
A array that has a size of at least 8.
Returns the bounding box containing this box and the given point.
Returns the bounding box containing this box and the given box.
Return a new box expanded by the amount.
The box to expand.
The amount to expand.
The expanded box.
Returns true if this box intersects the other box.
The other box.
True if on border counts as inside.
Returns true if this box intersects the other box.
Does the box fully contain the other box.
The other box.
True if on border counts as inside.
Does the box fully contain the other box.
Does the box contain the point.
The point.
True if on border counts as inside.
True if the box contains the point.
Find the closest point to the box.
If point inside box return point.
Return the signed distance to the point.
If point is outside box field is positive.
If point is inside box field is negative.
Round the boxes components.
The number of digits to round to.
Caculate the bounding box of the points.
The points.
The bounding box.
Calculate the bounds of 2 points.
The first point.
The second point
The bounding box.
Caculate the bounding box of a set of segments.
The segments.
The bounding box
A 3D box represented by its min and max values.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
The center of the box.
The size of the boxes sides.
The size of the box on the x axis.
The size of the box on the y axis.
The size of the box on the z axis.
The volume of the box.
THe boxes surface area.
Is the box equal to this obj.
The object.
Is the box equal to this obj.
Is the box equal to the other box.
The other box.
Is the box equal to the other box.
The boxes hash code.
The boxes hash code.
Get the boxes corner points as a array.
The boxes corner points as a array
Copy the boxes corner points in the array.
A array that has a size of at least 8.
Copy the boxes corner points in the array.
A array that has a size of at least 8.
Returns the bounding box containing this box and the given point.
Returns the bounding box containing this box and the given box.
Return a new box expanded by the amount.
The box to expand.
The amount to expand.
The expanded box.
Returns true if this box intersects the other box.
The other box.
True if on border counts as inside.
Returns true if this box intersects the other box.
Does the box fully contain the other box.
The other box.
True if on border counts as inside.
Does the box fully contain the other box.
Does the box contain the point.
The point.
True if on border counts as inside.
True if the box contains the point.
Find the closest point to the box.
If point inside box return point.
Return the signed distance to the point.
If point is outside box field is positive.
If point is inside box field is negative.
Round the boxes components.
The number of digits to round to.
Caculate the bounding box of the points.
The points.
The bounding box.
Calculate the bounds of 2 points.
The first point.
The second point
The bounding box.
Caculate the bounding box of a set of segments.
The segments.
The bounding box
A 3D box represented by its min and max values.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
Construct a new box.
The boxes min point.
The boxes max point.
The center of the box.
The size of the boxes sides.
The size of the box on the x axis.
The size of the box on the y axis.
The size of the box on the z axis.
The volume of the box.
THe boxes surface area.
Is the box equal to this obj.
The object.
Is the box equal to this obj.
Is the box equal to the other box.
The other box.
Is the box equal to the other box.
The boxes hash code.
The boxes hash code.
Get the boxes corner points as a array.
The boxes corner points as a array
Copy the boxes corner points in the array.
A array that has a size of at least 8.
Copy the boxes corner points in the array.
A array that has a size of at least 8.
Returns the bounding box containing this box and the given point.
Returns the bounding box containing this box and the given box.
Return a new box expanded by the amount.
The box to expand.
The amount to expand.
The expanded box.
Returns true if this box intersects the other box.
The other box.
True if on border counts as inside.
Returns true if this box intersects the other box.
Does the box fully contain the other box.
The other box.
True if on border counts as inside.
Does the box fully contain the other box.
Does the box contain the point.
The point.
True if on border counts as inside.
True if the box contains the point.
Find the closest point to the box.
If point inside box return point.
Caculate the bounding box of the points.
The points.
The bounding box.
Calculate the bounds of 2 points.
The first point.
The second point
The bounding box.
The squared radius.
The circles diameter.
The circles area.
the circles circumference.
Calculate the bounding box.
The circles hashcode.
The circles hashcode.
Find the closest point to the circle.
If point inside circle return point.
Return the signed distance to the point.
If point is outside circle field is positive.
If point is inside circle field is negative.
Does the circle contain the point.
The point.
Does the border conunt as inside the circle.
true if circle contains point
Does the circle fully contain the box.
The box.
Does the border conunt as inside the circle.
Does the circle fully contain the box.
Does this circle intersect with the other circle.
The other circle
Does the border conunt as inside the circle.
True if the circles intersect
Does the circle intersect the box.
The box.
Does the border conunt as inside the circle.
Does the circle intersect the box.
Enlarge the circle so it contains the point p.
Returns true if the point d is inside the circle defined by the points a, b, c.
Creates a circle that has both points on its circumference.
Creates a circle that has all 3 points on its circumference.
From MathWorld: http://mathworld.wolfram.com/Circumcircle.html.
Fails if the points are colinear.
Creates a circle that contains all three point.
Calculate the bounding circle that contains
all the points in the list.
Finds which axis contains the two most extreme points
The squared radius.
The circles diameter.
The circles area.
the circles circumference.
Calculate the bounding box.
The circles hashcode.
The circles hashcode.
Find the closest point to the circle.
If point inside circle return point.
Return the signed distance to the point.
If point is outside circle field is positive.
If point is inside circle field is negative.
Does the circle contain the point.
The point.
Does the border conunt as inside the circle.
true if circle contains point
Does the circle fully contain the box.
The box.
Does the border conunt as inside the circle.
Does the circle fully contain the box.
Does this circle intersect with the other circle.
The other circle
Does the border conunt as inside the circle.
True if the circles intersect
Does the circle intersect the box.
The box.
Does the border conunt as inside the circle.
Does the circle intersect the box.
Enlarge the circle so it contains the point p.
Returns true if the point d is inside the circle defined by the points a, b, c.
Creates a circle that has both points on its circumference.
Creates a circle that has all 3 points on its circumference.
From MathWorld: http://mathworld.wolfram.com/Circumcircle.html.
Fails if the points are colinear.
Creates a circle that contains all three point.
Calculate the bounding circle that contains
all the points in the list.
Finds which axis contains the two most extreme points
Represents a line from three coefficients
a, b and c, where ax + by + c = 0 holds.
Create a new line from three coefficients
a, b and c, where ax + by + c = 0 holds.
The constant in ax.
The constant in by
The constant c
Create a new line from the slope and the y
intercept, where y = mx + b holds.
The lines slope.
The y intercept.
Create a new line that passes through the two points.
Point 1.
Point 2.
Find the slope of the line.
Determines whether the line is ascending
(that is, makes an angle with the positive
direction of the X axis that lies in (0, pi/2).
Determines whether the line is vertical
(that is, makes an angle with the positive
direction of the X axis that is equal to pi/2.
Determines whether the line is descending
(that is, makes an angle with the positive
direction of the X axis that lies in (pi/2, pi).
Determines whether the line is horizontal
(that is, makes an angle with the positive
direction of the X axis that is equal to pi.
Determines whether the line is undefined
(e.g.two equal points were passed to the constructor).
Calculates the angle that the line makes
with the positive direction of the X axis.
Is the line equal to the other object.
The other object.
Is the line equal to the other object.
Is the line equal to the other line.
The other line.
Is the line equal to the other line.
The lines hash code.
The lines hash code.
Calculates the X coordinate of a point on the line by its Y coordinate.
Calculates the Y coordinate of a point on the line by its X coordinate.
Determines whether the point lies on the line.
if the point lies on the line
Calculates the perpendicular line that
passes through the given point.
Determines whether the point lies
on the left side of the line.
Determines whether the point lies
on the right side of the line.
Determine if the two lines are the equivalent
even though they may have a different equation.
Calculates the intersection of two lines.
the other line
intersection point
if lines intersect
Represents a line from three coefficients
a, b and c, where ax + by + c = 0 holds.
Create a new line from three coefficients
a, b and c, where ax + by + c = 0 holds.
The constant in ax.
The constant in by
The constant c
Create a new line from the slope and the y
intercept, where y = mx + b holds.
The lines slope.
The y intercept.
Create a new line that passes through the two points.
Point 1.
Point 2.
Find the slope of the line.
Determines whether the line is ascending
(that is, makes an angle with the positive
direction of the X axis that lies in (0, pi/2).
Determines whether the line is vertical
(that is, makes an angle with the positive
direction of the X axis that is equal to pi/2.
Determines whether the line is descending
(that is, makes an angle with the positive
direction of the X axis that lies in (pi/2, pi).
Determines whether the line is horizontal
(that is, makes an angle with the positive
direction of the X axis that is equal to pi.
Determines whether the line is undefined
(e.g.two equal points were passed to the constructor).
Calculates the angle that the line makes
with the positive direction of the X axis.
Is the line equal to the other object.
The other object.
Is the line equal to the other object.
Is the line equal to the other line.
The other line.
Is the line equal to the other line.
The lines hash code.
The lines hash code.
Calculates the X coordinate of a point on the line by its Y coordinate.
Calculates the Y coordinate of a point on the line by its X coordinate.
Determines whether the point lies on the line.
if the point lies on the line
Calculates the perpendicular line that
passes through the given point.
Determines whether the point lies
on the left side of the line.
Determines whether the point lies
on the right side of the line.
Determine if the two lines are the equivalent
even though they may have a different equation.
Calculates the intersection of two lines.
the other line
intersection point
if lines intersect
A 3D Line struct represented by a position and a direction.
The Lines position.
The Lines direction.
Might not be normalized.
Construct a Line from a point and the direction.
The Lines position.
The Lines direction (will be normalized)
Check if the two Lines are equal.
The first Line.
The second Line.
True if the two Lines are equal.
Check if the two Lines are not equal.
The first Line.
The second Line.
True if the two Lines are not equal.
Is the Line equal to this object.
The object.
Is the Line equal to this object.
Is the Line equal to the other Line.
The over Line.
Is the Line equal to the other Line.
The Lines hashcode.
The Lines hashcode.
The Lines as a string.
Normalize the lines direction.
Round the Lines position and direction.
number of digits to round to.
A 3f Line struct represented by a position and a direction.
The Lines position.
The Lines direction.
Might not be normalized.
Construct a Line from a point and the direction.
The Lines position.
The Lines direction (will be normalized)
Check if the two Lines are equal.
The first Line.
The second Line.
True if the two Lines are equal.
Check if the two Lines are not equal.
The first Line.
The second Line.
True if the two Lines are not equal.
Is the Line equal to this object.
The object.
Is the Line equal to this object.
Is the Line equal to the other Line.
The over Line.
Is the Line equal to the other Line.
The Lines hashcode.
The Lines hashcode.
The Lines as a string.
Normalize the lines direction.
Round the Lines position and direction.
number of digits to round to.
Plane struct defined by a position and direction.
A plane facing the x axis.
A plane facing the y axis.
A plane facing the z axis.
The planes position.
The planes direction.
Create a new plane.
The planes direction.
Create a new plane.
The planes position.
The planes direction.
Create a new plane.
The planes direction.
The planes distance from the origin.
From three noncollinear points (ordered ccw).
The planes distance from the origin.
The planes square distance from the origin.
Check if the two planes are equal.
The first plane.
The second plane.
True if the planes are equal.
Check if the two planes are not equal.
The first plane.
The second plane.
True if the planes are not equal.
Check if this plane is equal to the other object.
The other object.
Are these planes equal.
Check if this plane is equal to the other plane.
The other plane.
Are these planes equal.
The planes hash code.
The plane as a string.
The closest point on the plane to the point p.
The point.
The closest point on the plane.
Plane struct defined by a position and direction.
A plane facing the x axis.
A plane facing the y axis.
A plane facing the z axis.
The planes position.
The planes direction.
Create a new plane.
The planes direction.
Create a new plane.
The planes position.
The planes direction.
Create a new plane.
The planes direction.
The planes distance from the origin.
From three noncollinear points (ordered ccw).
The planes distance from the origin.
The planes square distance from the origin.
Check if the two planes are equal.
The first plane.
The second plane.
True if the planes are equal.
Check if the two planes are not equal.
The first plane.
The second plane.
True if the planes are not equal.
Check if this plane is equal to the other object.
The other object.
Are these planes equal.
Check if this plane is equal to the other plane.
The other plane.
Are these planes equal.
The planes hash code.
The plane as a string.
The closest point on the plane to the point p.
The point.
The closest point on the plane.
A 2D ray.
The rays position.
The rays direction.
Construct a new ray.
The rays position.
The rays directio
Is the ray equal to the other object.
The other object.
Is the ray equal to the other object.
Is the ray equal to the other ray.
The other ray.
Is the ray equal to the other ray.
The rays hashcode.
The rays hashcode.
Round the rays components.
The number of digits to round to.
Get the position offset along the ray at t.
The amount to offset.
The position at t.
Intersection point between two rays.
Presumes there is a intersection.
The other ray.
Intersection between two rays.
The other ray
Intersection point = Position + s * Direction.
Intersection point = ray.Position + t * ray.Direction.
If rays intersect
Intersection between ray and segment.
the segment
Intersection point = Position + s * Direction
Intersection point = A + t * (B - A)
If rays intersect
Intersection between ray and circle.
the circle
Intersection point = Position + t * Direction
If rays intersect
Intersection between ray and box.
the box
Intersection point = Position + t * Direction
If rays intersect
A 2D ray.
The rays position.
The rays direction.
Construct a new ray.
The rays position.
The rays directio
Is the ray equal to the other object.
The other object.
Is the ray equal to the other object.
Is the ray equal to the other ray.
The other ray.
Is the ray equal to the other ray.
The rays hashcode.
The rays hashcode.
Get the position offset along the ray at t.
The amount to offset.
The position at t.
Intersection point between two rays.
Presumes there is a intersection.
The other ray.
Intersection between two rays.
The other ray
Intersection point = Position + s * Direction.
Intersection point = ray.Position + t * ray.Direction.
If rays intersect
Intersection between ray and segment.
the segment
Intersection point = Position + s * Direction
Intersection point = A + t * (B - A)
If rays intersect
Intersection between ray and circle.
the circle
Intersection point = Position + t * Direction
If rays intersect
Intersection between ray and box.
the box
Intersection point = Position + t * Direction
If rays intersect
A 3D ray struct represented by a position and a direction.
The rays position.
The rays direction.
Might not be normalized.
Construct a ray from a point and the direction.
The rays position.
The rays direction (will be normalized)
Check if the two rays are equal.
The first ray.
The second ray.
True if the two rays are equal.
Check if the two rays are not equal.
The first ray.
The second ray.
True if the two rays are not equal.
Is the ray equal to this object.
The object.
Is the ray equal to this object.
Is the ray equal to the other ray.
The over ray.
Is the ray equal to the other ray.
The rays hashcode.
The rays hashcode.
The rays as a string.
The rays directions magnidute.
The rays directions square magnidute.
Get the position offset along the ray at t.
The amount to offset.
The position at t.
Normalize the lines direction.
Round the rays position and direction.
number of digits to round to.
A 3D ray struct represented by a position and a direction.
The rays position.
The rays direction.
Might not be normalized.
Construct a ray from a point and the direction.
The rays position.
The rays direction (will be normalized)
Check if the two rays are equal.
The first ray.
The second ray.
True if the two rays are equal.
Check if the two rays are not equal.
The first ray.
The second ray.
True if the two rays are not equal.
Is the ray equal to this object.
The object.
Is the ray equal to this object.
Is the ray equal to the other ray.
The over ray.
Is the ray equal to the other ray.
The rays hashcode.
The rays hashcode.
The rays as a string.
The rays directions magnidute.
The rays directions square magnidute.
Get the position offset along the ray at t.
The amount to offset.
The position at t.
Normalize the lines direction.
Round the rays position and direction.
number of digits to round to.
A 2D segment.
The segments first point.
The segments second point.
Construct a new segment.
The segments first point.
The segments second point.
Construct a new segment.
The segments first points x value.
The segments first points y value.
The segments second points x value.
The segments second points y value.
The segments center.
The segments length.
The segments square length.
The segments tangent vector.
The segments normal vector.
The left most point of the segment.
The right most point of the segment.
The bottom most point of the segment.
The top most point of the segment.
THe segment flipped, a is now b, b is now a.
The segments bounding box.
Is the segment equal to the other object.
The other object.
Is the segment equal to the other object.
Is the segment equal to the other segment.
The other segment.
Is the segment equal to the other segment.
The segments hashcode.
The segments hashcode.
The points distance from the segment.
The points sqr distance from the segment.
Round the segments points.
The number of digits to round to.
Does the point line on the segemnts.
Return the signed distance to the point.
Always positive.
Does the two segments intersect.
other segment
Do the two segments intersect.
other segment
Intersection point = A + t * (B - A)
If they intersect
Do the two segments intersect.
other segment
Intersection point = A + s * (B - A)
Intersection point = seg.A + t * (seg.B - seg.A)
If they intersect
Does the segment intersect this box.
The closest point on segment to point.
point
The closest point on segment to point.
point
closest point = A + t * (B - A)
The closest segment spanning two other segments.
the other segment
The closest segment spanning two other segments.
the other segment
closest point = A + s * (B - A)
other closest point = seg.A + t * (seg.B - seg.A)
A 2D segment.
The segments first point.
The segments second point.
Construct a new segment.
The segments first point.
The segments second point.
Construct a new segment.
The segments first points x value.
The segments first points y value.
The segments second points x value.
The segments second points y value.
The segments center.
The segments length.
The segments square length.
The segments tangent vector.
The segments normal vector.
The left most point of the segment.
The right most point of the segment.
The bottom most point of the segment.
The top most point of the segment.
The segment flipped, a is now b, b is now a.
The segments bounding box.
Is the segment equal to the other object.
The other object.
Is the segment equal to the other object.
Is the segment equal to the other segment.
The other segment.
Is the segment equal to the other segment.
The segments hashcode.
The segments hashcode.
The points distance from the segment.
The points sqr distance from the segment.
Round the segments points.
The number of digits to round to.
Does the point line on the segemnts.
Return the signed distance to the point.
Always positive.
Does the two segments intersect.
other segment
Do the two segments intersect.
other segment
Intersection point = A + t * (B - A)
If they intersect
Do the two segments intersect.
other segment
Intersection point = A + s * (B - A)
Intersection point = seg.A + t * (seg.B - seg.A)
If they intersect
Does the segment intersect this box.
The closest point on segment to point.
point
The closest point on segment to point.
point
closest point = A + t * (B - A)
The closest segment spanning two other segments.
the other segment
The closest segment spanning two other segments.
the other segment
closest point = A + s * (B - A)
other closest point = seg.A + t * (seg.B - seg.A)
A 3D segment.
The segments first (aka source) point.
The segments second (aka target) point.
Create a new segment.
The first point.
The second point.
Create a new segment.
The first points x value.
The first points y value.
The first points z value.
The second points x value.
The second points y value.
The second points z value.
The length of the segment.
The square length of the segment.
The segment flipped, a is now b, b is now a.
The bounding box of the segment.
Array acess to the segments points.
The index of the point to access (0-2)
The point at index i.
Is the segment equal to this object.
The object.
Is the segment equal to this object.
Is the segment equal to the other segment.
The other segment.
Is the segment equal to the other segment.
The segments hash code.
The segments hash code.
The segment as a string.
The segment as a string.
Round the segments points.
number of digits to round to.
Does the point line on the segemnts.
Return the signed distance to the point.
Always positive.
The closest point on segment to point.
point
The closest point on segment to point.
point
closest point = A + t * (B - A)
The closest segment spanning two other segments.
the other segment
The closest segment spanning two other segments.
the other segment
closest point = A + s * (B - A)
other closest point = seg.A + t * (seg.B - seg.A)
A 3D segment.
The segments first (aka source) point.
The segments second (aka target) point.
Create a new segment.
The first point.
The second point.
Create a new segment.
The first points x value.
The first points y value.
The first points z value.
The second points x value.
The second points y value.
The second points z value.
The length of the segment.
The square length of the segment.
The segment flipped, a is now b, b is now a.
The bounding box of the segment.
Array acess to the segments points.
The index of the point to access (0-2)
The point at index i.
Is the segment equal to this object.
The object.
Is the segment equal to this object.
Is the segment equal to the other segment.
The other segment.
Is the segment equal to the other segment.
The segments hash code.
The segments hash code.
The segment as a string.
The segment as a string.
Round the segments points.
number of digits to round to.
Does the point line on the segemnts.
Return the signed distance to the point.
Always positive.
The closest point on segment to point.
point
The closest point on segment to point.
point
closest point = A + t * (B - A)
The closest segment spanning two other segments.
the other segment
The closest segment spanning two other segments.
the other segment
closest point = A + s * (B - A)
other closest point = seg.A + t * (seg.B - seg.A)
A segment represented by indices instead of points.
The indices represent a index into a array of points.
The segments first point index.
The segments seconds point index.
Consturct a new segment.
The segments first point index.
The segments second point index.
Does the segment have a null index.
The segment reverse where a is now b and b is now a.
Is the segment equal to this object.
The object.
Is the segment equal to this object.
Is the segment equal to the other segment.
The other segment.
Is the segment equal to the other segment.
The segments hash code.
The segments hash code.
The segment as a string.
The segment as a string.
A 3D sphere.
The shperes center point.
The spheres radius.
Construct a new sphere.
The shperes center point.
The spheres radius.
The squared radius.
The spheres diameter.
The spheres area.
The spheres surface area.
Calculate the bounding box.
Is this sphere equal to the other object.
The other object.
Is this sphere equal to the other object.
Is this sphere equal to the other sphere.
The other sphere.
Is this sphere equal to the other sphere.
The spheres hashcode.
The spheres hashcode.
Enlarge the sphere so it contains the point p.
Round the spheres components.
The number of digits to round to.
Find the closest point to the sphere.
If point inside sphere return point.
Return the signed distance to the point.
If point is outside sphere field is positive.
If point is inside spher field is negative.
Does the sphere contain the point.
The point
Does the border count as being in side the sphere.
true if sphere contains point
Does the sphere fully contain the box.
The box.
Does the border count as being in side the sphere.
oes the sphere fully contain the box.
Does this sphere intersect with the other sphere.
The other sphere
Does the border count as being in side the sphere.
True if the spheres intersect
Does the sphere intersect the box.
Does the border count as being in side the sphere.
Does the sphere intersect the box.
Creates a sphere that has both points on its surface.
Creates a sphere that has all 4 points on its surface.
From MathWorld: http://mathworld.wolfram.com/Circumsphere.html.
Fails if the points are colinear.
Creates a sphere that contains all three points.
Calculate the minimum bounding sphere that contains
all the points in the list.
Finds which axis contains the two most extreme points
A 3D sphere.
The shperes center point.
The spheres radius.
Construct a new sphere.
The shperes center point.
The spheres radius.
The squared radius.
The spheres diameter.
The spheres area.
The spheres surface area.
Calculate the bounding box.
Is this sphere equal to the other object.
The other object.
Is this sphere equal to the other object.
Is this sphere equal to the other sphere.
The other sphere.
Is this sphere equal to the other sphere.
The spheres hashcode.
The spheres hashcode.
Enlarge the sphere so it contains the point p.
Round the spheres components.
The number of digits to round to.
Find the closest point to the sphere.
If point inside sphere return point.
Return the signed distance to the point.
If point is outside sphere field is positive.
If point is inside spher field is negative.
Does the sphere contain the point.
The point
Does the border count as being in side the sphere.
true if sphere contains point
Does the sphere fully contain the box.
The box.
Does the border count as being in side the sphere.
oes the sphere fully contain the box.
Does this sphere intersect with the other sphere.
The other sphere
Does the border count as being in side the sphere.
True if the spheres intersect
Does the sphere intersect the box.
Does the border count as being in side the sphere.
Does the sphere intersect the box.
Creates a sphere that has both points on its surface.
Creates a sphere that has all 4 points on its surface.
From MathWorld: http://mathworld.wolfram.com/Circumsphere.html.
Fails if the points are colinear.
Creates a sphere that contains all three points.
Calculate the minimum bounding sphere that contains
all the points in the list.
Finds which axis contains the two most extreme points
A 3D tetrahedron.
The tetrahedrons first point.
The tetrahedrons second point.
The tetrahedrons third point.
The tetrahedrons fourth point.
Create a new tetrahedron.
The first point.
The second point.
The third point.
The fourth point.
The bounding box of the tetrahedron.
Array acess to the tetrahedrons points.
The index of the point to access (0-3)
The point at index i.
Is the tetrahedron equal to this object.
The object.
Is the tetrahedron equal to this object.
Is the tetrahedron equal to the other tetrahedron.
The other tetrahedron.
Is the tetrahedron equal to the other tetrahedron.
The tetrahedrons hash code.
The tetrahedrons hash code.
The tetrahedron as a string.
The tetrahedron as a string.
Round the tetrahedrons points.
number of digits to round to.
A 3D tetrahedron.
The tetrahedrons first point.
The tetrahedrons second point.
The tetrahedrons third point.
The tetrahedrons fourth point.
Create a new tetrahedron.
The first point.
The second point.
The third point.
The fourth point.
The bounding box of the tetrahedron.
Array acess to the tetrahedrons points.
The index of the point to access (0-3)
The point at index i.
Is the tetrahedron equal to this object.
The object.
Is the tetrahedron equal to this object.
Is the tetrahedron equal to the other tetrahedron.
The other tetrahedron.
Is the tetrahedron equal to the other tetrahedron.
The tetrahedrons hash code.
The tetrahedrons hash code.
The tetrahedron as a string.
The tetrahedron as a string.
Round the tetrahedrons points.
number of digits to round to.
A 2D triangle.
The triangles first point.
The triangles second point.
The triangles third point.
Construct a new triangle.
The triangles first point.
The triangles second point.
The triangles third point.
Construct a new triangle.
The triangles first points x value.
The triangles first points y value.
The triangles second points x value.
The triangles second points y value.
The triangles third points x value.
The triangles third points y value.
The average of the triangles positions.
Is the triangle orientated ccw.
The triangles area.
The triangles signed area.
The side lengths are given as
a = sqrt((cx - bx)^2 + (cy - by)^2) -- side BC opposite of A
b = sqrt((cx - ax)^2 + (cy - ay)^2) -- side CA opposite of B
c = sqrt((ax - bx)^2 + (ay - by)^2) -- side AB opposite of C
The side lengths are given as
ang_a = acos((b^2 + c^2 - a^2) / (2 * b * c)) -- angle at A
ang_b = acos((c^2 + a^2 - b^2) / (2 * c * a)) -- angle at B
ang_c = acos((a^2 + b^2 - c^2) / (2 * a * b)) -- angle at C
The semiperimeter is given as
s = (a + b + c) / 2
The inradius is given as
r = D / s
This is the radius of the largest circle that can
fit within the triangle. Not the same as the
circum circles radius.
The circumradius is given as
R = a * b * c / (4 * D)
The circum circle formed by the
triangles points.
The altitudes are given as
alt_a = 2 * D / a -- altitude above side a
alt_b = 2 * D / b -- altitude above side b
alt_c = 2 * D / c -- altitude above side c
The aspect ratio may be given as the ratio of the longest to the
shortest edge or, more commonly as the ratio of the circumradius
to twice the inradius
ar = R / (2 * r)
= a * b * c / (8 * (s - a) * (s - b) * (s - c))
= a * b * c / ((b + c - a) * (c + a - b) * (a + b - c))
Is the triangle equal to the other object.
The other object.
Is the triangle equal to the other object.
Is the triangle equal to the other riangle.
The other riangle.
Is the triangle equal to the other riangle.
The triangles hashcode.
The triangles hashcode.
Round the triangles components.
The digits to round to.
The cross product area which is the
same as double the signed area.
Return th barycentric coordinates
with respect to p.
Find the closest point to the triangle.
If point inside triangle return point.
Returns the signed distance to surface of triangle.
positive if outside triangle, negative if inside and 0 on boundary
Does triangle contain point.
point
true if triangle contains point
Does triangle contain point.
Asumes triangle is CCW;
point
true if triangle contains point
Does the triangle intersect this box.
A 2D triangle.
The triangles first point.
The triangles second point.
The triangles third point.
Construct a new triangle.
The triangles first point.
The triangles second point.
The triangles third point.
Construct a new triangle.
The triangles first points x value.
The triangles first points y value.
The triangles second points x value.
The triangles second points y value.
The triangles third points x value.
The triangles third points y value.
The average of the triangles positions.
Is the triangle orientated ccw.
The triangles area.
The triangles signed area.
The side lengths are given as
a = sqrt((cx - bx)^2 + (cy - by)^2) -- side BC opposite of A
b = sqrt((cx - ax)^2 + (cy - ay)^2) -- side CA opposite of B
c = sqrt((ax - bx)^2 + (ay - by)^2) -- side AB opposite of C
The side lengths are given as
ang_a = acos((b^2 + c^2 - a^2) / (2 * b * c)) -- angle at A
ang_b = acos((c^2 + a^2 - b^2) / (2 * c * a)) -- angle at B
ang_c = acos((a^2 + b^2 - c^2) / (2 * a * b)) -- angle at C
The semiperimeter is given as
s = (a + b + c) / 2
The inradius is given as
r = D / s
This is the radius of the largest circle that can
fit within the triangle. Not the same as the
circum circles radius.
The circumradius is given as
R = a * b * c / (4 * D)
The circum circle formed by the
triangles points.
The altitudes are given as
alt_a = 2 * D / a -- altitude above side a
alt_b = 2 * D / b -- altitude above side b
alt_c = 2 * D / c -- altitude above side c
The aspect ratio may be given as the ratio of the longest to the
shortest edge or, more commonly as the ratio of the circumradius
to twice the inradius
ar = R / (2 * r)
= a * b * c / (8 * (s - a) * (s - b) * (s - c))
= a * b * c / ((b + c - a) * (c + a - b) * (a + b - c))
Is the triangle equal to the other object.
The other object.
Is the triangle equal to the other object.
Is the triangle equal to the other riangle.
The other riangle.
Is the triangle equal to the other riangle.
The triangles hashcode.
The triangles hashcode.
Round the triangles components.
The digits to round to.
The cross product area which is the
same as double the signed area.
Return th barycentric coordinates
with respect to p.
Find the closest point to the triangle.
If point inside triangle return point.
Returns the signed distance to surface of triangle.
positive if outside triangle, negative if inside and 0 on boundary
Does triangle contain point.
point
true if triangle contains point
Does triangle contain point.
Asumes triangle is CCW;
point
true if triangle contains point
Does the triangle intersect this box.
A 3D triangle.
The triangles first point.
The triangles second point.
The triangles third point.
Create a new triangle.
The first point.
The second point.
The third point.
Create a new triangle.
The first points x value.
The first points y value.
The first points z value.
The second points x value.
The second points y value.
The second points z value.
The third points x value.
The third points y value.
The third points z value.
The bounding box of the triangle.
Array acess to the triangles points.
The index of the point to access (0-2)
The point at index i.
Is the triangle equal to this object.
The object.
Is the triangle equal to this object.
Is the triangle equal to the other triangle.
The other triangle.
Is the triangle equal to the other triangle.
The triangles hash code.
The triangles hash code.
The triangle as a string.
The triangle as a string.
Round the triangles points.
number of digits to round to.
A 3D triangle.
The triangles first point.
The triangles second point.
The triangles third point.
Create a new triangle.
The first point.
The second point.
The third point.
Create a new triangle.
The first points x value.
The first points y value.
The first points z value.
The second points x value.
The second points y value.
The second points z value.
The third points x value.
The third points y value.
The third points z value.
The bounding box of the triangle.
Array acess to the triangles points.
The index of the point to access (0-2)
The point at index i.
Is the triangle equal to this object.
The object.
Is the triangle equal to this object.
Is the triangle equal to the other triangle.
The other triangle.
Is the triangle equal to the other triangle.
The triangles hash code.
The triangles hash code.
The triangle as a string.
The triangle as a string.
Round the triangles points.
number of digits to round to.
A triangle represented by indices instead of points.
The indices represent a index into a array of points.
The triangles first point index.
The triangles second point index.
The triangles third point index.
Consturct a new triangle.
The triangles first point index.
The triangles second point index.
The triangles third point index.
Does the triangle have a null index.
The triangle reversed.
Is the triangle equal to this object.
The object.
Is the triangle equal to this object.
Is the triangle equal to the other triangle.
The other triangle.
Is the triangle equal to the other triangle.
The triangles hash code.
The triangles hash code.
The triangle as a string.
The triangle as a string.
================================================
FILE: CGALDotNet/Arrangements/ArrFace2.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using CGALDotNetGeometry.Numerics;
namespace CGALDotNet.Arrangements
{
public struct ArrFace2
{
public bool IsFictitious;
public bool IsUnbounded;
public bool HasOuterEdges;
public int HoleCount;
public int Index;
public int HalfEdgeIndex;
public override string ToString()
{
return string.Format("[ArrFace2: Index={0}, HalfEdgeIndex={1}, IsFictitious={2}, IsUnbounded={3}, HasOuterEdges={4}, HoleCount={5}]",
Index, HalfEdgeIndex, IsFictitious, IsUnbounded, HasOuterEdges, HoleCount);
}
public IEnumerable EnumerateEdges(Arrangement2 arr)
{
int count = arr.HalfEdgeCount;
if (HalfEdgeIndex >= 0 && HalfEdgeIndex < count)
{
ArrHalfedge2 edge;
arr.GetHalfEdge(HalfEdgeIndex, out edge);
foreach (var e in edge.EnumerateEdges(arr))
yield return e;
}
else
{
yield break;
}
}
public IEnumerable EnumerateVertices(Arrangement2 arr)
{
int count = arr.HalfEdgeCount;
if (HalfEdgeIndex >= 0 && HalfEdgeIndex < count)
{
ArrHalfedge2 edge;
arr.GetHalfEdge(HalfEdgeIndex, out edge);
foreach (var e in edge.EnumerateVertices(arr))
yield return e;
}
else
{
yield break;
}
}
}
}
================================================
FILE: CGALDotNet/Arrangements/ArrHalfEdge2.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Arrangements
{
public struct ArrHalfedge2
{
public bool IsFictitious;
public int Index;
public int SourceIndex;
public int TargetIndex;
public int FaceIndex;
public int NextIndex;
public int PreviousIndex;
public int TwinIndex;
public override string ToString()
{
return string.Format("[ArrHalfEdge2: Index={0}, FaceIndex={1}, IsFictitious={2}]",
Index, FaceIndex, IsFictitious);
}
public Segment2d GetSegment(ArrVertex2[] vertices)
{
if (SourceIndex == CGALGlobal.NULL_INDEX)
throw new ArgumentException("Source index is null");
if (TargetIndex == CGALGlobal.NULL_INDEX)
throw new ArgumentException("Target index is null");
var a = vertices[SourceIndex].Point;
var b = vertices[TargetIndex].Point;
return new Segment2d(a, b);
}
public IEnumerable EnumerateEdges(Arrangement2 arr)
{
var start = this;
var e = start;
int count = arr.HalfEdgeCount;
do
{
yield return e;
if (e.NextIndex >= 0 && e.NextIndex < count)
arr.GetHalfEdge(e.NextIndex, out e);
else
yield break;
}
while (e.Index != start.Index);
}
public IEnumerable EnumerateVertices(Arrangement2 arr)
{
var start = this;
var e = start;
int vertCount = arr.VertexCount;
int edgeCount = arr.HalfEdgeCount;
do
{
if (e.SourceIndex >= 0 && e.SourceIndex < vertCount)
{
ArrVertex2 vert;
arr.GetVertex(e.SourceIndex, out vert);
yield return vert;
}
if (e.NextIndex >= 0 && e.NextIndex < edgeCount)
arr.GetHalfEdge(e.NextIndex, out e);
else
yield break;
}
while (e.Index != start.Index);
}
}
}
================================================
FILE: CGALDotNet/Arrangements/ArrQuery.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
namespace CGALDotNet.Arrangements
{
public enum ARR_LOCATOR
{
NONE,
NAIVE,
WALK,
LANDMARKS,
TRAPEZOID
};
public enum ARR_ELEMENT_HIT
{
NONE,
VERTEX,
HALF_EDGE,
FACE
};
public struct ArrQuery
{
public ARR_ELEMENT_HIT Element;
public int Index;
public override string ToString()
{
return string.Format("[ArrQuery: Element={0}, Index={1}]", Element, Index);
}
}
}
================================================
FILE: CGALDotNet/Arrangements/ArrVertex2.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Arrangements
{
public struct ArrVertex2
{
public Point2d Point;
public int Degree;
public bool IsIsolated;
public int Index;
public int FaceIndex;
public int HalfEdgeIndex;
public override string ToString()
{
return string.Format("[ArrVertex2: Point={0}, Index={1}, FaceIndex={2}, Degree={3}, IsIsolated={4}]",
Point, Index, FaceIndex, Degree, IsIsolated);
}
public IEnumerable EnumerateHalfedges(Arrangement2 arr)
{
ArrHalfedge2 start;
arr.GetHalfEdge(HalfEdgeIndex, out start);
ArrHalfedge2 e = start;
int count = arr.HalfEdgeCount;
do
{
yield return e;
ArrHalfedge2 twin, next;
if (e.TwinIndex >= 0 && e.TwinIndex < count)
arr.GetHalfEdge(e.TwinIndex, out twin);
else
yield break;
if (e.NextIndex >= 0 && e.NextIndex < count)
arr.GetHalfEdge(twin.NextIndex, out next);
else
yield break;
e = next;
}
while (e.Index != start.Index);
}
}
}
================================================
FILE: CGALDotNet/Arrangements/Arrangement2.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
using CGALDotNet.Polygons;
using CGALDotNet.Triangulations;
using CGALDotNet.Meshing;
namespace CGALDotNet.Arrangements
{
///
/// The generic arrangment class.
///
/// The kernel type.
public sealed class Arrangement2 : Arrangement2 where K : CGALKernel, new()
{
///
/// The default constructor.
///
public Arrangement2() : base(new K())
{
}
///
/// Create a arrangement from a unmanaged ptr.
///
/// The unmanaged pointer.
internal Arrangement2(IntPtr ptr) : base(new K(), ptr)
{
}
///
/// The arrangement as a string.
///
///
public override string ToString()
{
return string.Format("[Arrangement2<{0}>: Vertices={1}, HalfEdges={2}, Faces={3}, Locator={4}]",
Kernel.Name, VertexCount, HalfEdgeCount, FaceCount, Locator);
}
///
/// Assigns the contents of another arrangement.
///
/// The other arrangement.
public void Assign(Arrangement2 other)
{
Kernel.Assign(Ptr, other.Ptr);
}
///
/// Computes the overlay of two arrangements and return as a new arrangement.
///
/// The other arrangement.
/// The overlay of both arrangements.
public Arrangement2 Overlay(Arrangement2 other)
{
var ptr = Kernel.Overlay(Ptr, other.Ptr);
return new Arrangement2(ptr);
}
///
/// Create a deep copy of this arrangment.
///
/// The deep copy.
public Arrangement2 Copy()
{
var copy = new Arrangement2();
Kernel.Assign(copy.Ptr, Ptr);
return copy;
}
///
/// Insert the polygon into this arrangement.
///
/// The polygon.
/// If the polygon intersects anything else in the arramgement.
public void InsertPolygon(Polygon2 polygon, bool nonIntersecting)
{
Kernel.InsertPolygon(Ptr, polygon.Ptr, nonIntersecting);
}
///
/// Insert the polygon into this arrangement.
///
/// The polygon.
/// If the polygon intersects anything else in the arramgement.
public void InsertPolygon(PolygonWithHoles2 polygon, bool nonIntersecting)
{
Kernel.InsertPolygon(Ptr, polygon.Ptr, nonIntersecting);
}
}
///
/// The abstract base class.
///
public abstract class Arrangement2 : CGALObject
{
///
/// The default constructor.
///
private Arrangement2()
{
CreateLocator(ARR_LOCATOR.WALK);
}
///
/// Create a arrangement from the kernel.
///
/// The kernel.
internal Arrangement2(CGALKernel kernel)
{
Kernel = kernel.ArrangementKernel2;
Ptr = Kernel.Create();
CreateLocator(ARR_LOCATOR.WALK);
}
///
/// Create a arrangement from the kernel and unmanaged pointer.
///
/// The kernel.
/// The unmanaged pointer.
internal Arrangement2(CGALKernel kernel, IntPtr ptr) : base(ptr)
{
Kernel = kernel.ArrangementKernel2;
CreateLocator(ARR_LOCATOR.WALK);
}
///
/// The arrangements kernel.
///
protected private ArrangementKernel2 Kernel { get; private set; }
///
/// The number of vertices in the arrangement.
///
public int VertexCount => Kernel.VertexCount(Ptr);
///
/// The number of vertices in the arrangement that are i
///
public int IsolatedVerticesCount => Kernel.IsolatedVerticesCount(Ptr);
///
/// returns the number of arrangement vertices that lie at infinity a
/// nd are not associated with valid points.
/// Such vertices are not considered to be regular arrangement
/// vertices and VertexCount does not count them.
///
public int VerticesAtInfinityCount => Kernel.VerticesAtInfinityCount(Ptr);
///
/// The number of half edges.
///
public int HalfEdgeCount => Kernel.HalfEdgeCount(Ptr);
///
/// The number of edges. two half edges count as one edge.
///
public int EdgeCount => Kernel.EdgeCount(Ptr);
///
/// The number of faces in the arrangement not counting
/// the unbounded face.
///
public int FaceCount => Kernel.FaceCount(Ptr) - UnboundedFaceCount;
///
/// returns the number of unbounded faces in the arrangement.
/// Such faces are not considered to be regular arrangement
/// faces and FaceCount does not count them.
///
public int UnboundedFaceCount => Kernel.UnboundedFaceCount(Ptr);
///
/// The type of locator used to find element
/// in the arrangement when queried.
/// Default is walk which is the best in most cases
///
public ARR_LOCATOR Locator { get; private set; }
///
/// Is the arrangement empty.
///
public bool IsEmpty => Kernel.IsEmpty(Ptr);
///
/// A number that will change if the unmanaged
/// arrangement model changes.
///
public int BuildStamp => Kernel.BuildStamp(Ptr);
///
/// Clear the arrangement.
///
public void Clear()
{
Kernel.Clear(Ptr);
}
///
/// In particular, the functions checks the topological structure of the arrangement
/// and assures that it is valid. In addition, the function performs several simple
/// geometric tests to ensure the validity of some of the geometric properties of
/// the arrangement. Namely, it checks that all arrangement vertices are associated
/// with distinct points, and that the halfedges around every vertex are ordered clockwise.
///
///
public bool IsValid()
{
return Kernel.IsValid(Ptr);
}
///
/// Get a copy of all the points in the arrangement.
///
/// A point array that is the length of the vertex count.
/// The ararys length.
public void GetPoints(Point2d[] points, int count)
{
ErrorUtil.CheckArray(points, count);
Kernel.GetPoints(Ptr, points, count);
}
///
/// Get a copy of all the segments in the arrangment.
///
/// A segment array that is the length of the edge count.
/// The ararys length.
public void GetSegments(Segment2d[] segments, int count)
{
ErrorUtil.CheckArray(segments, count);
Kernel.GetSegments(Ptr, segments, count);
}
///
/// Get a copy of all the vertices in the arrangement.
///
/// A vertices array that is the length of the vertex count.
/// The ararys length.
public void GetVertices(ArrVertex2[] vertices, int count)
{
ErrorUtil.CheckArray(vertices, count);
Kernel.GetVertices(Ptr, vertices, count);
}
///
/// Get the vertex from the arrangement.
///
/// The index of the vertex.
/// The vertex.
/// True if the vertex was found.
public bool GetVertex(int index, out ArrVertex2 vertex)
{
return Kernel.GetVertex(Ptr, index, out vertex);
}
///
/// Get a copy of all the half edges in the arrangement.
///
/// A half edge array that is the length of the half edge count.
/// The ararys length.
public void GetHalfEdges(ArrHalfedge2[] edges, int count)
{
ErrorUtil.CheckArray(edges, count);
Kernel.GetHalfEdges(Ptr, edges, count);
}
///
/// Get the half edge from the arrangement.
///
/// The index of the half edge.
/// The half edge.
/// True if the half edge was found.
public bool GetHalfEdge(int index, out ArrHalfedge2 edge)
{
return Kernel.GetHalfEdge(Ptr, index, out edge);
}
///
/// Get a copy of all the faces in the arrangement.
///
/// A face array that is the length of the facee count.
/// The ararys length.
public void GetFaces(ArrFace2[] faces, int count)
{
ErrorUtil.CheckArray(faces, count);
Kernel.GetFaces(Ptr, faces, count);
}
///
/// Get the face from the arrangement.
///
/// The index of the half edge.
/// The face.
/// True if the face was found.
public bool GetFace(int index, out ArrFace2 face)
{
return Kernel.GetFace(Ptr, index, out face);
}
///
/// Create the locator used to find query the arrangement.
///
/// The locator type.
public void CreateLocator(ARR_LOCATOR locator)
{
if (Locator == locator)
return;
Locator = locator;
Kernel.CreateLocator(Ptr, locator);
}
///
/// Release the locator. Default will be used..
/// Default is walk which is the best in most cases.
///
public void ReleaseLocator()
{
if (Locator == ARR_LOCATOR.NONE)
return;
Locator = ARR_LOCATOR.NONE;
Kernel.ReleaseLocator(Ptr);
}
///
/// Query what the point hits in the arrangment.
///
/// The point to query.
/// What was hit.
/// True if something was hit.
public bool PointQuery(Point2d point, out ArrQuery result)
{
return Kernel.PointQuery(Ptr, point, out result);
}
///
/// Query multiple points in the arrangment.
///
/// The points to query.
/// The results for each point.
/// True if any point hit something.
public bool BatchedPointQuery(Point2d[] points, ArrQuery[] results)
{
ErrorUtil.CheckArray(points, points.Length);
ErrorUtil.CheckArray(results, results.Length);
return Kernel.BatchedPointQuery(Ptr, points, results, points.Length);
}
///
/// Query using a ray going up or down (y axis) from the query point.
///
/// The point to start at.
/// True to shoot ray up, false to shoot down.
/// The result of what was hits.
/// True if some thing was hit.
public bool VerticalRayQuery(Point2d point, bool up, out ArrQuery result)
{
return Kernel.RayQuery(Ptr, point, up, out result);
}
///
/// Locate the vertex at this point.
///
/// The point to locate vertex at.
/// The vertex.
/// True if a vertex was located.
public bool LocateVertex(Point2d point, out ArrVertex2 vert)
{
vert = new ArrVertex2();
if (Kernel.PointQuery(Ptr, point, out ArrQuery result))
{
if (result.Element == ARR_ELEMENT_HIT.VERTEX)
{
Kernel.GetVertex(Ptr, result.Index, out vert);
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}
///
/// Locate the closest vertex in the hit face
///
/// The point
/// The radius te closest vertex has to be within.
/// The closest vertex.
/// True if point hit a face and found a vertex.
public bool LocateVertex(Point2d point, double radius, out ArrVertex2 vertex)
{
//Locate the face the point hit.
vertex = new ArrVertex2();
if (LocateFace(point, out ArrFace2 face))
{
//Find the closest vertex in the face to the point.
double min = double.PositiveInfinity;
var closest = new ArrVertex2();
foreach (var vert in face.EnumerateVertices(this))
{
if (vert.Index == -1) continue;
var sqdist = Point2d.SqrDistance(vert.Point, point);
if (sqdist < min)
{
min = sqdist;
closest = vert;
}
}
if (min == double.PositiveInfinity || min > radius * radius)
return false;
else
{
vertex = closest;
return true;
}
}
return false;
}
///
/// Locate the edge at this point.
///
/// The point to locate edge at.
/// The edge.
/// True if a edge was located.
public bool LocateEdge(Point2d point, out ArrHalfedge2 edge)
{
edge = new ArrHalfedge2();
if (Kernel.PointQuery(Ptr, point, out ArrQuery result))
{
if (result.Element == ARR_ELEMENT_HIT.HALF_EDGE)
{
Kernel.GetHalfEdge(Ptr, result.Index, out edge);
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}
///
/// Locate the closest edge in the hit face.
///
/// The point
/// The closest edge.
/// The radius from the point a edge counts as being clicked on.
/// True if the point hit a face and found a edge.
public bool LocateEdge(Point2d point, double radius, out ArrHalfedge2 edge)
{
//Locate the face the point hit.
edge = new ArrHalfedge2();
if (LocateFace(point, out ArrFace2 face))
{
//Find the closest edge to the point in the face.
double min = double.PositiveInfinity;
var closest = new ArrHalfedge2();
foreach (var e in face.EnumerateEdges(this))
{
ArrVertex2 v1, v2;
if (!GetVertex(e.SourceIndex, out v1)) continue;
if (!GetVertex(e.TargetIndex, out v2)) continue;
var seg = new Segment2d(v1.Point, v2.Point);
var sqdist = seg.SqrDistance(point);
if (sqdist < min)
{
min = sqdist;
closest = e;
}
}
if (min == double.PositiveInfinity || min > radius * radius)
return false;
else
{
edge = closest;
return true;
}
}
return false;
}
///
/// Locate the faces at this point.
///
/// The point to locate face at.
/// The face.
/// True if a face was located.
public bool LocateFace(Point2d point, out ArrFace2 face)
{
face = new ArrFace2();
if(Kernel.PointQuery(Ptr, point, out ArrQuery result))
{
if(result.Element == ARR_ELEMENT_HIT.FACE)
{
Kernel.GetFace(Ptr, result.Index, out face);
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}
///
/// Find if the arrangement has a element that intersects the segment.
///
/// The segment.
/// True if the segment intersects something in the arrangement.
public bool IntersectsSegment(Segment2d segment)
{
return Kernel.IntersectsSegment(Ptr, segment);
}
///
/// Inserts a given point into a given arrangement.
/// It uses a given point-location object to locate the given point in the given arrangement.
/// If the point conincides with an existing vertex, there is nothing left to do. if it lies
/// on an edge, the edge is split at the point. Otherwise, the point is contained inside a face,
/// and is inserted as an isolated vertex inside this face.
///
/// The point to insert.
public void InsertPoint(Point2d point)
{
Kernel.InsertPoint(Ptr, point);
}
///
/// Insert the segment in to the arrangement.
///
/// The segments start point.
/// The segments end point.
/// True if the segment is know not to
/// hit anything currently in the arrangement.
public void InsertSegment(Point2d a, Point2d b, bool nonIntersecting)
{
Kernel.InsertSegment(Ptr, new Segment2d(a, b), nonIntersecting);
}
///
/// Insert a segment into the arrangement.
///
///
/// True if the segment is know not to
/// hit anything currently in the arrangement.
public void InsertSegment(Segment2d segment, bool nonIntersecting)
{
Kernel.InsertSegment(Ptr, segment, nonIntersecting);
}
///
/// Insert a array of segments into the arrangement.
///
/// The segment array
/// The segment arrays length.
/// True if the segments are known not to
/// hit anything currently in the arrangement.
public void InsertSegments(Segment2d[] segments, int count, bool nonIntersecting)
{
ErrorUtil.CheckArray(segments, count);
Kernel.InsertSegments(Ptr, segments, count, nonIntersecting);
}
///
/// Attempts to removed a given vertex from a given arrangement.
/// The vertex can be removed if it is either an isolated vertex,
/// (and has no incident edge,) or if it is a redundant vertex.That is,
/// it has exactly two incident edges, whose associated curves can be
/// merged to form a single x-monotone curve.The function returns a
/// boolean value that indicates whether it succeeded removing the
/// vertex from the arrangement.
///
/// The index of the vertex in the arrangement.
/// True if the vertex was removed.
public bool RemoveVertex(int index)
{
return Kernel.RemoveVertexByIndex(Ptr, index);
}
///
/// Attempts to removed a given vertex from a given arrangement.
/// The vertex can be removed if it is either an isolated vertex,
/// (and has no incident edge,) or if it is a redundant vertex.That is,
/// it has exactly two incident edges, whose associated curves can be
/// merged to form a single x-monotone curve.The function returns a
/// boolean value that indicates whether it succeeded removing the
/// vertex from the arrangement.
///
/// The poisition of the vertex in the arrangement.
/// True if the vertex was removed.
public bool RemoveVertex(Point2d point)
{
return Kernel.RemoveVertexByPoint(Ptr, point);
}
///
/// Removes an edge at the index from the arrangement.
/// Once the edge is removed, if the vertices associated with its endpoints
/// become isolated, they are removed as well.
///
/// The index of the one of the half edges in the arrangement.
/// True if the edge was removed.
public bool RemoveEdge(int index)
{
return Kernel.RemoveEdgeByIndex(Ptr, index);
}
///
/// Removes an edge at the index from the arrangement.
/// Once the edge is removed, if the vertices associated with its endpoints
/// become isolated, they are removed as well.
///
/// A segment with the same positions as the edge in the arrangement.
/// True if the edge was removed.
public bool RemoveEdge(Segment2d segment)
{
return Kernel.RemoveEdgeBySegment(Ptr, segment);
}
///
///
///
///
///
public void Print(StringBuilder builder, bool printElements)
{
builder.AppendLine(ToString());
builder.AppendLine("Isolated Vertex Count = " + IsolatedVerticesCount);
builder.AppendLine("Vertex at Infinity Count = " + VerticesAtInfinityCount);
builder.AppendLine("Edge Count = " + EdgeCount);
builder.AppendLine("Unbounded Face Count = " + UnboundedFaceCount);
if (printElements)
{
builder.AppendLine();
PrintVertices(builder);
PrintHalfEdges(builder);
PrintFaces(builder);
}
}
///
///
///
///
public override void Print(StringBuilder builder)
{
builder.AppendLine(ToString());
builder.AppendLine("Isolated Vertex Count = " + IsolatedVerticesCount);
builder.AppendLine("Vertex at Infinity Count = " + VerticesAtInfinityCount);
builder.AppendLine("Edge Count = " + EdgeCount);
builder.AppendLine("Unbounded Face Count = " + UnboundedFaceCount);
}
///
///
///
///
public void PrintVertices(StringBuilder builder)
{
builder.AppendLine("Arrangement Vertices.\n");
var vertices = new ArrVertex2[VertexCount];
GetVertices(vertices, vertices.Length);
foreach (var v in vertices)
{
builder.AppendLine(v.ToString());
builder.AppendLine("Index = " + v.Index);
builder.AppendLine("Face Index = " + v.FaceIndex);
builder.AppendLine("HalfEdge Index = " + v.HalfEdgeIndex);
builder.AppendLine();
}
}
///
///
///
///
public void PrintHalfEdges(StringBuilder builder)
{
builder.AppendLine("Arrangement Half Edges.\n");
var edges = new ArrHalfedge2[HalfEdgeCount];
GetHalfEdges(edges, edges.Length);
foreach (var e in edges)
{
builder.AppendLine(e.ToString());
builder.AppendLine("Index = " + e.Index);
builder.AppendLine("Source Index = " + e.SourceIndex);
builder.AppendLine("Target Index = " + e.TargetIndex);
builder.AppendLine("Face Index = " + e.FaceIndex);
builder.AppendLine("Next Index = " + e.NextIndex);
builder.AppendLine("Previous Index = " + e.PreviousIndex);
builder.AppendLine("Twin Index = " + e.TwinIndex);
builder.AppendLine();
}
}
///
///
///
///
public void PrintFaces(StringBuilder builder)
{
builder.AppendLine("Arrangement Faces.\n");
var faces = new ArrFace2[FaceCount];
GetFaces(faces, faces.Length);
foreach (var e in faces)
{
builder.AppendLine(e.ToString());
builder.AppendLine("Index = " + e.Index);
builder.AppendLine("HalfEdge Index = " + e.HalfEdgeIndex);
builder.AppendLine();
}
}
///
/// Release any unmanaged resources.
///
protected override void ReleasePtr()
{
Kernel.Release(Ptr);
}
}
}
================================================
FILE: CGALDotNet/Arrangements/ArrangementKernel2.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Arrangements
{
internal abstract class ArrangementKernel2 : CGALObjectKernel
{
internal abstract IntPtr Create();
internal abstract void Release(IntPtr ptr);
internal abstract bool IsValid(IntPtr ptr);
internal abstract void Clear(IntPtr ptr);
internal abstract bool IsEmpty(IntPtr ptr);
internal abstract int BuildStamp(IntPtr ptr);
internal abstract void Assign(IntPtr ptr, IntPtr ptrOther);
internal abstract IntPtr Overlay(IntPtr ptr, IntPtr ptrOther);
internal abstract int VertexCount(IntPtr ptr);
internal abstract int IsolatedVerticesCount(IntPtr ptr);
internal abstract int VerticesAtInfinityCount(IntPtr ptr);
internal abstract int HalfEdgeCount(IntPtr ptr);
internal abstract int FaceCount(IntPtr ptr);
internal abstract int EdgeCount(IntPtr ptr);
internal abstract int UnboundedFaceCount(IntPtr ptr);
internal abstract void GetPoints(IntPtr ptr, Point2d[] points, int count);
internal abstract void GetSegments(IntPtr ptr, Segment2d[] segments, int count);
internal abstract void GetVertices(IntPtr ptr, ArrVertex2[] vertices, int count);
internal abstract bool GetVertex(IntPtr ptr, int index, out ArrVertex2 arrVertex);
internal abstract void GetHalfEdges(IntPtr ptr, ArrHalfedge2[] edges, int count);
internal abstract bool GetHalfEdge(IntPtr ptr, int index, out ArrHalfedge2 arrEdge);
internal abstract void GetFaces(IntPtr ptr, ArrFace2[] faces, int count);
internal abstract bool GetFace(IntPtr ptr, int index, out ArrFace2 arrFace);
internal abstract int GetFaceHoleCount(IntPtr ptr, int index);
internal abstract int GetHoleVertexCount(IntPtr ptr, int faceIndex, int holeIndex);
internal abstract void CreateLocator(IntPtr ptr, ARR_LOCATOR type);
internal abstract void ReleaseLocator(IntPtr ptr);
internal abstract bool PointQuery(IntPtr ptr, Point2d point, out ArrQuery result);
internal abstract bool BatchedPointQuery(IntPtr ptr, Point2d[] points, ArrQuery[] results, int count);
internal abstract bool RayQuery(IntPtr ptr, Point2d point, bool up, out ArrQuery result);
internal abstract bool IntersectsSegment(IntPtr ptr, Segment2d segment);
internal abstract void InsertPoint(IntPtr ptr, Point2d point);
internal abstract void InsertPolygon(IntPtr ptr, IntPtr polyPtr, bool nonItersecting);
internal abstract void InsertPolygonWithHoles(IntPtr ptr, IntPtr pwhPtr, bool nonItersecting);
internal abstract void InsertSegment(IntPtr ptr, Segment2d segment, bool nonItersecting);
internal abstract void InsertSegments(IntPtr ptr, Segment2d[] segments, int count, bool nonItersecting);
internal abstract bool RemoveVertexByIndex(IntPtr ptr, int index);
internal abstract bool RemoveVertexByPoint(IntPtr ptr, Point2d point);
internal abstract bool RemoveEdgeByIndex(IntPtr ptr, int index);
internal abstract bool RemoveEdgeBySegment(IntPtr ptr, Segment2d segment);
}
}
================================================
FILE: CGALDotNet/Arrangements/ArrangementKernel2_EEK.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Arrangements
{
internal class ArrangementKernel2_EEK : ArrangementKernel2
{
internal override string Name => "EEK";
internal static readonly ArrangementKernel2 Instance = new ArrangementKernel2_EEK();
internal override IntPtr Create()
{
return Arrangement2_EEK_Create();
}
internal override void Release(IntPtr ptr)
{
Arrangement2_EEK_Release(ptr);
}
internal override bool IsValid(IntPtr ptr)
{
return Arrangement2_EEK_IsValid(ptr);
}
internal override void Clear(IntPtr ptr)
{
Arrangement2_EEK_Clear(ptr);
}
internal override bool IsEmpty(IntPtr ptr)
{
return Arrangement2_EEK_IsEmpty(ptr);
}
internal override int BuildStamp(IntPtr ptr)
{
return Arrangement2_EEK_BuildStamp(ptr);
}
internal override void Assign(IntPtr ptr, IntPtr ptrOther)
{
Arrangement2_EEK_Assign(ptr, ptrOther);
}
internal override IntPtr Overlay(IntPtr ptr, IntPtr ptrOther)
{
return Arrangement2_EEK_Overlay(ptr, ptrOther);
}
internal override int VertexCount(IntPtr ptr)
{
return Arrangement2_EEK_VertexCount(ptr);
}
internal override int IsolatedVerticesCount(IntPtr ptr)
{
return Arrangement2_EEK_IsolatedVerticesCount(ptr);
}
internal override int VerticesAtInfinityCount(IntPtr ptr)
{
return Arrangement2_EEK_VerticesAtInfinityCount(ptr);
}
internal override int HalfEdgeCount(IntPtr ptr)
{
return Arrangement2_EEK_HalfEdgeCount(ptr);
}
internal override int FaceCount(IntPtr ptr)
{
return Arrangement2_EEK_FaceCount(ptr);
}
internal override int EdgeCount(IntPtr ptr)
{
return Arrangement2_EEK_EdgeCount(ptr);
}
internal override int UnboundedFaceCount(IntPtr ptr)
{
return Arrangement2_EEK_UnboundedFaceCount(ptr);
}
internal override void GetPoints(IntPtr ptr, Point2d[] points, int count)
{
Arrangement2_EEK_GetPoints(ptr, points, count);
}
internal override void GetSegments(IntPtr ptr, Segment2d[] segments, int count)
{
Arrangement2_EEK_GetSegments(ptr, segments, count);
}
internal override void GetVertices(IntPtr ptr, ArrVertex2[] vertices, int count)
{
Arrangement2_EEK_GetVertices(ptr, vertices, count);
}
internal override bool GetVertex(IntPtr ptr, int index, out ArrVertex2 arrVertex)
{
return Arrangement2_EEK_GetVertex(ptr, index, out arrVertex);
}
internal override void GetHalfEdges(IntPtr ptr, ArrHalfedge2[] edges, int count)
{
Arrangement2_EEK_GetHalfEdges(ptr, edges, count);
}
internal override bool GetHalfEdge(IntPtr ptr, int index, out ArrHalfedge2 arrEdge)
{
return Arrangement2_EEK_GetHalfEdge(ptr, index, out arrEdge);
}
internal override void GetFaces(IntPtr ptr, ArrFace2[] faces, int count)
{
Arrangement2_EEK_GetFaces(ptr, faces, count);
}
internal override bool GetFace(IntPtr ptr, int index, out ArrFace2 arrFace)
{
return Arrangement2_EEK_GetFace(ptr, index, out arrFace);
}
internal override int GetFaceHoleCount(IntPtr ptr, int index)
{
return Arrangement2_EEK_GetFaceHoleCount(ptr, index);
}
internal override int GetHoleVertexCount(IntPtr ptr, int faceIndex, int holeIndex)
{
return Arrangement2_EEK_GetHoleVertexCount(ptr, faceIndex, holeIndex);
}
internal override void CreateLocator(IntPtr ptr, ARR_LOCATOR type)
{
Arrangement2_EEK_CreateLocator(ptr, type);
}
internal override void ReleaseLocator(IntPtr ptr)
{
Arrangement2_EEK_ReleaseLocator(ptr);
}
internal override bool PointQuery(IntPtr ptr, Point2d point, out ArrQuery result)
{
return Arrangement2_EEK_PointQuery(ptr, point, out result);
}
internal override bool BatchedPointQuery(IntPtr ptr, Point2d[] points, ArrQuery[] results, int count)
{
return Arrangement2_EEK_BatchedPointQuery(ptr, points, results, count);
}
internal override bool RayQuery(IntPtr ptr, Point2d point, bool up, out ArrQuery result)
{
return Arrangement2_EEK_RayQuery(ptr, point, up, out result);
}
internal override bool IntersectsSegment(IntPtr ptr, Segment2d segment)
{
return Arrangement2_EEK_IntersectsSegment(ptr, segment);
}
internal override void InsertPoint(IntPtr ptr, Point2d point)
{
Arrangement2_EEK_InsertPoint(ptr, point);
}
internal override void InsertPolygon(IntPtr ptr, IntPtr polyPtr, bool nonItersecting)
{
Arrangement2_EEK_InsertPolygon(ptr, polyPtr, nonItersecting);
}
internal override void InsertPolygonWithHoles(IntPtr ptr, IntPtr pwhPtr, bool nonItersecting)
{
Arrangement2_EEK_InsertPolygonWithHoles(ptr, pwhPtr, nonItersecting);
}
internal override void InsertSegment(IntPtr ptr, Segment2d segment, bool nonItersecting)
{
Arrangement2_EEK_InsertSegment(ptr, segment, nonItersecting);
}
internal override void InsertSegments(IntPtr ptr, Segment2d[] segments, int count, bool nonItersecting)
{
Arrangement2_EEK_InsertSegments(ptr, segments, count, nonItersecting);
}
internal override bool RemoveVertexByIndex(IntPtr ptr, int index)
{
return Arrangement2_EEK_RemoveVertexByIndex(ptr, index);
}
internal override bool RemoveVertexByPoint(IntPtr ptr, Point2d point)
{
return Arrangement2_EEK_RemoveVertexByPoint(ptr, point);
}
internal override bool RemoveEdgeByIndex(IntPtr ptr, int index)
{
return Arrangement2_EEK_RemoveEdgeByIndex(ptr, index);
}
internal override bool RemoveEdgeBySegment(IntPtr ptr, Segment2d segment)
{
return Arrangement2_EEK_RemoveEdgeBySegment(ptr, segment);
}
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr Arrangement2_EEK_Create();
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_Release(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_IsValid(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_Clear(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_IsEmpty(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int Arrangement2_EEK_BuildStamp(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_Assign(IntPtr ptr, IntPtr ptrOther);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr Arrangement2_EEK_Overlay(IntPtr ptr, IntPtr ptrOther);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int Arrangement2_EEK_VertexCount(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int Arrangement2_EEK_IsolatedVerticesCount(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int Arrangement2_EEK_VerticesAtInfinityCount(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int Arrangement2_EEK_HalfEdgeCount(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int Arrangement2_EEK_FaceCount(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int Arrangement2_EEK_EdgeCount(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int Arrangement2_EEK_UnboundedFaceCount(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_GetPoints(IntPtr ptr, [Out] Point2d[] points, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_GetSegments(IntPtr ptr, [Out] Segment2d[] segments, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_GetVertices(IntPtr ptr, [Out] ArrVertex2[] vertices, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_GetVertex(IntPtr ptr, int index, [Out] out ArrVertex2 arrVertex);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_GetHalfEdges(IntPtr ptr, [Out] ArrHalfedge2[] edges, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_GetHalfEdge(IntPtr ptr, int index, [Out] out ArrHalfedge2 arrEdge);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_GetFaces(IntPtr ptr, [Out] ArrFace2[] faces, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_GetFace(IntPtr ptr, int index, [Out] out ArrFace2 arrFace);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int Arrangement2_EEK_GetFaceHoleCount(IntPtr ptr, int index);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int Arrangement2_EEK_GetHoleVertexCount(IntPtr ptr, int faceIndex, int holeIndex);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_CreateLocator(IntPtr ptr, ARR_LOCATOR type);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_ReleaseLocator(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_PointQuery(IntPtr ptr, Point2d point, [Out] out ArrQuery result);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_BatchedPointQuery(IntPtr ptr, [Out] Point2d[] points, [Out] ArrQuery[] results, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_RayQuery(IntPtr ptr, Point2d point, bool up, [Out] out ArrQuery result);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_IntersectsSegment(IntPtr ptr, Segment2d segment);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_InsertPoint(IntPtr ptr, Point2d point);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_InsertPolygon(IntPtr ptr, IntPtr polyPtr, bool nonItersecting);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_InsertPolygonWithHoles(IntPtr ptr, IntPtr pwhPtr, bool nonItersecting);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_InsertSegment(IntPtr ptr, Segment2d segment, bool nonItersecting);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void Arrangement2_EEK_InsertSegments(IntPtr ptr, [In] Segment2d[] points, int count, bool nonItersecting);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_RemoveVertexByIndex(IntPtr ptr, int index);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_RemoveVertexByPoint(IntPtr ptr, Point2d point);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_RemoveEdgeByIndex(IntPtr ptr, int index);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool Arrangement2_EEK_RemoveEdgeBySegment(IntPtr ptr, Segment2d segment);
}
}
================================================
FILE: CGALDotNet/Arrangements/SweepLine.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Arrangements
{
///
/// The generic sweep line class.
///
/// The kernel.
public sealed class SweepLine : SweepLine where K : CGALKernel, new()
{
///
/// A static instanceof a sweep line.
///
public static readonly SweepLine Instance = new SweepLine();
///
/// Default constructor.
///
public SweepLine() : base(new K())
{
}
///
/// Create from a unmanaged pointer.
///
///
internal SweepLine(IntPtr ptr) : base(new K(), ptr)
{
}
///
/// The sweep line as a string.
///
///
public override string ToString()
{
return string.Format("[SweepLine<{0}>: ]", Kernel.Name);
}
}
///
/// The abstract sweep line.
///
public abstract class SweepLine : CGALObject
{
///
/// The default sweep line.
///
private SweepLine()
{
}
///
/// Create from the kernel.
///
/// A kernel that implements a sweep line.
internal SweepLine(CGALKernel kernel)
{
Kernel = kernel.SweepLineKernel;
Ptr = Kernel.Create();
}
///
/// Create from the kernel and unmanaged pointer.
///
/// A kernel that implements a sweep line.
/// A unmanaged pointer to a sweep line.
internal SweepLine(CGALKernel kernel, IntPtr ptr) : base(ptr)
{
Kernel = kernel.SweepLineKernel;
}
///
/// The sweep line kernel.
///
protected private SweepLineKernel Kernel { get; private set; }
///
/// Do any of the segments in the array intersect.
///
/// The segment array.
/// The ararys length.
/// Do any of the segments in the array intersect.
public bool DoIntersect(Segment2d[] segments, int count)
{
ErrorUtil.CheckArray(segments, count);
return Kernel.DoIntersect(Ptr, segments, count);
}
///
/// Compute all the sub segemnts from the intersection
/// of the segments in the array.
///
/// The segment array.
/// The ararys length.
/// The sub segments.
public Segment2d[] ComputeSubcurves(Segment2d[] segments, int count)
{
ErrorUtil.CheckArray(segments, count);
int len = Kernel.ComputeSubcurves(Ptr, segments, count);
var subSegments = new Segment2d[len];
if (len > 0)
{
GetSegments(subSegments, len);
ClearSegmentBuffer();
}
return subSegments;
}
///
/// Compute all the intersection points from the
/// segments in the array.
///
/// The segment array.
/// The ararys length.
/// The intersection points.
public Point2d[] ComputeIntersectionPoints(Segment2d[] segments, int count)
{
ErrorUtil.CheckArray(segments, count);
int len = Kernel.ComputeIntersectionPoints(Ptr, segments, count);
var points = new Point2d[len];
if (len > 0)
{
GetPoints(points, len);
ClearPointBuffer();
}
return points;
}
///
/// Get all the points in the point buffer.
///
/// A point array the size of the point buffer.
/// The ararys length.
private void GetPoints(Point2d[] points, int count)
{
ErrorUtil.CheckArray(points, count);
Kernel.GetPoints(Ptr, points, count);
}
///
/// Get all the segments in the point buffer.
///
/// A segment array the size of the segment buffer.
/// The ararys length.
private void GetSegments(Segment2d[] segments, int count)
{
ErrorUtil.CheckArray(segments, count);
Kernel.GetSegments(Ptr, segments, count);
}
///
/// Clear the point buffer.
///
private void ClearPointBuffer()
{
Kernel.ClearPointBuffer(Ptr);
}
///
/// Clear the segment buffer.
///
private void ClearSegmentBuffer()
{
Kernel.ClearSegmentBuffer(Ptr);
}
///
///
///
///
private int PointBufferSize()
{
return Kernel.PointBufferSize(Ptr);
}
///
///
///
///
private int SegmentBufferSize()
{
return Kernel.SegmentBufferSize(Ptr);
}
///
/// Release any unmanaged resources.
///
protected override void ReleasePtr()
{
Kernel.Release(Ptr);
}
}
}
================================================
FILE: CGALDotNet/Arrangements/SweepLineKernel.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Arrangements
{
internal abstract class SweepLineKernel : CGALObjectKernel
{
internal abstract IntPtr Create();
internal abstract void Release(IntPtr ptr);
internal abstract void ClearPointBuffer(IntPtr ptr);
internal abstract void ClearSegmentBuffer(IntPtr ptr);
internal abstract int PointBufferSize(IntPtr ptr);
internal abstract int SegmentBufferSize(IntPtr ptr);
internal abstract bool DoIntersect(IntPtr ptr, Segment2d[] segments, int count);
internal abstract int ComputeSubcurves(IntPtr ptr, Segment2d[] segments, int count);
internal abstract int ComputeIntersectionPoints(IntPtr ptr, Segment2d[] segments, int count);
internal abstract void GetPoints(IntPtr ptr, Point2d[] points, int count);
internal abstract void GetSegments(IntPtr ptr, Segment2d[] segments, int count);
}
}
================================================
FILE: CGALDotNet/Arrangements/SweepLineKernel_EEK.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Arrangements
{
internal class SweepLineKernel_EEK : SweepLineKernel
{
internal override string Name => "EEK";
internal static readonly SweepLineKernel Instance = new SweepLineKernel_EEK();
internal override IntPtr Create()
{
return SweepLine2_EEK_Create();
}
internal override void Release(IntPtr ptr)
{
SweepLine2_EEK_Release(ptr);
}
internal override void ClearPointBuffer(IntPtr ptr)
{
SweepLine2_EEK_ClearPointBuffer(ptr);
}
internal override void ClearSegmentBuffer(IntPtr ptr)
{
SweepLine2_EEK_ClearSegmentBuffer(ptr);
}
internal override int PointBufferSize(IntPtr ptr)
{
return SweepLine2_EEK_PointBufferSize(ptr);
}
internal override int SegmentBufferSize(IntPtr ptr)
{
return SweepLine2_EEK_SegmentBufferSize(ptr);
}
internal override bool DoIntersect(IntPtr ptr, Segment2d[] segments, int count)
{
return SweepLine2_EEK_DoIntersect(ptr, segments, count);
}
internal override int ComputeSubcurves(IntPtr ptr, Segment2d[] segments, int count)
{
return SweepLine2_EEK_ComputeSubcurves(ptr, segments, count);
}
internal override int ComputeIntersectionPoints(IntPtr ptr, Segment2d[] segments, int count)
{
return SweepLine2_EEK_ComputeIntersectionPoints(ptr, segments, count);
}
internal override void GetPoints(IntPtr ptr, Point2d[] points, int count)
{
SweepLine2_EEK_GetPoints(ptr, points, count);
}
internal override void GetSegments(IntPtr ptr, Segment2d[] segments, int count)
{
SweepLine2_EEK_GetSegments(ptr, segments, count);
}
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr SweepLine2_EEK_Create();
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void SweepLine2_EEK_Release(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void SweepLine2_EEK_ClearPointBuffer(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void SweepLine2_EEK_ClearSegmentBuffer(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int SweepLine2_EEK_PointBufferSize(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int SweepLine2_EEK_SegmentBufferSize(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool SweepLine2_EEK_DoIntersect(IntPtr ptr, [In] Segment2d[] segments, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int SweepLine2_EEK_ComputeSubcurves(IntPtr ptr, [In] Segment2d[] segments, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int SweepLine2_EEK_ComputeIntersectionPoints(IntPtr ptr, [In] Segment2d[] segments, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void SweepLine2_EEK_GetPoints(IntPtr ptr, [Out] Point2d[] points, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void SweepLine2_EEK_GetSegments(IntPtr ptr, [Out] Segment2d[] segments, int count);
}
}
================================================
FILE: CGALDotNet/Arrangements/SweepLineKernel_EIK.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Arrangements
{
internal class SweepLineKernel_EIK : SweepLineKernel
{
internal override string Name => "EIK";
internal static readonly SweepLineKernel Instance = new SweepLineKernel_EIK();
internal override IntPtr Create()
{
return SweepLine2_EIK_Create();
}
internal override void Release(IntPtr ptr)
{
SweepLine2_EIK_Release(ptr);
}
internal override void ClearPointBuffer(IntPtr ptr)
{
SweepLine2_EIK_ClearPointBuffer(ptr);
}
internal override void ClearSegmentBuffer(IntPtr ptr)
{
SweepLine2_EIK_ClearSegmentBuffer(ptr);
}
internal override int PointBufferSize(IntPtr ptr)
{
return SweepLine2_EIK_PointBufferSize(ptr);
}
internal override int SegmentBufferSize(IntPtr ptr)
{
return SweepLine2_EIK_SegmentBufferSize(ptr);
}
internal override bool DoIntersect(IntPtr ptr, Segment2d[] segments, int count)
{
return SweepLine2_EIK_DoIntersect(ptr, segments, count);
}
internal override int ComputeSubcurves(IntPtr ptr, Segment2d[] segments, int count)
{
return SweepLine2_EIK_ComputeSubcurves(ptr, segments, count);
}
internal override int ComputeIntersectionPoints(IntPtr ptr, Segment2d[] segments, int count)
{
return SweepLine2_EIK_ComputeIntersectionPoints(ptr, segments, count);
}
internal override void GetPoints(IntPtr ptr, Point2d[] points, int count)
{
SweepLine2_EIK_GetPoints(ptr, points, count);
}
internal override void GetSegments(IntPtr ptr, Segment2d[] segments, int count)
{
SweepLine2_EIK_GetSegments(ptr, segments, count);
}
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr SweepLine2_EIK_Create();
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void SweepLine2_EIK_Release(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void SweepLine2_EIK_ClearPointBuffer(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void SweepLine2_EIK_ClearSegmentBuffer(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int SweepLine2_EIK_PointBufferSize(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int SweepLine2_EIK_SegmentBufferSize(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool SweepLine2_EIK_DoIntersect(IntPtr ptr, [In] Segment2d[] segments, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int SweepLine2_EIK_ComputeSubcurves(IntPtr ptr, [In] Segment2d[] segments, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int SweepLine2_EIK_ComputeIntersectionPoints(IntPtr ptr, [In] Segment2d[] segments, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void SweepLine2_EIK_GetPoints(IntPtr ptr, [Out] Point2d[] points, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void SweepLine2_EIK_GetSegments(IntPtr ptr, [Out] Segment2d[] segments, int count);
}
}
================================================
FILE: CGALDotNet/CGALDotNet.csproj
================================================
netcoreapp3.1
OnBuildSuccess
True
F:\Projects\Visual Studio Projects\CGALDotNet\CGALDotNet\CGALDotNet.xml
true
true
AnyCPU
F:\Projects\Visual Studio Projects\CGALDotNet\CGALDotNet\CGALDotNet.xml
..\..\CGALDotNetGeometry\CGALDotNetGeometry\bin\Release\netcoreapp3.1\CGALDotNetGeometry.dll
================================================
FILE: CGALDotNet/CGALDotNet.xml
================================================
CGALDotNet
The generic arrangment class.
The kernel type.
The default constructor.
Create a arrangement from a unmanaged ptr.
The unmanaged pointer.
The arrangement as a string.
Assigns the contents of another arrangement.
The other arrangement.
Computes the overlay of two arrangements and return as a new arrangement.
The other arrangement.
The overlay of both arrangements.
Create a deep copy of this arrangment.
The deep copy.
Insert the polygon into this arrangement.
The polygon.
If the polygon intersects anything else in the arramgement.
Insert the polygon into this arrangement.
The polygon.
If the polygon intersects anything else in the arramgement.
The abstract base class.
The default constructor.
Create a arrangement from the kernel.
The kernel.
Create a arrangement from the kernel and unmanaged pointer.
The kernel.
The unmanaged pointer.
The arrangements kernel.
The number of vertices in the arrangement.
The number of vertices in the arrangement that are i
returns the number of arrangement vertices that lie at infinity a
nd are not associated with valid points.
Such vertices are not considered to be regular arrangement
vertices and VertexCount does not count them.
The number of half edges.
The number of edges. two half edges count as one edge.
The number of faces in the arrangement not counting
the unbounded face.
returns the number of unbounded faces in the arrangement.
Such faces are not considered to be regular arrangement
faces and FaceCount does not count them.
The type of locator used to find element
in the arrangement when queried.
Default is walk which is the best in most cases
Is the arrangement empty.
A number that will change if the unmanaged
arrangement model changes.
Clear the arrangement.
In particular, the functions checks the topological structure of the arrangement
and assures that it is valid. In addition, the function performs several simple
geometric tests to ensure the validity of some of the geometric properties of
the arrangement. Namely, it checks that all arrangement vertices are associated
with distinct points, and that the halfedges around every vertex are ordered clockwise.
Get a copy of all the points in the arrangement.
A point array that is the length of the vertex count.
The ararys length.
Get a copy of all the segments in the arrangment.
A segment array that is the length of the edge count.
The ararys length.
Get a copy of all the vertices in the arrangement.
A vertices array that is the length of the vertex count.
The ararys length.
Get the vertex from the arrangement.
The index of the vertex.
The vertex.
True if the vertex was found.
Get a copy of all the half edges in the arrangement.
A half edge array that is the length of the half edge count.
The ararys length.
Get the half edge from the arrangement.
The index of the half edge.
The half edge.
True if the half edge was found.
Get a copy of all the faces in the arrangement.
A face array that is the length of the facee count.
The ararys length.
Get the face from the arrangement.
The index of the half edge.
The face.
True if the face was found.
Create the locator used to find query the arrangement.
The locator type.
Release the locator. Default will be used..
Default is walk which is the best in most cases.
Query what the point hits in the arrangment.
The point to query.
What was hit.
True if something was hit.
Query multiple points in the arrangment.
The points to query.
The results for each point.
True if any point hit something.
Query using a ray going up or down (y axis) from the query point.
The point to start at.
True to shoot ray up, false to shoot down.
The result of what was hits.
True if some thing was hit.
Locate the vertex at this point.
The point to locate vertex at.
The vertex.
True if a vertex was located.
Locate the closest vertex in the hit face
The point
The radius te closest vertex has to be within.
The closest vertex.
True if point hit a face and found a vertex.
Locate the edge at this point.
The point to locate edge at.
The edge.
True if a edge was located.
Locate the closest edge in the hit face.
The point
The closest edge.
The radius from the point a edge counts as being clicked on.
True if the point hit a face and found a edge.
Locate the faces at this point.
The point to locate face at.
The face.
True if a face was located.
Find if the arrangement has a element that intersects the segment.
The segment.
True if the segment intersects something in the arrangement.
Inserts a given point into a given arrangement.
It uses a given point-location object to locate the given point in the given arrangement.
If the point conincides with an existing vertex, there is nothing left to do. if it lies
on an edge, the edge is split at the point. Otherwise, the point is contained inside a face,
and is inserted as an isolated vertex inside this face.
The point to insert.
Insert the segment in to the arrangement.
The segments start point.
The segments end point.
True if the segment is know not to
hit anything currently in the arrangement.
Insert a segment into the arrangement.
True if the segment is know not to
hit anything currently in the arrangement.
Insert a array of segments into the arrangement.
The segment array
The segment arrays length.
True if the segments are known not to
hit anything currently in the arrangement.
Attempts to removed a given vertex from a given arrangement.
The vertex can be removed if it is either an isolated vertex,
(and has no incident edge,) or if it is a redundant vertex.That is,
it has exactly two incident edges, whose associated curves can be
merged to form a single x-monotone curve.The function returns a
boolean value that indicates whether it succeeded removing the
vertex from the arrangement.
The index of the vertex in the arrangement.
True if the vertex was removed.
Attempts to removed a given vertex from a given arrangement.
The vertex can be removed if it is either an isolated vertex,
(and has no incident edge,) or if it is a redundant vertex.That is,
it has exactly two incident edges, whose associated curves can be
merged to form a single x-monotone curve.The function returns a
boolean value that indicates whether it succeeded removing the
vertex from the arrangement.
The poisition of the vertex in the arrangement.
True if the vertex was removed.
Removes an edge at the index from the arrangement.
Once the edge is removed, if the vertices associated with its endpoints
become isolated, they are removed as well.
The index of the one of the half edges in the arrangement.
True if the edge was removed.
Removes an edge at the index from the arrangement.
Once the edge is removed, if the vertices associated with its endpoints
become isolated, they are removed as well.
A segment with the same positions as the edge in the arrangement.
True if the edge was removed.
Release any unmanaged resources.
The generic sweep line class.
The kernel.
A static instanceof a sweep line.
Default constructor.
Create from a unmanaged pointer.
The sweep line as a string.
The abstract sweep line.
The default sweep line.
Create from the kernel.
A kernel that implements a sweep line.
Create from the kernel and unmanaged pointer.
A kernel that implements a sweep line.
A unmanaged pointer to a sweep line.
The sweep line kernel.
Do any of the segments in the array intersect.
The segment array.
The ararys length.
Do any of the segments in the array intersect.
Compute all the sub segemnts from the intersection
of the segments in the array.
The segment array.
The ararys length.
The sub segments.
Compute all the intersection points from the
segments in the array.
The segment array.
The ararys length.
The intersection points.
Get all the points in the point buffer.
A point array the size of the point buffer.
The ararys length.
Get all the segments in the point buffer.
A segment array the size of the segment buffer.
The ararys length.
Clear the point buffer.
Clear the segment buffer.
Release any unmanaged resources.
Global utility functions.
Get the version of CGAL in use.
Get the version of eigen being used.
Returns OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
The first vector.
The second vector.
OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
Returns OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
The first vector.
The second vector.
OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
Returns OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
The first vector.
The second vector.
OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
returns OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
The first vector.
The second vector.
OBTUSE, RIGHT or ACUTE depending on the
angle formed by the two vectors u and v.
Returns an approximation of the angle between u and v.
The first vector.
The second vector.
The angle is given in degrees.
Returns an approximation of the angle between p-q and r-q.
The first tetrahedrons point.
The second tetrahedrons point.
The third tetrahedrons point.
The angle is given in degrees.
Returns an approximation of the angle between u and v.
The first vector.
The second vector.
The angle is given in degrees.
Returns an approximation of the angle between p-q and r-q.
The first tetrahedrons point.
The second tetrahedrons point.
The third tetrahedrons point.
The angle is given in degrees.
Returns an approximation of the signed dihedral angle
in the tetrahedron pqrs of edge pq.
p,q,r and p,q,s are not collinear.
The first tetrahedrons point.
The second tetrahedrons point.
The third tetrahedrons point.
The fourth tetrahedrons point.
The sign is negative if orientation(p,q,r,s)
is CGAL::NEGATIVE and positive otherwise.
The angle is given in degrees.
Returns true, if the three points are collinear
and q lies between p and r.
Note that true is returned, if q==p or q==r.
The first point.
The second point.
The third point.
Returns true, if the three points are
collinear and q lies between p and r.
Returns true, if the three points are collinear
and q lies between p and r.
Note that true is returned, if q==p or q==r.
The first point.
The second point.
The third point.
Returns true, if the three points are
collinear and q lies between p and r.
Returns true, if the three points are collinear
and q lies between p and r.
Note that true is returned, if q==p or q==r.
The first point.
The second point.
The third point.
Returns true, if the three points are
collinear and q lies between p and r.
Returns true, if the three points are collinear
and q lies between p and r.
Note that true is returned, if q==p or q==r.
The first point.
The second point.
The third point.
Returns true, if the three points are
collinear and q lies between p and r.
returns true, if the three points are collinear
and q lies strictly between p and r.
Note that false is returned, if q==p or q==r.
The first point.
The second point.
The third point.
returns true, iff the three points are
collinear and q lies strictly between p and r.
returns true, if the three points are collinear
and q lies strictly between p and r.
Note that false is returned, if q==p or q==r.
The first point.
The second point.
The third point.
returns true, iff the three points are
collinear and q lies strictly between p and r.
returns true, if the three points are collinear
and q lies strictly between p and r.
Note that false is returned, if q==p or q==r.
The first point.
The second point.
The third point.
returns true, iff the three points are
collinear and q lies strictly between p and r.
returns true, if the three points are collinear
and q lies strictly between p and r.
Note that false is returned, if q==p or q==r.
The first point.
The second point.
The third point.
returns true, iff the three points are
collinear and q lies strictly between p and r.
Returns true, if p, q, and r are collinear
The first point.
The second point.
The third point.
returns true, if p, q, and r are collinear
Returns true, if p, q, and r are collinear
The first point.
The second point.
The third point.
returns true, if p, q, and r are collinear
Returns true, if p, q, and r are collinear
The first point.
The second point.
The third point.
returns true, if p, q, and r are collinear
Returns true, if p, q, and r are collinear
The first point.
The second point.
The third point.
Returns true, iff p, q, and r are collinear
Compute the barycenter of the points p1, p2 and p3
with corresponding weights w1, w2 and w3 as 1.
The first point.
The second point.
The third point.
Compute the barycenter of the points.
Compute the barycenter of the points p1, p2 and p3
with corresponding weights w1, w2 and w3 as 1.
The first point.
The second point.
The third point.
Compute the barycenter of the points.
Compute the barycenter of the points p1, p2 and p3
with corresponding weights w1, w2 and w3 as 1.
The first point.
The second point.
The third point.
Compute the barycenter of the points.
Compute the barycenter of the points p1, p2 and p3
with corresponding weights w1, w2 and w3 as 1.
The first point.
The second point.
The third point.
Compute the barycenter of the points.
Constructs the bisector line of the two points p and q.
The bisector is oriented in such a way that p lies on its positive side.
The first point.
The second point.
Constructs the bisector line of the two points p and q.
Constructs the bisector of the two lines l1 and l2.
In the general case, the bisector has the direction of
the vector which is the sum of the normalized directions
of the two lines, and which passes through the intersection
of l1 and l2. If l1 and l2 are parallel, then the bisector
is defined as the line which has the same direction as l1,
and which is at the same distance from l1 and l2.
If Kernel::FT is not a model of FieldWithSqrt an
approximation of the square root will be used in this
function, impacting the exactness of the result even
with an (exact) multiprecision number type.
The first line.
The second line.
Constructs the bisector of the two lines l1 and l2.
Constructs the bisector of the two lines l1 and l2.
In the general case, the bisector has the direction of
the vector which is the sum of the normalized directions
of the two lines, and which passes through the intersection
of l1 and l2. If l1 and l2 are parallel, then the bisector
is defined as the line which has the same direction as l1,
and which is at the same distance from l1 and l2.
If Kernel::FT is not a model of FieldWithSqrt an
approximation of the square root will be used in this
function, impacting the exactness of the result even
with an (exact) multiprecision number type.
The first line.
The second line.
Constructs the bisector of the two lines l1 and l2.
Constructs the bisector of the two lines l1 and l2.
In the general case, the bisector has the direction of
the vector which is the sum of the normalized directions
of the two lines, and which passes through the intersection
of l1 and l2. If l1 and l2 are parallel, then the bisector
is defined as the line which has the same direction as l1,
and which is at the same distance from l1 and l2.
If Kernel::FT is not a model of FieldWithSqrt an
approximation of the square root will be used in this
function, impacting the exactness of the result even
with an (exact) multiprecision number type.
The first line.
The second line.
Constructs the bisector of the two lines l1 and l2.
Returns true, if p, q, r, and s are coplanar.
The first point.
The second point.
The third point.
The fourth point
Returns true, if p, q, r, and s are coplanar.
If p,q,r are collinear, then CGAL_COLLINEAR is returned.
If not, then p,q,r define a plane p. The return value in this
case is either CGAL_POSITIVE or CGAL_NEGATIVE, but we don't
specify it explicitly. However, we guarantee that all calls to
this predicate over 3 points in p will return a coherent
orientation if considered a 2D orientation in p
The first point.
The second point.
The third point.
If p,q,r are collinear, then CGAL_COLLINEAR is returned.
Let P be the plane defined by the points p, q, and r.
Note that the order defines the orientation of P. The function computes
the orientation of points p, q, and s in P: If p, q, s are collinear,
CGAL_COLLINEAR is returned. If P and the plane defined by p, q,
and s have the same orientation, CGAL_POSITIVE is returned;
otherwise CGAL_NEGATIVE is returned.
p, q, r, and s are coplanar and p, q, and r are not collinear.
The first point.
The second point.
The third point.
The fourth point
Constructs the line which is at the same distance from the three points p, q and r.
p, q and r are not collinear.
Constructs the line which is at the same distance from the three points p, q and r.
Returns true if p, q, and r form a left turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a left turn.
Returns true if p, q, and r form a left turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a left turn.
Returns true if p, q, and r form a left turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a left turn.
Returns true if p, q, and r form a right turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a right turn.
Returns true if p, q, and r form a right turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a right turn.
Returns true if p, q, and r form a right turn.
The first point.
The second point.
The third point.
Returns true if p, q, and r form a right turn.
Returns LEFT_TURN, if r lies to the left of the oriented
line l defined by p and q, returns RIGHT_TURN if r lies
to the right of l, and returns COLLINEAR if r lies on l.
The first point.
The second point.
The third point.
Returns LEFT_TURN, if r lies to the left of the oriented
line l defined by p and q, returns RIGHT_TURN if r lies
to the right of l, and returns COLLINEAR if r lies on l.
The first point.
The second point.
The third point.
Returns LEFT_TURN, if r lies to the left of the oriented
line l defined by p and q, returns RIGHT_TURN if r lies
to the right of l, and returns COLLINEAR if r lies on l.
The first point.
The second point.
The third point.
returns LEFT_TURN if u and v form a left turn, returns
RIGHT_TURN if u and v form a right turn, and returns
COLLINEAR if u and v are collinear.
Returns LEFT_TURN, if r lies to the left of the oriented
line l defined by p and q, returns RIGHT_TURN if r lies
to the right of l, and returns COLLINEAR if r lies on l.
The first point.
The second point.
Returns LEFT_TURN, if r lies to the left of the oriented
line l defined by p and q, returns RIGHT_TURN if r lies
to the right of l, and returns COLLINEAR if r lies on l.
The first point.
The second point.
returns POSITIVE, if s lies on the positive side of the
oriented plane h defined by p, q, and r, returns NEGATIVE
if s lies on the negative side of h, and returns COPLANAR
if s lies on h.
The first point.
The second point.
The third point.
The fourth point
returns NEGATIVE if u, v and w are negatively oriented,
POSITIVE if u, v and w are positively oriented,
and COPLANAR if u, v and w are coplanar.
computes an orthogonal vector of the plane defined by p, q
and r, which is directed to the positive side of this plane.
The first point.
The second point.
The third point.
computes an orthogonal vector of the plane
returns true, if l1 and l2 are parallel or if one of those
(or both) is degenerate.
The first line.
The seconed line.
returns true, if l1 and l2 are parallel
returns true, if l1 and l2 are parallel or if one of those
(or both) is degenerate.
The first line.
The seconed line.
returns true, if l1 and l2 are parallel
returns true, if l1 and l2 are parallel or if one of those
(or both) is degenerate.
The first line.
The seconed line.
returns true, if l1 and l2 are parallel
returns true, if r1 and r2 are parallel or if one of
those (or both) is degenerate.
The first ray.
The second ray.
returns true, if r1 and r2 are parallel
returns true, if r1 and r2 are parallel or if one of
those (or both) is degenerate.
The first ray.
The second ray.
returns true, if r1 and r2 are parallel
returns true, if r1 and r2 are parallel or if one of
those (or both) is degenerate.
The first ray.
The second ray.
returns true, if r1 and r2 are parallel
returns true, if s1 and s2 are parallel or if one of
those (or both) is degenerate.
The first segment.
The secong segment.
returns true, if s1 and s2 are parallel
returns true, if s1 and s2 are parallel or if one of
those (or both) is degenerate.
The first segment.
The secong segment.
returns true, if s1 and s2 are parallel
returns true, if s1 and s2 are parallel or if one of
those (or both) is degenerate.
The first segment.
The secong segment.
returns true, if s1 and s2 are parallel
Base class for objects that referrence a CGAL object.
The pointer to the unmanged CGAL object.
Default constructor.
Constructor taking a referrence to a CGAL object.
A pointer to a CGAL object.
The destuctor.
Has the object been disposed.
Get the ptr to the CGAL object.
Dispose the CGAL object.
Print some information about the object.
Print some information about the object.
Print the object into the console.
Print the object into a string builder.
The builder to print into.
Release the CGAL object.
Swap the unmanaged pointer with another.
The old ptr will be released first.
The new ptr. The old ptr will be released first.
Allow derived class to release the unmanaged memory.
Allow derived class to release the unmanaged memory.
Check if the object is still valid.
enum for egien solvers.
Create a new matrix filled with zeros.
The number of rows.
The number of columns.
Create a new matrix fill with the array contents.
The array.
Create a new matrix filled with the contents of the column vectors.
All column vectors must have the same dimension.
Create a 2 x 2 matrix.
Create a 3 x 3 matrix.
Create a 4 x 4 matrix.
Create a new matrix from a pointer.
Create a identity matrix.
The number of rows and columns of the matrix. Must be square.
The identity matrix.
Create a matrix filled with the numbers 1, 2. 3, etc to end.
Used for debugging.
The number of rows.
The number columns.
The Matrix.
Create a new matrix fill with random numbers.
The number of rows.
The number columns.
The minimum random number generated.
The maximum random number generated.
The random generators seed.
The matrix.
The number of rows in the matrix.
The number of columns in the matrix.
The total size of the matrix which is
the rows times the number of columns.
The single dimension array accessor.
The array index.
The value at the index i.
The double dimension array accessor.
The row index.
The column index.
The value at the index i,j.
The matrix string info.
The matrix string info.
The matrix transposed.
Flips a matrix over its diagonal that is,
it switches the row and column indices of the matrix.
The matrices conjugate.
The matrix obtained by replacing each element a(ij) with its complex conjugate, A^=(a^(ij)).
The matrices adjoint.
The transpose of its cofactor matrix.
Is the matrix invertible.
The inverse of a square matrix A,
sometimes called a reciprocal matrix,
is a matrix A^(-1) such that AA^(-1)=I.
DOes not check if the matrix is invertible.
The determinant is a scalar value that is a
function of the entries of a square matrix.
The trace of a square matrix is defined to be the
sum of elements on the main diagonal from the upper left to the lower right.
A square matrix has the same number of rows and columns.
A diagonal matrix is a matrix in which the entries
outside the main diagonal are all zero.
A square matrix is called upper triangular
if all the entries below the main diagonal are zero.
A square matrix is called lower triangular
if all the entries above the main diagonal are zero.
Multiple each component in matrix by the scalar.
The matrix.
The scalar.
The matrix with each component multiplied by the scalar.
Divide each component in matrix by the scalar.
The matrix.
The scalar.
The matrix with each component divided by the scalar.
Multiple the two matrices.
The first matrices number of columns must
the same as the second matrices number of rows.
The first matrix.
The second matrix.
The product matrix.
Add two matrices.
The matrices must be the same size.
The first matrix.
The second matrix.
A matrix where each compoent is the sum of the other two matrices.
Subtract two matrices.
The matrices must be the same size.
The first matrix.
The second matrix.
A matrix where each compoent is the difference of the other two matrices.
Multiple a matrix and a column vector.
The matrix.
The column vector.
The product column vector.
Is this matrix the identity matrix.
The threshold the values in the
matrix can be to the expected value.
Is this matrix the identity matrix.
Is this matrix filled with zeros.
The threshold the values in the
matrix can be to the expected value.
Is this matrix filled with zeros.
Are all the values in this matrix positive.
Are all the values in this matrix positive.
Does the matrix have a component that is nan.
Does the matrix have a component that is nan.
Replaces all nan values in the matrix with 0.
Are all the values in the matrix finite (non-infinite and non-nan).
Are all the values in the matrix finite (non-infinite and non-nan).
Replaces all infinite and nan values in matrix with 0.
Are all the values in the matrix the same.
The threshold the values in the
matrix can be to the expected value.
Are all the values in the matrix the same.
Create a sub matrix from this matrix.
The row to start at.
THe column to start at.
The number of rows.
The number of columns.
A sub matrix from this matrix.
Create a sub matrix from this matrix.
The number of rows.
The number of columns.
A sub matrix from this matrix.
Solve the linear system.
The vector to solve.
The solver type.
The solution vector.
Solve the linear system.
The vector to solve.
The solver type.
The solution vector.
Find the relative error from the linear system.
The vector that was solved.
The vector that was the solution.
The relative error.
Find the relative error from the linear system.
The vector that was solved.
The vector that was the solution.
The relative error.
Find the eigen values of the matrix.
The eigen values if found, null otherwise.
True if the values could be determined.
Find the eigen vectors of the matrix.
The eigen vectors if found, null otherwise.
True if the vectors could be determined.
Try and find the inverse of the matrix.
The inverse if found, null otherwise.
True if the inverse was found.
Create a rotation from a angle and the rotation axis.
The rotation amount.
The axis to rotate on.
The rotation matrix.
/
The first value in the vector.
The second value in the vector.
The third value in the vector.
The fourth value in the vector.
The generic Box wrapper for a CGAL object.
The kernel type.
Create box from min and max values.
The min x and y value.
The max x and y value.
Create box from min and max points.
The min point.
The max point.
Create from a pointer.
The iso rectangle pointer.
The type of kernel object uses.
The iso rectangle as a string.
The iso rectangle as a string.
Translate the shape.
The amount to translate.
Rotate the shape.
The amount to rotate.
Scale the shape.
The amount to scale.
Transform the rectangle.
The amount to translate.
The amount to rotate
The amount to scale.
Create a deep copy of the rectangle.
The deep copy.
The abstract iso rectangle definition.
Default constructor.
Construct with a new kernel.
The geometry kernel.
The Box pointer.
The iso rectangle kernel.
Contains the functions to the unmanaged CGAL object.
Convert to shape struct.
The rectangles min point.
The rectangles max point.
The rectangles area.
Is the rectangle degenerate.
The side the rectangle the point is on.
The point.
If the point is iside, outside or on boundary.
Does the rectangle contain the point.
The point
Should a point on
the boundary count as being inside.
Does the rectangle contain the point
Release the unmanaged pointer.
Round the shape.
The number of digits to round to.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
The static intersection class.
The static intersection class.
The static intersection class.
--------------------------------------------------------
The Point DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Line DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Point Intersection functions
--------------------------------------------------------
--------------------------------------------------------
The Line Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Ray Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Segment Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Box Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Point SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Line SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Point DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Linet DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Point Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Ray Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Segment Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Box Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Point SqrDistance extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Point DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Line DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Point Intersection functions
--------------------------------------------------------
--------------------------------------------------------
The Line Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Ray Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Segment Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Box Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Point SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Line SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Point DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Linet DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Point Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Ray Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Segment Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Box Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Point SqrDistance extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Point DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Line DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect functions
--------------------------------------------------------
--------------------------------------------------------
The Point Intersection functions
--------------------------------------------------------
--------------------------------------------------------
The Line Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Ray Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Segment Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Box Intersection functions
-----------------------------------------------------
--------------------------------------------------------
The Point SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Line SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance functions
--------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance functions
-----------------------------------------------------
--------------------------------------------------------
The Point DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Linet DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Box DoIntersect extern functions
------------------------------------------------------
--------------------------------------------------------
The Point Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Ray Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Segment Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Box Intersection extern functions
-------------------------------------------------------
--------------------------------------------------------
The Point SqrDistance extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Ray SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Segment SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Triangle SqrDistance extern functions
------------------------------------------------------
--------------------------------------------------------
The Point2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Vector2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The HPoint2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Line2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Ray2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Segment2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Box2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Point2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Vector2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The HPoint2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Line2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Ray2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Segment Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The IsoRectancle2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Point2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Vector2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The HPoint2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Ray2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Segment2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Box2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Point2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Vector2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The HPoint2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Line2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Ray2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Segment Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The IsoRectancle2 Class Functions
-------------------------------------------------------
--------------------------------------------------------
The Point2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Vector2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The HPoint2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Line2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Ray2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Segment2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Triangle2 extern functions
-------------------------------------------------------
--------------------------------------------------------
The Box2 extern functions
-------------------------------------------------------
Weighted point class
Create a new weighted point.
Create a new weighted point from a value and weight as 1.
The points value.
Create a new weighted point from a x, y value and weight as 1.
The points x value.
The points y value.
Create a new weighted point from a x, y value and weight as the w value.
The points x value.
The points y value.
The points weight value.
Create a new weighted point from a pointer.
The pointer.
The type of kernel object uses.
Create a deep copy of the point.
The deep copy.
Create a new weighted point.
The points kernel.
Create a new weighted point from a x, y value and weight as the w value.
The points x value.
The points y value.
The points weight value.
The points kernel.
Create a new weighted point from a existing ponter and kernel.
The points kernel.
The points pointer
The points kernel.
Release the pointer.
Release the pointer.
The pointer to release.
Accessor or the points x value.
ccessor or the points y value.
Round the point.
The number of digits to round to.
Clamp the point.
The points min value.
The points max value.
Clamp the point.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
Enum for the type of intersection geomerty.
The intersection result struct.
May contain up tp 6 points of data.
The point data for the intersection.
Represents up to 6 points in xy order.
The number of points of data used.
Was there a intersection.
Is the intersection a polygon.
The intersection geometry type.
Array accessor for the point data.
The array index from 0 to 6.
The point at index i.
Results information as string.
esults information as string
If result type was point get the point geometry.
If result type was line get the line geometry.
If result type was ray get the ray geometry.
If result type was segment get the segment geometry.
If result type was box get the box geometry.
If result type was triangle get the triangle geometry.
If result type was polygon get the points that
make up the polygon geometry.
Should only ever have at most 6 points.
The intersection result as a polygon.
The polygons kernel.
The polygon.
A CGALObject that represents a line on 2D space.
A horizontal line on the x axis.
A vertical line on the y axis.
Create a new line where ax + by + c = 0 holds.
The constant in ax.
The constant in by.
The constant.
Create a new line that passes through the two points.
The first point.
The second point.
Create a line that passes through the point in the direction of the vector.
The point.
The vector.
Create a line from a existing pointer.
The pointer.
Create a new line that faces in the opposite direction.
Create a new line that is perpendicular to current line.
A point the line should turn ccw when turning.
The perpendicular line.
Translate the object.
The amount to translate.
Rotate the object.
The amount to rotate.
Scale the object.
The amount to scale.
Translate, rotate and scale the object.
The amount to translate.
The amount to rotate in degrees.
The amount to scale.
Create a deep copy of the line.
The deep copy.
The abstract class for the line object.
The lines kernel.
Convert to shape struct.
The lines constant in ax.
The lines constant in by.
The lines constant.
Is the line degenerate.
Is the line horizontal on the x axis.
Is the line vertical on the y axis.
Convert the line to a vector.
Does the point lie on the line.
The point.
True if the point lies on the line.
Does the point lies on the negative/cw side of the line.
The point.
True if the point lies on the negative/cw side of the line.
Does the point lies on the positive/ccw side of the line.
The point.
True if the point lies on the positive/ccw side of the line.
The lines x value given a y value.
The y value.
The lines x value given a y value.
The lines y value given a x value.
The x value.
The lines y value given a x value.
Release the unmanaged pointer.
Round the shape.
The number of digits to round to.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
The unit x point.
The unit y point.
A point of zeros.
A point of ones.
A point of halfs.
The type of kernel object uses.
Round the point.
The number of digits to round to.
Clamp the point.
The points min value.
The points max value.
Clamp the point.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
The unit x ray.
The unit y ray.
Translate the shape.
The amount to translate.
Rotate the shape.
The amount to rotate.
Scale the shape.
The amount to scale.
Convert to shape struct.
Round the shape.
The number of digits to round to.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
A horizontal line on the x axis.
A vertical line on the y axis.
Translate the shape.
The amount to translate.
Rotate the shape.
The amount to rotate.
Scale the shape.
The amount to scale.
Convert to shape struct.
Round the shape.
The number of digits to round to.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
Translate the shape.
The amount to translate.
Rotate the shape.
The amount to rotate.
Scale the shape.
The amount to scale.
Convert to shape struct.
Round the shape.
The number of digits to round to.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
A Vector2 object with kernel type K.
The type of kernel.
The unit x vector.
The unit y vector.
A vector of zeros.
A vector of ones.
Create a new Vector.
Create a new vector filled with the value.
The value to fill.
Create a new vector with the values x and y.
The vectors x value.
The vectors y value.
Create a new vector from a existing pointer.
The pointer object.
The type of kernel object uses.
Vector information.
The vectors string information.
Create a deep copy of the vector.
The deep copy.
The vectors abstract bass class.
Create a new vector with the kernel.
The vectors kernel.
Create a new vector from the x and y values.
The vectors x value.
The vectors y value.
The vectors kernel.
Create a new vector from a existing pointer.
The vectors kernel.
The existing pointer.
The vectors kernel.
The vectors sqr magnitude.
The vectors sqr magnitude.
Access the x component.
Access the y component.
Release the vectors pointer.
Release a pointer to a vector.
The pointer to release.
Round the vector.
The number of digits to round to.
Clamp the vector.
The vectors min value.
The vectors max value.
Clamp the vector.
Normalize the vector.
Convert to another kernel.
Must provide a different kernel to convert to or
just a deep copy will be returned.
The shape with another kernel type.
The convex hull method to use.
The generic convex hull class.
The kernel type
The static instance.
Default constructor.
Find the convex of the points.
The point array.
The ararys length.
The hull ethod to use.
A polygon that represents the convex hull.
Find the upper hull of points.
The point array.
The ararys length.
A polygon that represents the upper hull.
Find the lower hull of points.
The point array.
The ararys length.
A polygon that represents the lower hull.
The convex hull abstract base class.
Default constructor.
Construct hull with the kernel.
The kernel
The hulls kernel type.
Is this set of points ccw orderer.
The point array.
The ararys length.
Is this set of points ccw orderer.
Is this set of points cw orderer.
The point array.
The ararys length.
Is this set of points cw orderer.
Checks if the minimum number of points have been provided.
The point array length.
Release any unmanaged resources.
The generic convex hull class.
The kernel type
The static instance.
Default constructor.
Create the convex hull from a set of points.
The point array.
The point arrays length
The hull as a polyhedron.
Create the convex hull from a set of points.
The point array.
The point arrays length
The hull as a surface mesh.
The convex hull abstract base class.
Default constructor.
Construct hull with the kernel.
The kernel
The hulls kernel type.
Check if the points in the polyhedron are convex.
The polyhedron.
True if the polyhedron is convex.
Check if the points in the mesh are convex.
The mesh.
True if the mesh is convex.
Checks if the minimum number of points have been provided.
The point array length.
Release any unmanaged resources.
A static instance of the triangulation.
The triangulation as a string.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points and the edges as constraints into the triangulation.
Will retain the poylgons edges.
The polygon to insert.
Insert the polygons points and the edges as constraints into the triangulation.
Will retain the poylgons edges.
The polygon to insert.
A deep copy of the triangulation.
The deep copy.
The max value the angle bounds can be.
The number of verices in the triangulation.
The number of triangles in the triangulation.
The number of indices need to represent the
triangulation (number of triangles * 3).
The conforming triangulation kernel.
Clear the triangulation.
Translate the triangulation.
The amount to translate.
Rotate the triangulation.
The amount to rotate in radians.
Scale the triangulation.
The amount to scale.
Transform the triangulation with a TRS matrix.
The amount to translate.
The amount to rotate.
The amount to scale.
Make the mesh delaunay.
Make the mesh
Refine the mesh into smaller triangles.
Default shape bound. 0.125 corresponds to abound 20.6 degree. Max 0.125 value.
Upper bound on the length of the longest edge.
Refine the mesh into smaller triangles.
Default shape bound. 0.125 corresponds to abound 20.6 degree. Max 0.125 value.
Upper bound on the length of the longest edge.
Seeds point in polygons that are not to be refined.
Release any unmanaged resources.
Release any unmanaged resources.
A static instance of the tetrahedral remeshing.
The tetrahedral remeshing kernel.
Release any unmanaged resources.
Generic polygon definition.
The kernel type.
Default constructor.
Create from a set of points.
The polygons points.
Create from a pointer.
The polygons pointer.
The polygon as a string.
The polygon as a string.
Copy the polygon.
The copied polygon.
Triangulate the polygon.
The triangle indices.
Do the polygons intersect.
The other polygon.
Do the polygons intersect.
Do the polygons intersect.
The other polygon.
Do the polygons intersect.
Do the polygons intersect.
The other polygon.
The intersection results.
Do the polygons intersect.
Do the polygons intersect.
The other polygon.
The intersection results.
Do the polygons intersect.
Refine the polygon to a triangulation.
Does not modify this polygon.
Upper bound on the length of the longest edge.
The base triangulation.
Refine the polygon to a triangulation.
Does not modify this polygon.
Default shape bound. 0.125 corresponds to abound 20.6 degree. Max 0.125 value.
Upper bound on the length of the longest edge.
The base triangulation.
Partition the polygon into convex pieces.
Does not modify this polygon.
The convex partition.
The type of partition method.
Simplify the polygon.
The simplification threshold.
Simplify the polygon.
The simplification parameters.
offset the polygon. Does not modify this polygon.
The type of offset.
The amount to offset.
The offset results.
Create a polyhedron3 mesh with one polygon face.
Should the y coord of the points be used for the z coord.
The new polyhedron mesh
Thrown if the polygon is not simple.
Get the dual polygon where every point s now a edge.
The dual polygon.
The abstract polygon definition.
Is the polygon simple.
Must be updated to find if simple.
The polygons orientation.
Must be updated to find orientation.
Default constructor.
Construct with a new kernel.
The polygon kernel.
Construct with a new kernel.
The polygon kernel.
The points to construct from.
Construct with a new kernel.
The polygon kernel.
The polygons pointer.
The number of points in the polygon.
The capacity of the point array.
Is this a simple polygon.
Certains actions can only be carried out on simple polygons.
The polygons orientation.
Certain actions depend on the polygons orientation.
The orientation expressed as the clock direction.
Is the polygon degenerate.
Polygons with less than 3 points are degenerate.
Is the polygon cw orientated.
Is the polygon ccw orientated.
Is the polygon updated.
The polygons kernel.
Contains the functions to the unmanaged CGAL polygon.
The type of kernel object uses.
Array accessor for the polygon.
Getting a point wraps around the polygon.
Mark th mesh as needing to be updated.
Valid polygons should be simple and ccw
for most algorithms to work on them.
Valid hole polygons should be simple
and cw to add to a polygon with holes.
Clear the polygon of all points.
Shrink the capacity to match the point count.
Resize the point array.
New elements will default to zero.
Remove the point at the index from the array.
The points index
Remove a range of points from the array.
The starting index
The number of points to remove.
Insert the point at the index into the array.
The points index.
The point to insert.
Insert a range of points into the array.
The starting index
The points to insert.
The number of points to insert.
Add the point to the end of the poylgon.
The point to add.
Get the point a the index.
The points index to get.
The point at index.
Get the point at the index
and wrap around the polygon.
The points index.
The point at the index.
Get the point at the index
and clamp to the polygons last point.
The points index.
The point at the index.
Get all the points in the polygon.
The point array to copy the data into.
The array length.
Get all the polygon points.
The list to copy the data into.
Triangulate the polygon.
The triangle indices.
Get all the polygon segments.
The segment array to copy the data into.
The array length.
Set the points at the index.
The points index.
The points value.
Set the points from the array.
If the array is larger than the polygon then
the new points will be appended to end of polygon.
The points array.
The array length.
Reverse the polygon.
Swithches the orientation.
Find the bounding box for the polygon.
The bounding box.
Find if the polygon is simple.
True if simple.
Find if the polygon is convex.
Must be simple to determine.
True if the polygon is convex.
Find the polygons orientation.
Must be simple to determine.
The polygons orientations.
Find the orientated side the point lies on.
Must be simple to determine.
The point.
The orientated side of the polygon the point is on.
Find the bounded side the point lies on.
Must be simple to determine.
The point.
The bounded side of the polygon the point is on.
Find the polygons signed area.
Must be simple to determine.
The signed area is positive if polygon is ccw
and negation if cw.
The area of the polygon.
Must be simple to determine.
The abs of the signed area.
Find the perimeter.
This is the length of the polygon boundary.
Find the square perimeter.
This is the square length of the polygon boundary.
Does the polygon contain the points.
Must be simple to determine.
The point to find.
Does the point on the boundary count
True if the point is inside the polygon.
Round each point it polygon to a number of digits.
The number of digits to round to.
Translate the polygon.
The amount to translate.
Rotate the polygon.
The amount to rotate in radians.
Scale the polygon.
The amount to scale.
Transform the polygon with a TRS matrix.
The amount to translate.
The amount to rotate.
The amount to scale.
Enumerate all points in the polygon.
Each point in polygon.
Enumerate all points in the polygon.
Each point in polygon.
Return all the points in the polygon in a array.
The array.
Get all the points in the polygon into a list.
Convert the polygon to a new polygon with a different kernel.
May result in different values due to precision issues.
The new kernel type.
The new polygon.
Truncate a point in the polygon by splitting
the point and shifting toward its neghbours.
The points index in mesh.
The amount to truncale.
Print the polygon into a styring builder.
Release the unmanaged pointer.
Release the unmanaged pointer.
Update the polygon if needed.
Update the polygon directly without calling the update
function.
Is the polygon simepl.
The polygons orientation.
Should the input polygon be checked.
Can disable for better performance if
it is know all input if valid.
Check if the polygon is valid to offset.
Should be simple and ccw.
The polygon to check.
Check if the polygon is valid to offset.
Should be simple and ccw.
The polygon to check.
The type of boolean ops.
Generic polygon boolean class.
The type of kernel
A static instance to the boolean class.
Create a new object.
Perform the boolean op on the two polygons.
The type of op.
A simple ccw polygon.
A simple ccw polygon.
The result of the op.
If the op was performed and the result list changed.
Perform the boolean op on the two polygons.
The type of op.
A simple ccw polygon.
A simple ccw polygon.
The result of the op.
If the op was performed and the result list changed.
Perform the boolean op on the two polygons.
The type of op.
A simple ccw polygon.
A simple ccw polygon.
The result of the op.
If the op was performed and the result list changed.
Check if the polygons intesect.
A simple ccw polygon.
A simple ccw polygon.
If the polygons intesect.
Check if the polygons intesect.
A simple ccw polygon.
A simple ccw polygon.
If the polygons intesect.
Check if the polygons intesect.
A simple ccw polygon.
A simple ccw polygon.
If the polygons intesect.
The union of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The union of the polygons.
If the op was performed and the result list changed.
The union of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The union of the polygons.
If the op was performed and the result list changed.
The union of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The union of the polygons.
If the op was performed and the result list changed.
The intersection of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The intersection of the polygons.
If the op was performed and the result list changed.
The intersection of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The intersection of the polygons.
If the op was performed and the result list changed.
The intersection of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The intersection of the polygons.
If the op was performed and the result list changed.
The difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The difference of the polygons.
If the op was performed and the result list changed.
The difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The difference of the polygons.
If the op was performed and the result list changed.
The difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The difference of the polygons.
If the op was performed and the result list changed.
The symmetric difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The symmetric difference of the polygons.
If the op was performed and the result list changed.
The symmetric difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The symmetric difference of the polygons.
If the op was performed and the result list changed.
The symmetric difference of the two polygons.
A simple ccw polygon.
A simple ccw polygon.
The symmetric difference of the polygons.
If the op was performed and the result list changed.
The complement of the polygon.
A simple ccw polygon.
The complement of the polygon.
Copy the unmanaged polygon objects created
into the result list.
The number of objects in the buffer.
The result lis.
Copy the unmanaged polygon object.
The index of the polygon in the buffer.
The polygon copy.
Abstract base class for polygon boolean.
The polygon boolean kernel.
Clear the unmanaged buffer.
Release the unmanaged resourses.
Factory for creating polygons.
The kernel type.
Create a empty polygon.
Create a polygon from a triangle.
The triangle first point.
The triangle second point.
The triangle third point.
True for a counter clock wise polygon, false for a clock wise polygon
The created polygon.
Create a polygon from a triangle.
The triangle.
True for a counter clock wise polygon, false for a clock wise polygon
The created polygon.
Create a polygon from a box.
The boxs min point.
The boxs max point.
True for a counter clock wise polygon, false for a clock wise polygon
The created polygon.
Create a polygon from a box.
The boxs min point.
The boxs max point.
True for a counter clock wise polygon, false for a clock wise polygon
The created polygon.
Create a polygon from a box.
The box.
True for a counter clock wise polygon, false for a clock wise polygon
The created polygon.
Create a polygon from a dounut.
Outer radius must be greater than inner.
The outer radius.
The inner radius
The number of segments.
The created polygon with holes
Create a polygon from a dounut.
Outer radius must be greater than inner.
The center position of the polygon.
The outer radius.
The inner radius
The number of segments.
The created polygon with holes
Create a polygon from a circle.
The radius of the circle.
The number of segments.
True for a counter clock wise polygon, false for a clock wise polygon
The polygon.
Create a polygon from a circle.
The center of the circle.
The radius of the circle.
The number of segments.
True for a counter clock wise polygon, false for a clock wise polygon
Create a polygon from a circle.
The cirlce.
The number of segments.
True for a counter clock wise polygon, false for a clock wise polygon
https://rosettacode.org/wiki/Koch_curve#C.2B.2B
The size of the polygon.
The number of times to sub divide.
True for a counter clock wise polygon, false for a clock wise polygon
https://rosettacode.org/wiki/Koch_curve#C.2B.2B
The stars center.
The size of the polygon.
The number of times to sub divide.
True for a counter clock wise polygon, false for a clock wise polygon
https://rosettacode.org/wiki/Koch_curve#C.2B.2B
Decomposition stratergy for polygons.
Decomposition stratergy for polygons with holes.
Generic Minkowski class.
The type of kernel
A static instance to the Minkowski class.
Create a new object.
Compute the Minkowski sum of two polygons.
Compute the Minkowski sum of two polygons.
Compute the Minkowski sum of two polygons.
The decomposition method.
Compute the Minkowski sum of two polygons.
The decomposition method.
It is based on the angle-bisector decomposition method suggested by Chazelle and Dobkin [4],
which runs in O(n2) time. In addition, it applies a heuristic by Flato that reduces the number
of output polygons in many common cases. The convex decompositions that it produces usually
yield efficient running times for Minkowski sum computations. It starts by examining each pair
of reflex vertices in the input polygon, such that the entire interior of the diagonal
connecting these vertices is contained in the polygon. Out of all available pairs, the vertices
pi and pj are selected, such that the number of reflex vertices encountered when traversing
the boundary of the polygon from pi to pj in clockwise order is minimal. The polygon is split
by the diagonal pipj. This process is repeated recursively on both resulting sub-polygons.
In case it is not possible to eliminate two reflex vertices at once any more, each reflex
vertex is eliminated by a diagonal that is closest to the angle bisector emanating from this
vertex and having rational-coordinate endpoints on both sides.
Uses the dynamic-programming algorithm of Greene [6] for computing an optimal decomposition of
a polygon into a minimal number of convex sub-polygons. While this algorithm results in a small
number of convex polygons, it consumes rather many resources, as it runs in O(n4) time and O(n3)
space in the worst case, where n is the number of vertices in the input polygon.
Implements the approximation algorithm suggested by Hertel and Mehlhorn [8], which triangulates
the input polygon and then discards unnecessary triangulation edges. After triangulation (carried
out by the constrained-triangulation procedure of CGAL) the algorithm runs in O(n) time and space,
and guarantees that the number of sub-polygons it generates is not more than four times the optimum.
Implementation of Greene's approximation algorithm [6], which computes a convex decomposition of the
polygon based on its partitioning into y-monotone polygons. This algorithm runs in O(nlogn) time and
O(n) space, and has the same guarantee on the quality of approximation as Hertel and Mehlhorn's algorithm.
Uses vertical decomposition to decompose the underlying arrangement.
Uses vertical decomposition to decompose the underlying arrangement.
Uses constrained triangulation to decompose the input polygons, which may have holes, into triangles.
Uses constrained triangulation to decompose the input polygons, which may have holes, into triangles.
Abstract base class for polygon minkowski.
The polygon Minkowski kernel.
Release the unmanaged resourses.
The generic polgon offset class
Static instance of polygon offset.
Create new polygon offset.
Create a interior or exterior offset.
The offset type
The polygon to offset.
The offset amount
The offset polygon
Create a interior or exterior offset.
The offset type
The polygon to offset.
The offset amount
The offset polygon
Create a interior offset.
The polygon to offset.
The offset amount
The offset polygon
Create a interior offset.
The polygon to offset.
The offset amount
The offset polygon
Create a exterior offset.
The polygon to offset.
The offset amount
The offset polygon
Create a exterior offset.
The polygon to offset.
The offset amount
The offset polygon
Create the interior skeleton of the polygon.
The polygon to offset.
Should the polygon be included as the border.
The skeletons segments.
Create the interior skeleton of the polygon.
The polygon to offset.
Should the polygon be included as the border.
The skeletons segments.
Create the exterior skeleton of the polygon.
The polygon to offset.
The bounding boxes offset from the polygons edges. Must be > 0.
Should the polygon be included as the border.
The skeletons segments.
Create the exterior skeleton of the polygon.
The polygon to offset.
The bounding boxes offset from the polygons edges. Must be > 0.
Should the polygon be included as the border.
The skeletons segments.
The abstract polygon offset class.
The offset kernel.
Get the number off polygons in the buffer.
The size of the segment buffer.
The number of segments in the buffer.
Get the unmanaged point to the polygon at the buffer index
The index in the buffer.
The pointer
Get the segment from buffer.
The segments index.
The segment.
Clear the polygon buffer.
Clear the segment buffer.
Release the unmanaged resources.
Type of polygon partitions.
Generic polygon partition class.
The kernel type.
Static instance of polygon partition.
Create new polygon partition.
Is this polygon Y monotonic.
The polygon.
True if y monotonic.
Is this polygon Y monotonic.
The polygon.
True if y monotonic.
Partition a polygon.
The polygon to partition.
The resulting polygons.
Partition a polygon.
The polygon to partition.
The resulting polygons.
Partition a polygon.
The type of partition to perfrom.
The polygon to partition.
The resulting polygons.
Partition a polygon.
The type of partition to perfrom.
The polygon to partition.
The resulting polygons.
Partition in to Y monotonic polygons.
The polygon to partition.
The resulting polygons.
Partition in to Y monotonic polygons.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is no more than four times the minimal number.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is no more than four times the minimal number.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is no more than four times the minimal number.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is no more than four times the minimal number.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is minimal.
The polygon to partition.
The resulting polygons.
Partition the polygon into convex polygons where the number of
convex polygons produced is minimal.
The polygon to partition.
The resulting polygons.
Copy the new polygons into the result array
and the clear the buffer.
The number of polygons in buffer.
The resulting polygons.
The abstract base class.
The partition kernel.
Clear the unmanaged buffer.
Release the unmanaged resources.
Cost options for simplification.
Stop distance options for simplification.
Paramaters for poylgon simplification.
The default param settings.
The param as a string.
Generic polygon simplification class.
The kernel type.
Static instance of polygon simplification.
Simplify the polygon.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygon.
Simplify the polygon.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygon ptr.
Simplify the polygons boundary and all the holes.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygon.
Simplify the polygons boundary and all the holes.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygons ptr.
Simplify the polygons boundary.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygon.
Simplify the polygons holes.
The polygon to simplify. Must be simple.
The simplification parameters.
The simplified polygon.
Simplify one of the polygons holes.
The polygon to simplify. Must be simple.
The simplification parameters.
The hole index to simplify.
The simplified polygon.
Abstract polygon simplification class.
The simplification kernel.
Release unmanaged resources.
The generic polgon visibility class
Static instance of polygon visibility.
Create new polygon visibility.
Compute the visibility from a simple polygon with no holes.
This class implements the algorithm of B.Joe and R.B.Simpson [4]. The algorithm is a modification
and extension of the linear time algorithm of Lee [5]. It computes the visibility region from a
viewpoint that is in the interior or on the boundary of the polygon.
While scanning the boundary the algorithm uses a stack to manipulate the vertices, and ultimately
yields the visibility region.For each scanned edge, at most 2 points are pushed onto the stack.
Overall, at most 2 n points are pushed or popped. Thus, the time and space complexities of the
algorithm are O(n) even in case of degeneracies such as needles, where n is the number of the vertices of the polygon.
The visibility point.
A simple polygon that contains the point.
The visibility result.
True if result was computed
Compute the visibility from a polygon with holes.
The visibility point.
A polygon with holes that contains the point.
The visibility result.
True if result was computed
Compute the visibility from a polygon with holes.
What method to use.
The visibility point.
A polygon with holes that contains the point.
The visibility result.
True if result was computed
Compute the visibility from a polygon with holes using the triangular expansion method.
The algorithm does not require preprocessing. It relies on the algorithm of T.
Asano [1] based on angular plane sweep, with a time complexity of O(nlogn) in the number of vertices.
The visibility point.
A polygon with holes that contains the point.
The visibility result.
True if result was computed
Compute the visibility from a polygon with holes using the rotational sweep method.
The algorithm obtains a constrained triangulation from the input arrangement, then computes visibility by
expanding the triangle that contains the query point. Preprocessing takes O(n) time and O(n) space, where
n is the number of vertices of input polygon. The query time is O(nh), where h is the number of holes+1 of
input polygon. Thus, for simple polygons (or a polygon with a constant number of holes) the algorithm
complexity is linear, but it is O(n2) in the worst case, as the number of holes can be linear in n.
The visibility point.
A polygon with holes that contains the point.
The visibility result.
True if result was computed
The abstract polygon visibility class.
The offset kernel.
Release the unmanaged resources.
Polygon with holes consists of a boundary and holes.
Generic polygon definition.
The kernel type.
Default constuctor.
Construct polygon with the boundary.
A CCW polygon.
Construct polygon with the boundary points
A CCW set of points.
Create from a pointer.
The polygons pointer.
The polygon as a string.
The polygon as a string.
Create a deep copy of the polygon.
The copy.
Create a deep copy of the polygon element.
The element type to copy.
If element os a hole thiss is the holes index.
The copy.
Get the boundary as a copy.
If unbounded will return a empty polygon.
A copy of the hole polygon.
Get the hole as a copy.
The holes index
A copy of the hole polygon.
Add a polygon as a holes.
Holes must simple and CW.
The hole polygon.
Create a copy of boundary and hole polygons.
The list of polygons.
Triangulate the polygon.
The triangle indices.
Do the polygons intersect.
The other polygon.
Do the polygons intersect.
Do the polygons intersect.
The other polygon.
Do the polygons intersect.
Connect all the holes of the polygon
and return as a polygon.
Will result in a non simple polygon.
The connected non-simple polygon.
Partition the polygon into convex pieces.
The convex partition.
The type of partition method.
Simplify the polygon.
The simplification threshold.
Simplify the polygon.
The simplification parameters.
offset the polygon. Does not modify this polygon.
The type of offset.
The amount to offset.
The offset results.
The abstract polygon definition.
Default constructor.
Construct polygon with the kernel.
Construct the polygon with the kernel and boundary.
A CCW polygon.
Construct the polygon with the kernel and boundary.
A CCW set of points.
Construct the polygon with the kernel and pointer.
Is the polygon unbounded.
ie no boundary polygon has been set.
Is the polygon bounded.
ie a boundary polygon has been set.
Number of points in the boindary polygon.
The number of holes in polygon.
Is this a simple polygon.
Certains actions can only be carried out on simple polygons.
The polygons orientation.
Certain actions depend on the polygons orientation.
The orientation expressed as the clock direction.
Is the polygon degenerate.
Polygons with less than 3 points are degenerate.
Is the polygon cw orientated.
Is the polygon ccw orientated.
The polygon kernel.
The type of kernel object uses.
Valid polygon with holes must have a simple and ccw boundary
and all holes must be simple and cw.
Valid holes must be simple, cw and must be contained
within the boundary polygon.
True if the polygon is a valid hole.
Clear the polygon.
Clear the polygons boundary.
Clear the polygons holes.
Get the number of points of a polygon element.
The element type.
If element type is a hole this is the holes index.
Remove a polygon.
Can remove the boundary or a hole.
The element type.
If element type is a hole this is the holes index.
Remove a hole from the polygon.
The holes index.
Reverse the polygon.
The element type.
If element type is a hole this is the holes index.
Get a polygons point.
The element type.
The index of the point in the polygon.
If element type is a hole this is the holes index.
Get the points in the polygon element.
The element type.
The point array to copy points into.
The ararys length.
If element type is a hole this is the holes index.
Set a polygons point.
The element type.
The index of the point in the polygon.
The point to set.
If element type is a hole this is the holes index.
Set all the points in the polygon. If the point array is longer
than the polygon is current the extra points are appended to the end.
The element type.
The points to set.
The ararys length.
If element type is a hole this is the holes index.
Triangulate the polygon.
The triangle indices.
Add a hole from a set of points.
A CW set of points.
The ararys length.
Find if the polygon has a boundary.
True if the polygon has a boundary.
Find the polygons bounding box.
The element type.
If element type is a hole this is the holes index.
The polygons bounding box.
Find if the polygon is simple.
The element type.
If element type is a hole this is the holes index.
True if the polygon is simple.
Find if the polygon is convex.
The element type.
If element type is a hole this is the holes index.
True if polygon is convex.
Find the orientation of polygon.
The element type.
If element type is a hole this is the holes index.
The orientation of the polygon.
Find the orientated side the point is on.
The element type.
If element type is a hole this is the holes index.
The orientated side of point compared to the polygon.
The signed area of the polygon.
The element type.
If element type is a hole this is the holes index.
The signed area is positive if polygon is ccw
and negation if cw.
The area of the polygon.
The element type.
If element type is a hole this is the holes index.
The polygons area.
Enumerate all points in the polygon.
Each point in polygon.
Enumerate all points in the polygon.
Each point in polygon.
Return all the points in the polygon in a array.
The array.
Get all the points in the polygons boundary into a list.
Get all the points in the polygon boundary and holes.
The point array to copy into.
Round each point it polygon to a number of digits.
The number of digits to round to.
Convert the polygon to a new polygon with a different kernel.
May result in different values due to precision issues.
The new kernel type.
The new polygon.
Release the unmanaged resoures.
Release the unmanaged pointer.
Does the polygon fully contain the other polygon.
The other polygon.
Should the boundary be included.
True if the polygon is contained within this polygon.
Does this polygon contain the point.
The point.
Should points on the boundary be
counted as being inside the polygon.
True if the polygon contain the point.
Translate the polygon.
The amount to translate.
Translate the polygon.
The element type.
The amount to translate.
If element type is a hole this is the holes index.
Rotate the polygon.
The amount to rotate in radians.
Rotate the polygon.
The element type.
The amount to rotate in radians.
If element type is a hole this is the holes index.
Rotate the polygon.
The amount to scale.
Scale the polygon.
The element type.
The amount to scale.
If element type is a hole this is the holes index.
Transform the polygon.
The amount to translate.
The amount to rotate in radians.
The amount to scale.
Transform the polygon.
The element type.
The amount to translate.
The amount to rotate in radians.
The amount to scale.
If element type is a hole this is the holes index.
Print debug infomation.
Number of vertices.
Number of faces.
Number of halfedges.
Number of border edges.
Since each border edge of a polyhedral surface has exactly one
border halfedge, this number is equal to size of border halfedges.
Returns true if the polyhedral surface is combinatorially consistent.
Must be a valid mesh to check many other properties.
Returns true if there are no border edges.
Returns true if all faces are triangles.
Returns true if all faces are quads.
Is this a valid triangle mesh.
Is this a valid closed mesh.
Is this a valid closed triangle mesh.
The current build stamp.
Clear the mesh.
Clear the normal maps.
True to clear the vertex normal map.
True to clear the face normal map.
Create a mesh from the points and indices.
The meshes points.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Create a triangle mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a quad mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a mesh with quads and triangles.
The meshes points.
The point array length.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Create a mesh with riangles, quads, pentagons and hexagons.
The meshs points.
The length of the point array.
The faces indices.
Create a mesh consisting of one polygon face.
The faces points
The length of the point array.
Should the y coord of the points be used for the z coord.
Get the triangle and quad indices.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Get the meshes triangles.
The meshes triangles.
The triangle array length.
Get the meshes quads.
The meshes quads.
The quads array length.
Get the meshes triangles and quads.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Get the meshes triangles, quads, pentagons and hexagons.
The indices.
Array accessor for the polygon.
Getting a point wraps around the polygon.
The points index.
The vertices point.
Get the vertices point.
The vertex index in the mesh.
The vertices point.
If index is out of range.
Get the points in the mesh.
The array to copy points into.
The point array length.
Set the point at the index.
The points index
The pointsam>
If index is out of range.
Set the points from a array.
The point array.
The point arrays length.
Get a halfedges segment.
The halfedges index.
The segment.
True if halfedge found.
Get a segment for each halfedge in the mesh.
The segment array.
The segment array length.
Get the faces triangle.
Presumes face is a triangle with no checks.
The faces index.
The faces triangle
Get a triangle for each face in the mesh.
Presumes all faces are triangles with no checks.
The trainagle array.
The traingle arrays length.
Get the mesh vertex.
The vertices index.
The vertex.
True if the vertex was found.
Get the vertices in the mesh.
The vertex array.
The vertex array length.
Get the mesh face.
The faces index.
The face.
True if the face was found.
Get the faces in the mesh.
The face array.
The face array length.
Get the mesh halfedge.
The halfedges index.
The halfedge.
True if the halfedge was found.
Get the halfedges in the mesh.
The halfedge array.
The halfedge array length.
Count the number of triangles, quads and polygons in the mesh.
The number of triangles, quads and polygons in the mesh.
Count the number of triangles, quads and polygons in the dual mesh.
A dual mesh is were faces become vertices and vertices become faces.
The number of triangles, quads and polygons in the mesh.
Get a centroid (the avergae face position) for each face in the mesh.
The point array.
The points arrays lemgth.
Computes the vertex normals if needed.
Computes the face normals if needed.
Get the vertex normals.
The normals array.
The normals array length.
Get the face normals.
The normals array.
The normals array length.
Translate each point in the mesh.
The amount to translate.
Rotate each point in the mesh.
The amount to rotate.
Scale each point in the mesh.
The amount to scale.
Transform each point in the mesh.
The amount to translate.
The amount to rotate.
The amount to scale.
Make all faces triangles.
Read data from a off file into the pollyhedron.
The files name.
Write data from a off file into the pollyhedron.
The files name.
Print the mesh into a string builder.
Reverses the orientation of the vertices in each face.
Find what side of the mesh the lies in.
The point to check.
ON_BOUNDED_SIDE if point inside mesh,
ON_UNBOUNDED_SIDE if point not inside,
ON_BOUNDARY if point is on the surface.
Does the mesh contain the point.
The point.
If point is on the boundary does it count a being contained.
True if the poly contains the point
Locate the face the rays hits.
The ray.
The hit result.
Find the face closest to the point.
The point.
The hit result.
Locate the face hit by the ray.
The ray.
The hit face.
True if the ray hit a face.
Locate the vertex hit by the ray.
The ray.
The distance the vertex has to be within hit point.
The hit vertex.
True if the ray hit a vertex.
Locate the edge hit by the ray.
The ray.
The distance the edge has to be within hit point.
The hit edge.
True if the ray hit a edge.
The faces index
THe faces edge
A face where all compents are null index.
Are these faces equal.
Are these faces not equal.
Are these objects equal.
Are these faces equal.
The faces hash code.
Enmerate all edges in this edge loop.
The mesh the edges belong too.
The next edge
Enmerate all vertices in this edge loop.
The mesh the edges belong too.
The next vertex
https://github.com/caosdoar/spheres/blob/master/src/spheres.cpp
https://github.com/mrdoob/three.js/tree/dev/src/geometries
Is the edge a border to a hole.
The edges index.
The edges source vertices index.
The edges target vertices index.
The edges opposite edge.
The edges next edge.
The edges previous edge.
The edges face
A edge where everthing is set to null index.
Get the source point.
The mesh the point belongs to.
The source point
If point is null index.
Get the target point.
The mesh the point belongs to.
The target point
If point is null index.
Are these edges equal.
Are these edges not equal.
Are these objects equal.
Are these edges equal.
The edges hahe code
Enmerate all edges in this edge loop.
The mesh the edges belong too.
The next edge
Enmerate all vertices in this edge loop.
The mesh the edges belong too.
The next vertex
The vertices point.
The vertices degree is how mang edges connect to it.
The vertices index.
The vertices edge
A vertex where all components are null.
Are these vertices equal.
Are these vertices not equal.
Are these objects equal.
Are these vertices equal.
The vertices hash code
Enmerate all edges surrounding the vertex.
The mesh the edges belong too.
The next edge
Generic nef polyhedron definition.
A 3D Nef polyhedron is a subset of the 3-dimensional space that is the result of forming
complements and intersections starting from a finite set H of 3-dimensional halfspaces.
Nef polyhedra are closed under all binary set operations, i.e., intersection, union,
difference, complement, and under the topological operations boundary, closure, and interior.
The kernel type.
creates a Nef polyhedron and initializes it to the empty
set if plane == EMPTY and to the whole space if space == COMPLETE.
The nef's space
creates a Nef polyhedron containing the halfspace on the
negative side of plane including plane if boundary==INCLUDED,
excluding plane if boundary==EXCLUDED.
The plane.
The boundary.
creates a Nef polyhedron, which represents the same point
set as the polyhedral surface.
The polyhedron
Create from a pointer.
The polyhedrons pointer.
The nef polyhdron as a string.
The nef polyhedron as a string.
Return the intersection of nef and nef1.
Return the union of nef and nef1.
Return the difference between nef and nef1.
Return the symmetric difference of nef and nef1.
Returns the complement of nef.
Returns the interior of nef.
Returns the boundary of nef.
Returns the closure of nef.
Returns the regularization, i.e. the closure of the interior, of nef.
Returns the MinkowskiSum.
Converts nef into a Polyhedron.
nef must be simple to convert.
The result of the conversion.
True if nef is simple and the conversion was successful.
Converts nef into a surface mesh.
nef must be simple to convert.
The result of the conversion.
True if nef is simple and the conversion was successful.
Get a list of the nef volumes.
Get a list of the nef volumes.
The abstract nef polyhedra definition.
Default constructor.
creates a Nef polyhedron and initializes it to the empty
set if plane == EMPTY and to the whole space if space == COMPLETE.
The polyhedron kernel.
The nef's space
creates a Nef polyhedron containing the halfspace on the
negative side of plane including plane if boundary==INCLUDED,
excluding plane if boundary==EXCLUDED.
The polyhedron kernel.
The plane.
The boundary.
creates a Nef polyhedron, which represents the same point
set as the polyhedral surface.
The polyhedron kernel.
The polyhedron
Construct with a new kernel.
The polyhedron kernel.
The polyhedrons pointer.
The polyhedron kernel.
Contains the functions to the unmanaged CGAL polhedron.
Return the number of halfedge pairs.
Return the number of halfedges.
Return the number of faces.
Return the number of vertices.
Return the number of volumes.
Returns true, if nef is the empty point set.
Rreturns true, if nef is a 2-manifold.
Returns true, if nef is the complete 3D space.
Make nef the empty set if space == EMPTY and the complete
3D space if space == COMPLETE.
Checks the integrity of nef.
Decompose the nef into convex volumes.
Print the nef polyhedron into a string builder.
Release the unmanaged pointer.
Should the input polygon be checked.
Can disable for better performance if
it is know all input if valid.
Check if the mesh is valid.
The mesh to check.
Check if the mesh is valid.
The mesh to check.
Check if the mesh is a valid triangle mesh.
The mesh to check.
Check if the mesh is a valid triangle mesh.
The mesh to check.
Check if the mesh is a valid closed mesh.
The mesh to check.
Check if the mesh is a valid closed mesh.
The polygon to check.
Check if the mesh is a valid triangle mesh.
The mesh to check.
Check if the mesh is a valid triangle mesh.
The mesh to check.
A polyhedral surface consists of vertices, edges,
facets and an incidence relation on them.
Each edge is represented by two halfedges with opposite orientations.
The kernel type.
Default constructor.
Construct from points and triangle indices.
Construct from points and polygon indices.
Create from a pointer.
The meshs pointer.
The polyhdron as a string.
The mesh as a string.
Create a deep copy of the mesh.
A deep copy of the mesh.
Subdive the mesh.
The number of iterations to perfrom.
The subdivision method.
Simplify the polyhedra.
A number between 0-1 that represents the percentage of vertices to remove.
Refines a triangle mesh
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices.
Orient the faces in the mesh.
The orientation method.
Reverses the orientation of the vertices in each face.
Split the mesh into its unconnected components.
Each unconnect component as a new mesh.
Remove all unconnected compontents except the largest.
Largest is defined by the face count.
The numbero of largest components to keep.
The number of components removed in the mesh.
Create a mesh consisting of one polygon face.
The faces polygon.
Should the y coord of the points be used for the z coord.
Thrown if the polygon is not simple.
Create the dual mesh where each face becomes a vertex
and each vertex becomes a face.
Must be a valid closed mesh to create the dual.
The duel mesh.
Is thrown if the mesh is not a valid closed mesh.
Convert to a surface mesh.
The surface mesh.
Find the min, max and average edge lengths in the mesh
The min, max and average edge lengths in the mesh.
Find the min, max and average face areas in the mesh
The min, max and average face areas in the mesh.
Locate the face the rays hits.
The ray.
The hit result.
Find the face closest to the point.
The point.
The hit result.
The abstract polyhedra definition.
Cached values found by running Update.
Default constructor.
Construct with a new kernel.
The mesh kernel.
Construct with a new kernel.
The mesh kernel.
The meshs pointer.
The mesh kernel.
Contains the functions to the unmanaged CGAL polhedron.
Number of vertices.
Number of faces.
Number of half edges.
Number of border edges.
Since each border edge of a polyhedral surface has exactly one
border halfedge, this number is equal to size of border halfedges.
Number of border halfedges.
The current build stamp.
Returns true if the polyhedral surface is combinatorially consistent.
Must be a valid mesh to check many other properties.
Returns true if there are no border edges.
Returns true if all faces are triangles.
Returns true if all faces are quads.
Is the mesh a valid triangle mesh.
Is the mesh a valid closed mesh.
Is the mesh a valid closed triangle mesh.
Has the update function been called.
Mark th mesh as needing to be updated.
Clear the mesh.
Clear the index maps.
The index maps are used to access the meshes elemnts by index.
They are automaticaly created when a elements is accessed
be a function requiring it.
True to clear the vertex index map.
True to clear the face index map.
True to clear the edges index map.
Clear the normal maps.
True to clear the vertex normal map.
True to clear the face normal map
Builds the vertex and/or face index maps if needed.
True to build the vertex index map.
True to build the face index map.
True to build the face index map.
True to force the build even if already built.
A tetrahedron is added to the polyhedral surface
with its vertices initialized to p1, p2, p3, and p4.
A edge in the tetrahdron.
A triangle with border edges is added to the
polyhedral surface with its vertices initialized to p1, p2, and p3.
A edge in the triangle.
Create a mesh from the points and indices.
The meshes points.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Create a triangle mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a quad mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a mesh with quads and triangles.
The meshes points.
The point array length.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Create a mesh with riangles, quads, pentagons and hexagons.
The meshs points.
The length of the point array.
The faces indices.
Create a mesh consisting of one polygon face.
The faces points
The point array length.
Should the y coord of the points be used for the z coord.
Get the triangle and quad indices.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Get the meshes triangles.
The meshes triangles.
The triangle array length.
Get the meshes quads.
The meshes quads.
The quads array length.
Get the meshes triangles and quads.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Get the meshes triangles, quads, pentagons and hexagons.
The indices.
Get the dual meshes triangles, quads, pentagons and hexagons.
A dual mesh is were faces become vertices and vertices become faces.
The indices
Array accessor for the polygon.
Getting a point wraps around the polygon.
The points index.
The vertices point.
Get the vertices point.
The vertex index in the mesh.
The vertices point.
If index is out of range.
Get the point at the index
and wrap around the polygon.
The points index.
The point at the index.
Get the point at the index
and clamp to the polygons last point.
The points index.
The point at the index.
Get the vertices point but wraps the index.
The vertex index in the mesh.
The vertices point.
Get the points in the mesh.
The array to copy points into.
The point array length.
Set the point at the index.
The points index
The pointsam>
If index is out of range.
Set the points from a array.
The point array.
The point arrays length.
Get a halfedges segment.
The halfedges index.
The segment.
True if halfedge found.
Get the segment.
The segment index.
The segment
If segmentwith the index not found.
Get a segment for each halfedge in the mesh.
The segment array.
The segment array length.
Get the faces triangle.
Presumes face is a triangle with no checks.
The faces index.
The faces triangle
Get the triangle.
The triangle index.
The triangle
If triangle with the index not found.
Get a triangle for each face in the mesh.
Presumes all faces are triangles with no checks.
The trainagle array.
The traingle arrays length.
Get the mesh vertex.
The vertices index.
The vertex.
True if the vertex was found.
Get the mesh vertex.
The vertexs index.
The vertexs
If vertex with the index not found.
Get the vertices in the mesh.
The vertex array.
The vertex array length.
Get the mesh face.
The faces index.
The face.
True if the face was found.
Get the mesh face.
The faces index.
The faces
If face with the index not found.
Get the faces in the mesh.
The face array.
The face array length.
Get the mesh halfedge.
The halfedges index.
The halfedge.
True if the halfedge was found.
Get the mesh Halfedge.
The Halfedges index.
The Halfedges
If Halfedge with the index not found.
Get the halfedges in the mesh.
The halfedge array.
The halfedge array length.
Count the number of triangles, quads and polygons in the mesh.
The number of triangles, quads and polygons in the mesh.
Count the number of triangles, quads and polygons in the dual mesh.
A dual mesh is were faces become vertices and vertices become faces.
The number of triangles, quads and polygons in the mesh.
Get a centroid (the avergae face position) for each face in the mesh.
The point array.
The points arrays lemgth.
Computes the vertex normals if needed.
Computes the face normals if needed.
Get the vertex normals.
The normals array.
The normals array length.
Get the face normals.
The normals array.
The normals array length.
Translate each point in the mesh.
The amount to translate.
Rotate each point in the mesh.
The amount to rotate.
Scale each point in the mesh.
The amount to scale.
Transform each point in the mesh.
The amount to translate.
The amount to rotate.
The amount to scale.
Make all faces triangles.
sorts halfedges such that the non-border edges precede the border edges.
For each border edge the halfedge iterator will reference the halfedge
incident to the facet right before the halfedge incident to the hole.
returns true if the border halfedges are in normalized representation,
which is when enumerating all halfedges with the iterator:
The non-border edges precede the border edges and for border edges,
the second halfedge is the border halfedge.
Find what side of the mesh the lies in.
The point to check.
ON_BOUNDED_SIDE if point inside mesh,
ON_UNBOUNDED_SIDE if point not inside,
ON_BOUNDARY if point is on the surface.
Does the mesh contain the point.
The point.
If point is on the boundary does it count a being contained.
True if the poly contains the point
Locate the face the rays hits.
The ray.
The hit result.
Find the face closest to the point.
The point.
The hit result.
Locate the face hit by the ray.
The ray.
The hit face.
True if the ray hit a face.
Locate the vertex hit by the ray.
The ray.
The distance the vertex has to be within hit point.
The hit vertex.
True if the ray hit a vertex.
Locate the edge hit by the ray.
The ray.
The distance the edge has to be within hit point.
The hit edge.
True if the ray hit a edge.
Tests if a set of faces of a triangulated surface mesh self-intersects.
Must be a triangle mesh.
True/Fasle if a valid triangle polyhedra,or UNDETERMINED if not.
returns true if the polyhedral surface is combinatorially consistent.
For level == 1 the normalization of the border edges is checked too.
This method checks that each face is at least a triangle and that the
two incident facets of a non-border edge are distinct.
Computes the bounding box.
The bounding box.
Computes the area of a range of faces
of a given triangulated surface mesh.
The area or 0 if poyhedron is not valid triangle mesh.
computes the centroid of a volume bounded
by a closed triangulated surface mesh.
The centroid or 0 if poyhedron is not valid.
Computes the volume of the domain bounded by a
closed triangulated surface mesh.
The volume or 0 if poyhedron is not valid closed triangle mesh.
Returns true if there are no border edges.
True/Fasle if valid, or UNDETERMINED if not a valid polyhedra.
Returns true if all vertices have exactly two incident edges.
True/Fasle if valid, or UNDETERMINED if not a valid polyhedra.
Returns true if all vertices have exactly three incident edges.
True/Fasle if valid, or UNDETERMINED if not a valid polyhedra.
Returns true if all faces are triangles.
True/Fasle if valid, or UNDETERMINED if not a valid polyhedra.
Returns true if all faces are quads.
True/Fasle if valid, or UNDETERMINED if not a valid polyhedra.
Indicates if the mesh bounds a volume.
Must be a closed and triangulated.
True/Fasle if a valid triangle closed polyhedra,or UNDETERMINED if not.
Builds the aabb tree used for location.
Tree will be automatically built if need so not
actually necessary to call this function.
Will delete the aabb tree.
Returns true if there exists a face of this poly and
a face of other poly which intersect, and false otherwise.
Must be a triangle mesh
The other triangle poly.
If test_bounded_sides is set to true,
the overlap of bounded sides are tested as well. In that case, the meshes must be closed.
True/Fasle if a valid triangle closed polyhedra,or UNDETERMINED if not.
Subdive the mesh.
The number of iterations to perfrom.
The subdivision method.
Simplify the polyhedra.
A number between 0-1 that represents the percentage of vertices to remove.
Refines a triangle mesh
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices.
Orient the faces in the mesh.
The orientation method.
Reverses the orientation of the vertices in each face.
Remove all unconnected compontents except the largest.
Largest is defined by the face count.
The numbero of largest components to keep.
The number of components removed in the mesh.
Find the min, max and average edge lengths in the mesh
The min, max and average edge lengths in the mesh.
Find the min, max and average face areas in the mesh
The min, max and average face areas in the mesh.
Enumerate all points in the mesh.
Each point in mesh.
Enumerate all points in the mesh.
Each point in mesh.
Read data from a off file into the pollyhedron.
The files name.
Write data from a off file into the pollyhedron.
The files name.
Return all the points in the mesh in a array.
The array.
Return all the points in the mesh in a list.
The list.
https://doc.cgal.org/latest/Polyhedron/classCGAL_1_1Polyhedron__3.html#a73119c0c90bf8612da003305af25a52a
creates a new facet within the hole incident to h and g by connecting the
vertex denoted by g with the vertex denoted by h with a new halfedge and
filling this separated part of the hole with a new facet, such that the
new facet is incident to g.
Precondition
h->is_border(), g->is_border(), h != g, h->next() != g,
and g can be reached along the same hole starting with h.
a halfedge index
a halfedge index
Returns the halfedge of the new edge that is incident to the new facet.
creates a new facet within the hole incident to h and g by connecting the
tip of g with the tip of h with two new halfedges and a new vertex and
filling this separated part of the hole with a new facet, such that the
new facet is incident to g.
Precondition
h->is_border(), g->is_border(), h != g, and g can be reached along the same hole starting with h.
a halfedge index
a halfedge index
Returns the halfedge of the new edge that is incident to the new facet and the new vertex.
barycentric triangulation of h->facet().
Creates a new vertex, a copy of h->vertex(), and connects it to each vertex incident
to h->facet() splitting h->facet() into triangles.h remains incident to the original
facet, all other triangles are copies of this facet.
Precondition
h is not a border halfedge.
a halfedge index
Returns the halfedge h->next()
after the operation, i.e., a halfedge pointing to the new vertex.The time is
proportional to the size of the facet.
reverses create_center_vertex().
Erases the vertex pointed to by g and all incident halfedges thereby merging all
incident facets.Only g->facet() remains. The neighborhood of g->vertex() may not
be triangulated, it can have larger facets.
Precondition
None of the incident facets of g->vertex() is a hole. There are at least two distinct facets incident to the facets that are incident to g->vertex(). (This prevents the operation from collapsing a volume into two facets glued together with opposite orientations, such as would happen with any vertex of a tetrahedron.)
Supports_removal must be CGAL::Tag_true.
a halfedge index
Returns the halfedge g->prev().
Thus, the invariant h == erase_center_vertex(create_center_vertex(h))
holds if h is not a border halfedge.The time is proportional to the sum of the size of all incident facets.
removes the incident facet of h and changes all halfedges incident to the facet
into border edges or removes them from the polyhedral surface if they were already border edges.
If this creates isolated vertices they get removed as well.See make_hole(h) for a more specialized variant.
Precondition
h->is_border() == false.
Supports_removal must be CGAL::Tag_true
a halfedge index
Erase a facet.
a halfedge index
returns a range of handles over the facets.
fills a hole with a newly created facet.
Makes all border halfedges of the hole denoted
by h incident to the new facet.Returns h.
Precondition
h.is_border().
a halfedge index
performs an edge flip.
Precondition
h != Halfedge_handle() and both facets incident to h are triangles.
a halfedge index
It returns h after rotating the edge h one vertex in the direction of the face orientation.
joins the two facets incident to h.
The facet incident to h->opposite() gets removed.Both facets might be holes.
Precondition
The degree of both vertices incident to h is at least three(no antennas).
Supports_removal must be CGAL::Tag_true.
a halfedge index
Returns the predecessor of h around the facet. The invariant join_facet(split_facet(h, g))
returns h and keeps the polyhedron unchanged.The time is proportional to the size of
the facet removed and the time to compute h->prev().
glues the boundary of the two facets denoted by h and g together and returns h.
Both facets and the vertices along the facet denoted by g gets removed.Both facets may be holes.
The invariant join_loop(h, split_loop(h, i, j))
Precondition
The facets denoted by h and g are different and have equal degree(i.e., number of edges).
Supports_removal must be CGAL::Tag_true.
a halfedge index
a halfedge index
returns h and keeps the polyhedron unchanged.
joins the two vertices incident to h.
The vertex denoted by h->opposite() gets removed.
Precondition
The size of both facets incident to h is at least four(no multi-edges).
Supports_removal must be CGAL::Tag_true.
a halfedge index
Returns the predecessor of h around the vertex, i.e.,
h->opposite()->prev(). The invariant join_vertex(split_vertex(h, g))
returns h and keeps the polyhedron unchanged.The time is proportional
to the degree of the vertex removed and the time to compute h->prev() and h->opposite()->prev().
removes the incident facet of h and changes all halfedges incident to the facet into border edges.
Precondition
None of the incident halfedges of the facet is a border edge.
Supports_removal must be CGAL::Tag_true.
a halfedge index
Returns h.See erase_facet(h) for a more generalized variant.
splits the halfedge h into two halfedges inserting a new vertex that is a copy of h->opposite()->vertex().
Is equivalent to split_vertex(h->prev(), h->opposite())->opposite(). The call of prev() can make this method
slower than a direct call of split_vertex() if the previous halfedge is already known and computing
it would be costly when the halfedge data structure does not support the prev() member function.
a halfedge index
Returns the new halfedge now pointing to the inserted vertex.The new halfedge is followed
by the old halfedge, i.e., hnew->next() == h.
splits the facet incident to h and g into two facets with a new diagonal between
the two vertices denoted by h and g respectively.
The second(new) facet is a copy of the first facet.
Precondition
h and g are incident to the same facet.h != g (no loops). h->next() != g and g->next() != h (no multi-edges).
a halfedge index
a halfedge index
Returns h->next() after the
operation, i.e., the new diagonal.The new face is to the right of the new diagonal,
the old face is to the left.The time is proportional to the distance from h to g around the facet.
cuts the polyhedron into two parts along the cycle (h,i,j) (edge j runs on the backside of the three dimensional figure above).
Three new vertices(one copy for each vertex in the cycle) and three new halfedges(one copy for each halfedge in the cycle),
and two new triangles are created.h,i,j will be incident to the first new triangle.
Precondition
h, i, j denote distinct, consecutive vertices of the polyhedron and form a cycle: i.e., h->vertex() == i->opposite()->vertex(),
… , j->vertex() == h->opposite()->vertex(). The six facets incident to(h, i, j) are all distinct.
a halfedge index
a halfedge index
a halfedge index
The return value will be the halfedge
incident to the second new triangle which is the copy of h-opposite().
splits the vertex incident to h and g into two vertices, the old vertex remains and a
new copy is created, and connects them with a new edge.
Let hnew be h->next()->opposite() after the split, i.e., a halfedge of the new edge.
The split regroups the halfedges around the two vertices.The halfedge sequence hnew,
g->next()->opposite(), … , h remains around the old vertex, while the halfedge
sequence hnew->opposite(), h->next()->opposite() (before the split), … , g is
regrouped around the new vertex.
Precondition
h and g are incident to the same vertex. h != g (antennas are not allowed).
a halfedge index
a halfedge index
The split returns hnew, i.e., the new halfedge
incident to the old vertex.The time is proportional to the distance from h to
g around the vertex.
Update the mesh if needed.
Print the mesh into a string builder.
Release the unmanaged pointer.
This class is a data structure that can be used as halfedge data structure.
It is an alternative to the classes Polyhedron3.The main difference is that it is indexed based and not pointer based,
and that the mechanism for adding information to vertices, halfedges, edges, and faces is much simpler.
When elements are removed, they are only marked as removed, and a garbage collection function must be called to really remove them.
The kernel type
Default constructor.
Construct from points and triangle indices.
Construct from points and polygon indices.
Create from a pointer.
The surface meshes pointer.
The mesh as a string.
The mesh as a string.
Create a deep copy of the mesh.
The deep copy.
Subdive the mesh.
The number of iterations to perfrom.
The subdivision method.
Simplify the polyhedra.
A number between 0-1 that represents the percentage of vertices to remove.
Refines a triangle mesh
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices.
Orient the faces in the mesh.
The orientation method.
Reverses the orientation of the vertices in each face.
Split the mesh into its unconnected components.
Each unconnect component as a new mesh.
Remove all unconnected compontents except the largest.
Largest is defined by the face count.
The numbero of largest components to keep.
The number of components removed in the mesh.
Copy the other mesh to this one.
Create a mesh consisting of one polygon face.
The faces polygon.
Should the y coord of the points be used for the z coord.
Thrown if the polygon is not simple.
Convert to a polyhedron mesh.
The polyhedron mesh.
Find the min, max and average edge lengths in the mesh
The min, max and average edge lengths in the mesh.
Find the min, max and average face areas in the mesh
The min, max and average face areas in the mesh.
Locate the face the rays hits.
The ray.
The hit result.
Find the face closest to the point.
The point.
The hit result.
The surface mesh abstract base class.
Cached values found by running Update.
Default constructor.
Construct mesh with the kernel.
The kernel
Construct with a new kernel.
The surface meshes kernel.
The surface meshes pointer.
The meshes kernel type.
The number of vertices in the mesh.
The number of half edges in the mesh.
The number of edges in the mesh.
The number of faces in the mesh.
The number of border edges.
The current build stamp.
The number of vertices currenly maked to be removed
but have not. Calling collect garbage will remove them.
The number of vertices marked to be removed.
The number of halfedges currenly maked to be removed
but have not. Calling collect garbage will remove them.
The number of half edges marked to be removed.
The number of edges currenly maked to be removed
but have not. Calling collect garbage will remove them.
The number of edges marked to be removed.
The number of faces currenly maked to be removed
but have not. Calling collect garbage will remove them.
The number of face marked to be removed.
Returns true if the meshl surface is combinatorially consistent.
Must be a valid mesh to check many other properties.
Returns true if there are no border edges.
Returns true if all faces are triangles.
Returns true if all faces are quads.
Is the mesh a valid triangle mesh.
Is the mesh a valid closed mesh.
Is the mesh a valid closed triangle mesh.
Has the update function been called.
Mark the mesh as needing to be updated.
Clear the mesh.
Clear the index maps.
The index maps are used to access the meshes elemnts by index.
They are automaticaly created when a elements is accessed
be a function requiring it.
True to clear the vertex index map.
True to clear the face index map.
True to clear the edges index map.
True to clear the halfedges index map.
Clear the normal maps.
True to clear the vertex normal map.
True to clear the face normal map
Clear the property maps.
Build the index maps.
The index maps are used to access the meshes elemnts by index.
They are automaticaly created when a elements is accessed
be a function requiring it but can be create ahead of time.
True to build the vertex index maps.
True to build the face index maps.
True to build the edge index maps.
True to build the halfedge index maps.
The index maps wont be build if the mesh knows they are already built and upto date.
Setting force to true will build them always.
Adds a vertex to the mesh.
The vertices position
The vertices index in the mesh.
Adds a edge between the two vertices.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the edge in the mesh.
Adds a triangle face to the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the face in the mesh.
Adds a quad face to the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the face in the mesh.
Adds a pentagon face to the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the face in the mesh.
Adds a hexagon face to the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the vertex in the mesh.
The index of the face in the mesh.
Add a polygon face to the mesh.
The indices of the points in the mesm.
The indices array length.
The index of the face in the mesh.
Checks if any vertices, halfedges, edges, or faces are marked as removed.
Really removes vertices, halfedges, edges, and faces which are marked removed.
By garbage collecting elements get new indices. In case you store indices in an
auxiliary data structure or in a property these indices are potentially no
longer refering to the right elements.
Controls the recycling or not of simplices previously marked as removed
upon addition of new elements.
When set to true (default value), new elements are first picked in the
garbage(if any) while if set to false only new elements are created.
Array accessor for the polygon.
Getting a point wraps around the polygon.
Get the vertices point.
The vertex index in the mesh.
The vertices point.
If index is out of range.
Get the points in the mesh.
The array to copy points into.
The point array length.
Set the point at the index.
The points index
The pointsam>
If index is out of range.
Set the points from a array.
The point array.
The point arrays length.
Get a halfedges segment.
The halfedges index.
The segment.
True if halfedge found.
Get a segment for each halfedge in the mesh.
The segment array.
The segment array length.
Get the faces triangle.
Presumes face is a triangle with no checks.
The faces index.
The faces triangle
Get a triangle for each face in the mesh.
Presumes all faces are triangles with no checks.
The trainagle array.
The traingle arrays length.
Get the mesh vertex.
The vertices index.
The vertex.
True if the vertex was found.
Get the mesh vertex.
The vertices index.
The vertex.
Get the vertices in the mesh.
The vertex array.
The vertex array length.
Get the mesh face.
The faces index.
The face.
True if the face was found.
Get the mesh face.
The faces index.
The face.
Get the faces in the mesh.
The face array.
The face array length.
Get the mesh halfedge.
The halfedges index.
The halfedge.
True if the halfedge was found.
Get the mesh halfedge.
The halfedges index.
THe healfedge.
Get the halfedges in the mesh.
The halfedge array.
The halfedge array length.
Returns the number of incident halfedges of vertex.
The index of the vertex in the mesh.
Returns the number of incident halfedges of vertex.
Returns the number of incident halfedges of face.
The index of the face in the mesh.
Returns the number of incident halfedges of face.
Returns whether vertex is isolated.
The index of the vertex in the mesh.
Returns whether vertex is isolated.
Returns whether vertex is a border vertex.
If the data contained in the Surface_mesh is not
a 2-manifold, then this operation is not
guaranteed to return the right result.
he index of the vertex in the mesh.
With the default value for
check_all_incident_halfedges the function iteratates over the incident
halfedges. With check_all_incident_halfedges == false the function
returns true, if the incident halfedge associated to vertex is a
border halfedge, or if the vertex is isolated.
Returns whether vertex is a border vertex.
Returns whether edge is a border edge, i.e., if any of its two halfedges is a border halfedge.
The index of the edge in the mesh.
Returns whether edge is a border edge.
Returns the next halfedge within the incident face.
The index of the halfedge in the mesh.
Returns the next halfedge within the incident face.
Returns the previous halfedge within the incident face.
The index of the halfedge in the mesh.
Returns the previous halfedge within the incident face.
Returns the opposite halfedge of halfedge.
The index of the halfedge in the mesh.
Returns the opposite halfedge of halfedge.
Returns the vertex the halfedge emanates from.
The index of the halfedge in the mesh.
Returns the vertex the halfedge emanates from.
Returns the vertex the halfedge points to.
The index of the halfedge in the mesh.
Returns the vertex the halfedge points to.
Removes vertex from the halfedge data structure without adjusting anything.
The index of the vertex in the mesh.
True if face removed.
Removes the two halfedges corresponding to edge from the halfedge
data structure without adjusting anything.
The index of the edge in the mesh.
True if face removed.
Removes face from the halfedge data structure without adjusting anything.
The index of the face in the mesh.
True if face removed.
Has this vertex been marked to be removed.
The vertices index in the mesh.
Has this vertex been marked to be removed.
Has this face been marked to be removed.
The faces index in the mesh.
Has this face been marked to be removed.
Has this halfedge been marked to be removed.
The halfedge index in the mesh.
Has this halfedge been marked to be removed.
Has this edge been marked to be removed.
The edges index in the mesh.
Has this edge been marked to be removed.
Performs a validity check on a single vertex.
The index of the vertex in the mesh.
True if valid.
Performs a validity check on a single edge.
The index of the edge in the mesh.
True if valid.
Performs a validity check on a single halfedge.
The index of the halfedge in the mesh.
True if valid.
Performs a validity check on a single face.
The index of the face in the mesh.
True if valid.
Translate each point in the mesh.
The amount to translate.
Rotate each point in the mesh.
The amount to rotate.
Scale each point in the mesh.
The amount to scale.
Transform each point in the mesh.
The amount to translate.
The amount to rotate.
The amount to scale.
Create a mesh from the points and indices.
The meshes points.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Create a triangle mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a quad mesh from the points and indices.
The meshes points.
The point arrays length.
The meshes trinagles as a index array.
The indices array length.
Create a mesh with quads and triangles.
The meshes points.
The point array length.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Create a mesh with riangles, quads, pentagons and hexagons.
The meshs points.
The length of the point array.
The faces indices.
Create a mesh consisting of one polygon face.
The faces points
The paoint array length.
Should the y coord of the points be used for the z coord.
Get the triangle and quad indices.
The meshes triangles as a index array. Maybe null.
The meshes quads as a index array. Maybe null.
Get the meshes triangles.
The meshes triangles.
The triangle array length.
Get the meshes quads.
The meshes quads.
The quads array length.
Get the meshes triangles and quads.
The meshes triangles.
The triangle array length.
The meshes quads.
The quads array length.
Get the meshes triangles, quads, pentagons and hexagons.
The indices.
Whether v is a border vertex.
The vertices index.
With the default value for
check_all_incident_halfedges the function iteratates over the incident halfedges.
With check_all_incident_halfedges == false the function returns true,
if the incident halfedge associated to vertex v is a border halfedge,
or if the vertex is isolated.
Whether v is a border vertex.
Whether half edge is a border halfege, that is if its incident face is null.
The halfedges index.
Whether half edge is a border halfege.
Whether e is a border edge, i.e., if any of its two halfedges is a border halfedge.
The edges index.
Whether e is a border edge.
Count the number of triangles, quads and polygons in the mesh.
The number of triangles, quads and polygons in the mesh.
Count the number of triangles, quads and polygons in the dual mesh.
A dual mesh is were faces become vertices and vertices become faces.
The number of triangles, quads and polygons in the mesh.
Build the aabb tree.
Release the aabb tree.
Find the bounding box of the meshes points.
Read the mesh from a off file format.
The files name.
Write the mesh to off file format.
The files name.
Make all faces triangles.
Tests if a set of faces of a triangulated surface mesh self-intersects.
Must be a triangle mesh.
True/Fasle if a valid triangle mesh,or UNDETERMINED if not.
Perform an expensive validity check on the data structure.
If the mesh is valid.
Find if all the faces in the mesh are triangles.
True if all the faces in the mesh are triangles, Will be undetermined if no a valid mesh.
Find if all the faces in the mesh are quads.
True if all the faces in the mesh are quads, Will be undetermined if no a valid mesh.
Find if the mesh is closed, ie has no border edges.
Computes the area of a range of faces
of a given triangulated surface mesh.
The area or 0 if mesh is not valid triangle mesh.
computes the centroid of a volume bounded
by a closed triangulated surface mesh.
The centroid or 0 if mesh is not valid.
Computes the volume of the domain bounded by a
closed triangulated surface mesh.
The volume or 0 if mesh is not valid closed triangle mesh.
Indicates if the mesh bounds a volume.
Must be a closed and triangulated.
True/Fasle if a valid triangle closed mesh,or UNDETERMINED if not.
Find what side of the mesh the lies in.
The point to check.
ON_BOUNDED_SIDE if point inside mesh,
ON_UNBOUNDED_SIDE if point not inside,
ON_BOUNDARY if point is on the surface.
Does the mesh contain the point.
The point.
If point is on the boundary does it count a being contained.
True if the poly contains the point
Locate the face the rays hits.
The ray.
The hit result.
Find the face closest to the point.
The point.
The hit result.
Locate the face hit by the ray.
The ray.
The hit face.
True if the ray hit a face.
Locate the vertex hit by the ray.
The ray.
The distance the vertex has to be within hit point.
The hit vertex.
True if the ray hit a vertex.
Locate the edge hit by the ray.
The ray.
The distance the edge has to be within hit point.
The hit edge.
True if the ray hit a edge.
Returns true if there exists a face of this poly and
a face of other mesh which intersect, and false otherwise.
Must be a triangle mesh
The other triangle poly.
If test_bounded_sides is set to true,
the overlap of bounded sides are tested as well. In that case, the meshes must be closed.
True/Fasle if a valid triangle closed mesh,or UNDETERMINED if not.
Find the min, max and average edge lengths in the mesh
The min, max and average edge lengths in the mesh.
Find the min, max and average face areas in the mesh
The min, max and average face areas in the mesh.
Subdive the mesh.
The number of iterations to perfrom.
The subdivision method.
Simplify the polyhedra.
A number between 0-1 that represents the percentage of vertices to remove.
Refines a triangle mesh
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices.
Orient the faces in the mesh.
The orientation method.
Reverses the orientation of the vertices in each face.
Remove all unconnected compontents except the largest.
Largest is defined by the face count.
The numbero of largest components to keep.
The number of components removed in the mesh.
Get a centroid (the avergae face position) for each face in the mesh.
The point array.
The points arrays lemgth.
Compute the vertex normal map.
Will only be computed if mesh has
changed since last computation or
no current nomral maps have been computed.
Compute the face normal map.
Will only be computed if mesh has
changed since last computation or
no current nomral maps have been computed.
Get the vertex normals.
Will be compute if they have not aready.
The normal map array.
The normal maps array length.
Get the face normals.
Will be compute if they have not aready.
The normal map array.
The normal maps array length.
Enumerate all points in the mesh.
Each point in mesh.
Enumerate all points in the mesh.
Each point in mesh.
Return all the points in the mesh in a array.
The array.
Return all the points in the mesh in a list.
The list.
Update the mesh if needed.
Print the mesh into a string builder.
Release any unmanaged resources.
Generic polyline definition.
The kernel type.
Default constructor.
Create from a set of points.
The polylines points.
Create from a pointer.
The polylines pointer.
The polyline as a string.
The polyline as a string.
Copy the polyline.
The copied polyline.
Create a polygon from the line.
Threshold for the firat and last points being equal.
The polygon.
The abstract polyline definition.
Default constructor.
Construct with a new kernel.
The polyline kernel.
Construct with a new kernel.
The polyline kernel.
The points to construct from.
Construct with a new kernel.
The polyline kernel.
The polylines pointer.
The number of points in the polyline.
The capacity of the point array.
Get the first point.
Get the last point.
The polylines kernel.
Contains the functions to the unmanaged CGAL polyline.
Array accessor for the polyline.
Getting a point clamps to the last point in polyline.
Clear the polyline of all points.
Shrink the capacity to match the point count.
Resize the point array.
New elements will default to zero.
Reverse the polints in the line.
Remove the point at the index from the array.
The points index
Remove a range of points from the array.
The starting index
The number of points to remove.
Remove the last point.
Remove the point at the index from the array.
The points index.
The point to insert.
Remove a range of points from the array.
The points to insert.
The starting index.
The number of points to insert.
Add the point to the end of the poylline.
The point to add.
Does the first and last point match.
The distance threshold that counts as match.
Get the point a the index.
The points index to get.
The point at index.
Get the point at the index
and wrap around the polyline.
The points index.
The point at the index.
Get the point at the index
and clamp to the polylines last point.
The points index.
The point at the index.
Get all the points in the polyline.
The point array to copy the data into.
The array length.
Get all the polyline points.
The list to copy the data into.
Get all the polyline segments.
The segment array to copy the data into.
The array length.
Set the points at the index.
The points index.
The points value.
Set the points from the array.
If the array is larger than the polyline then
the new points will be appended to end of polyline.
The points array.
The array length.
Finds the length of the polyline.
Finds the square length of the polyline.
Translate the polyline.
The amount to translate.
Rotate the polyline.
The amount to rotate in radians.
Scale the polyline.
The amount to scale.
Transform the polyline with a TRS matrix.
The amount to translate.
The amount to rotate.
The amount to scale.
Enumerate all points in the polyline.
Each point in polyline.
Enumerate all points in the polyline.
Each point in polyline.
Return all the points in the polyline in a array.
The array.
Return all the points in the polyline in a list.
The list.
Convert the polyline to a new polyline with a different kernel.
May result in different values due to precision issues.
The new kernel type.
The new polline.
Print the polyline into a styring builder.
Release the unmanaged pointer.
Release the unmanaged pointer.
Generic polyline definition.
The kernel type.
Default constructor.
Create from a set of points.
The polylines points.
Create from a pointer.
The polylines pointer.
The polyline as a string.
The polyline as a string.
Copy the polyline.
The copied polyline.
The abstract polyline definition.
Default constructor.
Construct with a new kernel.
The polyline kernel.
Construct with a new kernel.
The polyline kernel.
The points to construct from.
Construct with a new kernel.
The polyline kernel.
The polylines pointer.
The number of points in the polyline.
The capacity of the point array.
Get the first point.
Get the last point.
The polylines kernel.
Contains the functions to the unmanaged CGAL polyline.
Array accessor for the polyline.
Getting a point clamps to the last point in polyline.
Clear the polyline of all points.
Shrink the capacity to match the point count.
Resize the point array.
New elements will default to zero.
Reverse the polints in the line.
Remove the point at the index from the array.
The points index
Remove a range of points from the array.
The starting index
The number of points to remove.
Remove the last point.
Remove the point at the index from the array.
The points index.
The point to insert.
Remove a range of points from the array.
The points to insert.
The starting index.
The number of points to insert.
Add the point to the end of the poylline.
The point to add.
Does the first and last point match.
The distance threshold that counts as match.
Get the point a the index.
The points index to get.
The point at index.
Get the point at the index
and wrap around the polyline.
The points index.
The point at the index.
Get the point at the index
and clamp to the polylines last point.
The points index.
The point at the index.
Get all the points in the polyline.
The point array to copy the data into.
The array length.
Get all the polyline points.
The list to copy the data into.
Get all the polyline segments.
The segment array to copy the data into.
The array length.
Set the points at the index.
The points index.
The points value.
Set the points from the array.
If the array is larger than the polyline then
the new points will be appended to end of polyline.
The points array.
The array length.
Finds the length of the polyline.
Finds the square length of the polyline.
Translate each point in the polyline.
The amount to translate.
Rotate each point in the polyline.
The amount to rotate.
Scale each point in the polyline.
The amount to scale.
Transform each point in the polyline.
The amount to translate.
The amount to rotate.
The amount to scale.
Enumerate all points in the polyline.
Each point in polyline.
Enumerate all points in the polyline.
Each point in polyline.
Return all the points in the polyline in a array.
The array.
Return all the points in the polyline in a list.
The list.
Convert the polyline to a new polyline with a different kernel.
May result in different values due to precision issues.
The new kernel type.
The new polline.
Print the polyline into a styring builder.
Release the unmanaged pointer.
Release the unmanaged pointer.
The heat method is an algorithm that solves the single- or multiple-source shortest
path problem by returning an approximation of the geodesic distance for all vertices
of a triangle mesh to the closest vertex in a given set of source vertices.
The geodesic distance between two vertices of a mesh is the distance when walking
on the surface, potentially through the interior of faces. Two vertices that are
close in 3D space may be far away on the surface.
Create a static instance.
Create a new instance.
Create a new instance from a existing pointer to a unmanaged object.
The unmanaged objects pointer.
Find the distances for each vertex in the mesh to the vertex at the provided index.
The mesh containing the vertices.
The vertices index to find the distances to.
The distances for each vertex in the mesh.
Should the intrinsitic delaunay triangulation be used.
This will improve the results for meshes that have bad triangle quality.
The maximum distance value.
Find the distances for each vertex in the mesh to the vertex at the provided index.
The mesh containing the vertices.
The vertices index to find the distances to.
The distances for each vertex in the mesh.
This will improve the results for meshes that have bad triangle quality.
The maximum distance value.
Create a new instance.
Create a new instance from a existing pointer to a unmanaged object.
The unmanaged objects pointer.
Release any unmanaged resources.
Returns the number of unconnect components in the mesh.
A valid mesh.
Returns the number of unconnect components in the mesh.
Returns a list of face indices that are part of the same component as the provided face index.
A valid mesh.
The faces index in the mesh.
A list of face indices that are part of the same component as the provided face index.
Returns a list of face indices that are part of the same component as the provided face index.
A valid mesh.
The faces index in the mesh.
A list of face indices that are part of the same component as the provided face index.
Split each component in the mesh into individual meshes.
A valid mesh.
The split meshes.
Split each component in the mesh into individual meshes.
A valid mesh.
The split meshes.
Removes connected components with less than a given number of faces.
A valid mesh.
The number of faces a component must have so that it is kept
The number of components removed.
Removes connected components with less than a given number of faces.
A valid mesh.
The number of faces a component must have so that it is kept
The number of components removed.
Removes the small connected components and all isolated vertices.
A valid mesh.
Keep this number of the largest connected components.
The number of components removed.
Removes the small connected components and all isolated vertices.
A valid mesh.
Keep this number of the largest connected components.
The number of components removed.
Release any unmanaged resources.
Detects the edges that are considered to be sharp with respect to the given angle bound.
A valid mesh.
Angle in deg gives the maximum angle between
the two normal vectors of adjacent triangles. For an edge of the input polygon mesh,
if the angle between the two normal vectors of its incident facets is bigger than
the given bound, then the edge is marked as being a feature edge.
The halfedge indices of the edges that count as sharp.
Detects the edges that are considered to be sharp with respect to the given angle bound.
A valid mesh.
Angle in deg gives the maximum angle between
the two normal vectors of adjacent triangles. For an edge of the input polygon mesh,
if the angle between the two normal vectors of its incident facets is bigger than
the given bound, then the edge is marked as being a feature edge.
The halfedge indices of the edges that count as sharp.
Find the min, max and average edge lengths in the mesh.
A valid mesh.
The min, max and average edge lengths in the mesh.
Find the min, max and average edge lengths in the mesh.
A valid mesh.
The min, max and average edge lengths in the mesh.
Find the min, max and average face areas in the mesh.
A valid mesh.
The min, max and average face areas in the mesh.
Find the min, max and average face areas in the mesh.
A valid mesh.
The min, max and average face areas in the mesh.
Detects the sharp edges of mesh according to angle as the DetectSharpEdges function does.
The sharp edges are then used to define a segmentation of a mesh, that is done by computing
a surface patch id for each face.
A valid mesh.
Angle in deg gives the maximum angle between
the two normal vectors of adjacent triangles. For an edge of the input polygon mesh,
if the angle between the two normal vectors of its incident facets is bigger than
the given bound, then the edge is marked as being a feature edge.
The halfedge indices of the edges that count as sharp.
The face indices for each patch found.
Detects the sharp edges of pmesh according to angle as the DetectSharpEdges function does.
The sharp edges are then used to define a segmentation of a mesh, that is done by computing
a surface patch id for each face.
A valid mesh.
Angle in deg gives the maximum angle between
the two normal vectors of adjacent triangles. For an edge of the input polygon mesh,
if the angle between the two normal vectors of its incident facets is bigger than
the given bound, then the edge is marked as being a feature edge.
The face indices for each patch found.
Release any unmanaged resources.
Find a random point on mesh surface.
The mesh.
A random point on mesh surface.
Find a random point on mesh surface.
The mesh.
A random point on mesh surface.
Find the face the ray intersects with.
The mesh.
Th ray.
The hit result with theface index, hit point and the barycentric coords.
Find the face the ray intersects with.
The mesh.
Th ray.
The hit result with theface index, hit point and the barycentric coords.
Find the closest face to the point.
The mesh.
Th point.
The hit result with the face index, closest point and the barycentric coords.
Find the closest face to the point.
The mesh.
Th point.
The hit result with the face index, closest point and the barycentric coords.
Release any unmanaged resources.
Fills output with a closed mesh bounding the volume swept by input when translating its vertices by dir.
The mesh is oriented so that the faces corresponding to input in output have the same orientation.
The a valid closed mesh.
The direction vector.
The extuded mesh.
Fills output with a closed mesh bounding the volume swept by input when translating its vertices by dir.
The mesh is oriented so that the faces corresponding to input in output have the same orientation.
The a valid closed mesh.
The direction vector.
The extuded mesh.
Fairs a region on a triangle mesh based on a ring of k vertices from the index vertex.
The points of the selected vertices are relocated to yield an as-smooth-as-possible surface patch,
based on solving a linear bi-Laplacian system with boundary constraints
The region described by vertices might contain multiple disconnected components.
Note that the mesh connectivity is not altered in any way, only vertex locations get updated.
Fairing might fail if fixed vertices, which are used as boundary conditions,
do not suffice to solve constructed linear system.
Note that if the vertex range to which fairing is applied contains all the vertices of the triangle mesh,
fairing does not fail, but the mesh gets shrinked to the origin.
A valid triangle mesh.
The vertex index in the mesh to start hthe k ring region from.
The number of vertics to expand the region to.
If the fairing was successfully run.
Refines a triangle mesh
A valid triangle mesh.
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices added.
Refines a triangle mesh
A valid triangle mesh.
a factor to control density of the output mesh,
where larger values lead to denser refinements. Defalus to sqrt of 2.
The number of new vertices added.
Remeshes a triangulated region of a meshgon mesh.
This operation sequentially performs edge splits, edge collapses, edge flips,
tangential relaxation and projection to the initial surface to generate
a smooth mesh with a prescribed edge length.
A valid triangle mesh.
The number of times to perform the remeshing.
the edge length that is targeted in the remeshed patch.
If 0 is passed then only the edge-flip, tangential relaxation, and projection steps will be done.
The number of new vertices added.
Remeshes a triangulated region of a meshgon mesh.
This operation sequentially performs edge splits, edge collapses, edge flips,
tangential relaxation and projection to the initial surface to generate
a smooth mesh with a prescribed edge length.
A valid triangle mesh.
The number of times to perform the remeshing.
the edge length that is targeted in the remeshed patch.
If 0 is passed then only the edge-flip, tangential relaxation, and projection steps will be done.
The number of new vertices added.
randomly perturbs the locations of vertices of a triangulated surface mesh.
By default, the vertices are re-projected onto the input surface after
perturbation.Note that no geometric checks are done after the perturbation
(face orientation might become incorrect and self-intersections might be introduced).
A mesh.
The maximun amount a vertex will be pertured. Must be greater tha 0.
randomly perturbs the locations of vertices of a triangulated surface mesh.
By default, the vertices are re-projected onto the input surface after
perturbation.Note that no geometric checks are done after the perturbation
(face orientation might become incorrect and self-intersections might be introduced).
A mesh.
The maximun amount a vertex will be pertured. Must be greater tha 0.
Smooths a triangulated mesh.
This function attempts to make the triangle angle and area distributions as uniform
as possible by moving(non-constrained) vertices.
Angle-based smoothing does not change the combinatorial information of the mesh.
Area-based smoothing might change the combinatorial information, unless specified otherwise.
It is also possible to make the smoothing algorithm "safer" by rejecting moves that,
when applied, would worsen the quality of the mesh, e.g.that would decrease the value
of the smallest angle around a vertex or create self-intersections.
Optionally, the points are reprojected after each iteration.
A valid triangle mesh.
The edge angle that counts a feature and wont be smoothed.
The number of iterations for the sequence of the smoothing iterations performed
splits the edges listed in edges into sub-edges that are not longer than the given threshold max_length.
Note this function is useful to split constrained edges before calling isotropic_remeshing() with protection
of constraints activated (to match the constrained edge length required by the remeshing algorithm to be guaranteed to terminate)
A valid mesh.
The edge length above which an edge from edges is split into to sub-edges
The number of new edges added to the mesh.
splits the edges listed in edges into sub-edges that are not longer than the given threshold max_length.
Note this function is useful to split constrained edges before calling isotropic_remeshing() with protection
of constraints activated (to match the constrained edge length required by the remeshing algorithm to be guaranteed to terminate)
A valid mesh.
The edge length above which an edge from edges is split into to sub-edges
The number of new edges added to the mesh.
Triangulate a single face in the mesh.
A valid mesh.
The faces index in the mesh.
True if successful.
Triangulate a single face in the mesh.
A valid mesh.
The faces index in the mesh.
True if successful.
Triangulate a range of faces in the mesh.
A valid mesh.
The faces to triangulate.
The length of the face array.
True if successful.
Triangulate a range of faces in the mesh.
A valid mesh.
The faces to triangulate.
The length of the face array.
True if successful.
Release any unmanaged resources.
Indicates if mesh bounds a volume.
A closed triangle mesh.
Indicates if mesh bounds a volume.
A closed triangle mesh.
Tests whether a closed triangle mesh has a positive orientation.
A closed triangle mesh is considered to have a positive orientation
if the normal vectors to all its faces point outside the domain bounded
by the triangle mesh.The normal vector to each face is chosen pointing
on the side of the face where its sequence of vertices is seen counterclockwise.
A closed triangle mesh.
Tests whether a closed triangle mesh has a positive orientation.
A closed triangle mesh is considered to have a positive orientation
if the normal vectors to all its faces point outside the domain bounded
by the triangle mesh.The normal vector to each face is chosen pointing
on the side of the face where its sequence of vertices is seen counterclockwise.
A closed triangle mesh.
Orient the faces in the mesh.
The orientation method.
A valid closed triangle mesh.
Orient the faces in the mesh.
The orientation method.
A valid closed triangle mesh.
Makes each connected component of a closed triangulated surface mesh inward or outward oriented.
A closed triangle mesh.
Makes each connected component of a closed triangulated surface mesh inward or outward oriented.
A closed triangle mesh.
Orients the connected components of tm to make it bound a volume.
A closed triangle mesh.
Orients the connected components of tm to make it bound a volume.
A closed triangle mesh.
Reverses for each face the order of the vertices along the face boundary.
A valid mesh.
Reverses for each face the order of the vertices along the face boundary.
A valid mesh.
Release any unmanaged resources.
Find the number of degenerate edges in the mesh.
The polygon mesh.
The number of degenerate edges in the mesh.
Find the number of degenerate faces in the mesh.
A triangle polygon mesh.
The number of degenerate faces in the mesh.
Find the number of degenerate faces in the mesh.
A triangle polygon mesh.
The number of degenerate faces in the mesh.
Checks whether a triangle face is needle.
A triangle is said to be a needle if its longest edge is much longer than its shortest edge.
A triangle polygon mesh.
A bound on the ratio of the longest edge length and the shortest edge length.
The number of needle triangles.
Checks whether a triangle face is needle.
A triangle is said to be a needle if its longest edge is much longer than its shortest edge.
A triangle polygon mesh.
A bound on the ratio of the longest edge length and the shortest edge length.
The number of needle triangles.
Collects the non-manifold vertices (if any) present in the mesh.
A non-manifold vertex v is returned via one incident halfedge h such that target(h, pm) = v
for all the umbrellas that v appears in (an umbrella being the set of faces incident to all
the halfedges reachable by walking around v using hnext = prev(opposite(h, pm), pm), starting from h).
A triangle polygon mesh.
The non manifold vertex count.
Collects the non-manifold vertices (if any) present in the mesh.
A non-manifold vertex v is returned via one incident halfedge h such that target(h, pm) = v
for all the umbrellas that v appears in (an umbrella being the set of faces incident to all
the halfedges reachable by walking around v using hnext = prev(opposite(h, pm), pm), starting from h).
A triangle polygon mesh.
The non manifold vertex count.
Cleans a given polygon soup through various repairing operations.
More precisely, this function carries out the following tasks, in the same order as they are listed:
merging of duplicate points.
simplification of polygons to remove geometrically identical consecutive vertices;
splitting of "pinched" polygons, that is polygons in which a geometric position appears more than once.
The splitting process results in multiple non-pinched polygons;
removal of invalid polygons, that is polygons with fewer than 2 vertices;
removal of duplicate polygons.
removal of isolated points.
The polygon mesh.
Cleans a given polygon soup through various repairing operations.
More precisely, this function carries out the following tasks, in the same order as they are listed:
merging of duplicate points.
simplification of polygons to remove geometrically identical consecutive vertices;
splitting of "pinched" polygons, that is polygons in which a geometric position appears more than once.
The splitting process results in multiple non-pinched polygons;
removal of invalid polygons, that is polygons with fewer than 2 vertices;
removal of duplicate polygons.
removal of isolated points.
The polygon mesh.
stitches together, whenever possible, two halfedges belonging to the same boundary cycle.
Two border halfedges h1 and h2 can be stitched if the points associated to the source and
target vertices of h1 are the same as those of the target and source vertices of h2, respectively.
The polygon mesh.
The number of stiched boundaries.
stitches together, whenever possible, two halfedges belonging to the same boundary cycle.
Two border halfedges h1 and h2 can be stitched if the points associated to the source and
target vertices of h1 are the same as those of the target and source vertices of h2, respectively.
The polygon mesh.
The number of stiched boundaries.
Stitches together border halfedges in a polygon mesh.
The polygon mesh.
The number of stiched borders.
Stitches together border halfedges in a polygon mesh.
The polygon mesh.
The number of stiched borders.
Removes the isolated vertices from any polygon mesh.
A vertex is considered isolated if it is not incident to any simplex of higher dimension.
The polygon mesh.
The number of vertices that were removed.
Removes the isolated vertices from any polygon mesh.
A vertex is considered isolated if it is not incident to any simplex of higher dimension.
The polygon mesh.
The number of vertices that were removed.
Release any unmanaged resources.
Find the line formed from the intersection of the plane and the mesh.
The mesh. Is not modified.
The plane.
The polylines from the intersection.
Find the line formed from the intersection of the plane and the mesh.
The mesh. Is not modified.
The plane.
The polylines from the intersection.
Find the lines formed by slicing the mesh from the start
point to the end point creating a plane at each increment.
The mesh. Is not modified.
The point to start from.
The point to end at.
Amount to increment each plane.
he polylines from the intersection.
Find the lines formed by slicing the mesh from the start
point to the end point creating a plane at each increment.
The mesh. Is not modified.
The point to start from.
The point to end at.
Amount to increment each plane.
he polylines from the intersection.
Release any unmanaged resources.
Simplify the mesh.
A valid triangle mesh.
A percentage 0-1 of edges to remove.
Simplify the mesh.
A valid triangle mesh.
A percentage 0-1 of edges to remove.
Release the unmanaged resourses.
Subdive each face in the mesh.
A valid mesh. Must be a triangle mesh for loop or sqrt3.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid mesh. Must be a triangle mesh for loop or sqrt3.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid triangle mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid triangle mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid triangle mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid triangle mesh.
The number of subdivision iterations.
Subdive each face in the mesh.
A valid triangle mesh.
The number of subdivision iterations.
Release the unmanaged resourses.
Base triangulation class for Triangulation, DelaunayTriangulation,
ConstrainedTriangulation and ConstrainedDelaunayTriangulation.
The triangulations kernel.
The number of verices in the triangulation.
The number of triangles in the triangulation.
The number of indices need to represent the
triangulation (number of triangles * 3).
A number that will change if the unmanaged
triangulation model changes.
Clear the triangulation.
Is this a valid triangulation.
True if valid.
Force the face and vertex indices to be set.
Inserts point p in the triangulation.
If point coincides with an already existing vertex the triangulation remains unchanged.
If point is on an edge, the two incident faces are split in two.
If point is strictly inside a face of the triangulation, the face is split in three.
If point is strictly outside the convex hull, p is linked to all visible points on the
convex hull to form the new triangulation.
The point to insert.
Inserts points into the triangulation.
If point coincides with an already existing vertex the triangulation remains unchanged.
If point is on an edge, the two incident faces are split in two.
If point is strictly inside a face of the triangulation, the face is split in three.
If point is strictly outside the convex hull, p is linked to all visible points on the
convex hull to form the new triangulation.
The points to insert.
The ararys length.
Get a array of all the points in the triangulation.
The point array.
The ararys length.
Get a array of the triangle indices.
The ararys length.
Get the vertices point.
The vertex index.
The vertices point.
True if the vertex was found.
Get the point.
The points index.
The point
If point with the index not found.
Get a vertex.
The vertex index.
The vertex.
True if the vertex was found.
Get the vertex.
The vertexs index.
The vertexs
If vertex with the index not found.
Get a array of all the vertices.
The vertex array.
The ararys length.
Get a triangule face.
The faces index
The face
True if the face was found.
Get the face.
The faces index.
The Faces
If face with the index not found.
Get a array of all the triangle faces.
A array of faces.
The ararys length.
Get the segment between the face and a neighbour.
The faces index
The neighbour (0-2) index in the face.
The segment.
True if the face was found.
Get the segment between the face and a neighbour.
The faces index
The neighbour (0-2) index in the face.
The segment
If segment with the index not found.
Get a faces triangle.
The faces index
The triangle
True if the face was found
Get the triangle.
The triangles index.
The triangle
If triangle with the index not found.
Get a array of all the triangles.
A array of triangules.
The ararys length.
Get a faces circumcenter.
The faces index
The circumcenter. A circle
that passes through all three of the triangules vertices.
True if the face was found.
Get the circumcenter.
The circumcenters index.
The circumcenter
If circumcenter with the index not found.
Get a array of all the circumcenters.
A array of circumcenters.
The ararys length.
Get the index of the faces neighbour.
The faces index.
The neighbour (0-2) index in the face.
The index of the neighbour face in the triangulation.
-1 if there is no neighbour face at this index.
Locate the face the point hits.
The point.
The face the point has hit.
True if the point hit a face.
Locate the closest vertex to point.
The point
The distance the point must be within to count as hitting the vertex.
The closest vertex.
True if point hit a face and found a vertex.
Locate the closest edge and segment to point.
The point
The distance the point must be within to count as hitting the edge.
The closest edge.
True if the point hit a face and found a edge.
Remove the vertex.
The vertices index.
True if removed.
Flip a edge between the face and a neighbour.
The faces index
The neighbour (0-2) index in the face.
True if the edge was flipped.
Translate the triangulation.
The amount to translate.
Rotate the triangulation.
The amount to rotate in radians.
Scale the triangulation.
The amount to scale.
Transform the triangulation with a TRS matrix.
The amount to translate.
The amount to rotate.
The amount to scale.
Release any unmanaged resources.
Base triangulation class for Triangulation, DelaunayTriangulation
and ConstrainedTriangulation.
The triangulations kernel.
Returns the buildStamp.
The build stamp will change if
the triangulation model has changed
Returns the dimension of the affine hull.
Returns the number of vertices.
Returns the number of finite vertices.
Returns the number of cells or 0 if Dimension less than 3.
The number of finite cells.
Returns 0 if Dimension less than 3.
The number of edges.
Returns 0 if Dimension less than 1.
The number of finite edges.
Returns 0 if Dimension less than 1.
The number of facets.
Returns 0 if Dimension less than 2.
The number of facets.
Returns 0 if Dimension less than 2.
The number of indices needed for the finite tetrahedrons.
Clear the triangulation.
Inserts the point p in the triangulation.
If point p coincides with an already existing vertex the triangulation remains unchanged.
If point p lies in the convex hull of the points, it is added naturally:
if it lies inside a cell, the cell is split into four cells, if it lies
on a facet, the two incident cells are split into three cells, if it lies
on an edge, all the cells incident to this edge are split into two cells.
If point p is strictly outside the convex hull but in the affine hull, p
is linked to all visible points on the convex hull to form the new triangulation.
If point p is outside the affine hull of the points, p is linked to all the points,
and the dimension of the triangulation is incremented. All the points now belong to
the boundary of the convex hull, so, the infinite vertex is linked to all the points
to triangulate the new infinite face.
The point to insert
Insert all the points in the array.
The points to insert.
The arrays length
Insert a vertex into a cell.
The cells index.
The point to insert.
If the point query lies inside the convex hull of the points, the cell that contains the query in its interior is returned.
If query lies on a facet, an edge or on a vertex, one of the cells having query on its boundary is returned.
If the point query lies outside the convex hull of the points, an infinite cell with vertices { p,q,r,∞} is
returned such that the tetrahedron(p, q, r, query) is positively oriented(the rest of the triangulation lies
on the other side of facet (p, q, r)).
Note that locate works even in degenerate dimensions: in dimension 2 (resp. 1, 0) the Cell_handle returned
is the one that represents the facet(resp.edge, vertex) containing the query point.
The optional argument start is used as a starting place for the search.
The optional argument could_lock_zone is used by the concurrency-safe version of the triangulation.When the
pointer is not null, the locate will try to lock all the cells along the walk. If it succeeds,
could_lock_zone is true, otherwise it is false. In any case, the locked cells are not unlocked by locate,
leaving this choice to the user.
The point to query
The cell thats closest to point.
The closest cell to point.
Get the centroids of each cell.
The array of points
The array of points length
Get all the points in the triangulation.
The array to copy into.
The arrays length.
Get all the points in the triangulation.
The array to copy into.
Get the triangulation vertices.
The vertex array.
The vertex array length.
Get a triangulation vertex.
The vertices index
The vertex.
Get the triangulation vertices.
The vertex array.
The vertex array length.
Get a triangulation vertex.
The vertices index
The vertex.
Get the indices of the cells edges in the triangulation.
The indices array.
The indices array length.
Get the indices of the cells triangles in the triangulation.
The indices array.
The indices array length.
Get the indices of the tetrahedron cells in the triangulation.
The indices array.
The indices array length.
Translate each point in the mesh.
The amount to translate.
Rotate each point in the mesh.
The amount to rotate.
Scale each point in the mesh.
The amount to scale.
Transform each point in the mesh.
The amount to translate.
The amount to rotate.
The amount to scale.
Release any unmanaged resources.
The generic constrained triangulation class.
The kernel
A static instance of the triangulation.
The triangulation as a string.
A deep copy of the triangulation.
The deep copy.
Compute the convex of the triagulation.
The convex hull polygon.
The abstract triangulation class.
The kernel with the functions unique to the constrained triangulation.
The number of constrainted edges in the triangulation.
Move the vertex.
The moved vertex
True if the vertex was found.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points and the edges as constraints into the triangulation.
Will retatin the poylgons edges.
The polygon to insert.
Insert the polygons points and the edges as constraints into the triangulation.
Will retatin the poylgons edges.
The polygon to insert.
Get the number of constrainted edges incident to this vertex.
The vertex index in the triagulation.
The number of constrainted edges to the vertex.
Does this vertex have a constrainted edge.
The vertex index in the triagulation.
Does this vertex have a constrainted edge.
Add a segment as a constraint.
The segment to add.
Add the two points as a segment constraint.
The segments point a.
The segments point b.
Add a list of segments as constraint to the triangulation.
The segment array.
The length of the segment array.
Get a array of all the constraint edges in the triangulation.
The edge array.
The ararys length.
Get a array of all the constraint segments in the triangulation.
The segment array.
The ararys length.
Get the constraints incident to the vertex.
The vertex index in the triangulation.
The array of edges.
The ararys length.
Remove a constraint between a face and its neighbour.
The faces index in the triangultion.
The neighbours index in the faces neighbour array between 0-2.
Remove all constraints incident to a vertex.
The vertex index in the triangulation.
Get the triangle indices for domain in the triangultion.
Used to triangulate polygons.
The indices.
The generic constrained triangulation class.
The kernel
A static instance of the triangulation.
The triangulation as a string.
A deep copy of the triangulation.
The deep copy.
Compute the convex of the triagulation.
The convex hull polygon.
The abstract triangulation class.
The kernel with the functions unique to the constrained triangulation.
The number of constrainted edges in the triangulation.
Move the vertex.
The moved vertex
True if the vertex was found.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points into the triangulation.
May not retain the poylgons edges.
Insert the polygons points and the edges as constraints into the triangulation.
Will retatin the poylgons edges.
The polygon to insert.
Insert the polygons points and the edges as constraints into the triangulation.
Will retatin the poylgons edges.
The polygon to insert.
Get the number of constrainted edges incident to this vertex.
The vertex index in the triagulation.
The number of constrainted edges to the vertex.
Does this vertex have a constrainted edge.
The vertex index in the triagulation.
Does this vertex have a constrainted edge.
Add a segment as a constraint.
The segment to add.
Add the two points as a segment constraint.
The segments point a.
The segments point b.
Add a list of segments as constraint to the triangulation.
The segment array.
The length of the segment array.
Get a array of all the constraint edges in the triangulation.
The edge array.
The ararys length.
Get a array of all the constraint segments in the triangulation.
The segment array.
The ararys length.
Get the constraints incident to the vertex.
The vertex index in the triangulation.
The array of edges.
The ararys length.
Remove a constraint between a face and its neighbour.
The faces index in the triangultion.
The neighbours index in the faces neighbour array between 0-2.
Remove all constraints incident to a vertex.
The vertex index in the triangulation.
Get the triangle indices for domain in the triangultion.
Used to triangulate polygons.
The indices.
The generic delaunay triangulation class.
The kerne
A static instance of the delaunay triangulation.
The triangulation as string.
A deep copy of the triangulation.
Insert the polygons points into the triangulation.
May not retatin the poylgons edges.
The polygon to insert.
Insert the polygons points into the triangulation.
May not retatin the poylgons edges.
The polygon to insert.
Compute the convex of the triagulation.
The convex hull polygon.
The anstract base class for the delaunay triangulation.
The kernel with the functions unique to the delaunay triangulation.
Move the vertex.
If there is not already another vertex placed on the point,
the triangulation is modified such that the new position of vertex same as point.
The moved vertex
True if the vertex was found.
If the dual voronoi diagram of the triangulation is taken
How many segments and rays would be produced.
The number of segments.
The number of rays.
Get a array of the voronoi's segments.
A array of the voronoi's segments.
Get a array of the voronois rays.
These are the segment at edge of triangulation that
a end point can not be determined.
A array of the voronoi's rays.
Generic triangulation class.
The kerel.
Static instance of a triangulation.
Default constructor.
Construct a triangulation from the points.
The triangulation points.
Construct from a existing triangulation.
A pointer to the unmanaged object.
The triangulation as a string.
Create a deep copy of the triangulation.
The deep copy.
Refine the triangulation.
The target edge lengths.
The number of iterations.
Compute the convex of the triagulation.
The convex hull polygon.
Abstract base class for the triagulation.
The kernel with the functions unique to the triangulation.
Move a vertex.
The vertices index.
The point to move to.
Should the vertex only be moved if there is no coliision.
If the vertex was moved.
Find the index of the nearest vertex to the point.
The point.
The index of the nearest vertex to the point.
Find the index of the nearest vertex to the point.
Presumes poimt is in a cell.
The cells index.
The point.
The index of the nearest vertex to the point.
Remobe a vertex.
The vertex index.
True if vertex was removed.
Generic triangulation class.
The kerel.
Static instance of a triangulation.
Default constructor.
Construct a triangulation from the points.
The triangulation points.
Construct from a existing triangulation.
A pointer to the unmanaged object.
The triangulation as a string.
Create a deep copy of the triangulation.
The deep copy.
Insert the points of the polygon into the triagulation.
May no have the same edges as polygon.
The polygon to insert/
Insert the points of the polygon into the triagulation.
May no have the same edges as polygon.
The polygon to insert/
Compute the convex of the triagulation.
The convex hull polygon.
Abstract base class for the triagulation.
The kernel with the functions unique to the triangulation.
Move the vertex.
If there is not already another vertex placed on the point,
the triangulation is modified such that the new position of vertex same as point.
The moved vertex
True if the vertex was found.
Generic triangulation class.
The kerel.
Static instance of a triangulation.
Default constructor.
Construct a triangulation from the points.
The triangulation points.
Construct from a existing triangulation.
A pointer to the unmanaged object.
The triangulation as a string.
Create a deep copy of the triangulation.
The deep copy.
Refine the triangulation.
The target edge lengths.
The number of iterations.
Compute the convex of the triagulation.
The convex hull polygon.
Abstract base class for the triagulation.
The kernel with the functions unique to the triangulation.
From Index to HalfEdgeIndex must match layout
of the unmanaged TriFace2 in the TriFace2 header file.
Is this the infinite cell.
The cells index in the triangulation.
The cells 4 vertices.
The cells 4 neighbor cells.
Are the two cells equal.
The first cell.
The second cell.
True if the cells are equal.
Are the two cells not equal.
The first cell.
The second cell.
True if the cells are not equal.
Are these objects equal.
The other object.
True if the objects are equal.
Are these cells equal.
The other cell.
True if the cells are equal.
The cells hash code.
The cells hash code.
Get a vertex index.
The vertices index 0-3.
The vertices index in the triangulation.
Get a neighbor cell index.
The neighbor cell index 0-3.
A neighbor cell index in the triangulation.
Enumerate the vertices of the cell.
The triangle the vertices below too.
The cell vertices.
Enumerate the vertices of the cell.
The vertices array.
The cell vertices.
Enumerate the vertices of the cell.
The triangle the vertices below too.
The cell vertices.
Enumerate the neighbors of the cell.
The cell array.
The cell neighbors.
Are the two vertex arrays equal.
Are the two neighbor arrays equal.
From Index to TwinIndex must match layout
of the unmanaged TriEdge2 in the TriEdge2 header file.
The edges face index in the triangulation.
The neighbours index in the face array betwen 0 and 2.
The edges segment.
The face index in the triangulation
The neighbours index in the face array betwen 0 and 2.
Are the two edges equal.
The first edge.
The second edge.
True if the edges are equal.
Are the two edges not equal.
The first edge.
The second edge.
True if the edges are not equal.
Are these objects equal.
The other object.
True if the objects are equal.
Are these edges equal.
The other edge.
True if the edges are equal.
The edges hash code.
The edges hash code.
From Index to HalfEdgeIndex must match layout
of the unmanaged TriFace2 in the TriFace2 header file.
Is this the infinite face.
The faces index in the triangulation.
The faces 3 vertices.
Are the two faces equal.
The first face.
The second face.
True if the faces are equal.
Are the two faces not equal.
The first face.
The second face.
True if the faces are not equal.
Are these objects equal.
The other object.
True if the objects are equal.
Are these faces equal.
The other face.
True if the faces are equal.
The faces hash code.
The faces hash code.
Get a vertex index and wrap around array.
The vertices index wrapped to 0-2.
The vertices index in the triangulation.
Enumerate the vertices of the face.
The triangle the vertices below too.
The face vertices.
Enumerate the vertices of the face.
The vertices array.
The face vertices.
From Point to HalfEdgeIndex must match layout
of the unmanaged TriVertex2 in the TriVertex2 header file.
The vertices point.
Is this a infinite vertex.
The number of egdes connected to the vertex.
The vertices index in the triangulation.
The one of the vertexs the vertex is connected to.
Are the two vertexs equal.
The first vertex.
The second vertex.
True if the vertexs are equal.
Are the two vertexs not equal.
The first vertex.
The second vertex.
True if the vertexs are not equal.
Are these objects equal.
The other object.
True if the objects are equal.
Are these vertexs equal.
The other vertex.
True if the vertexs are equal.
The vertexs hash code.
The vertexs hash code.
The vertices point.
Is this a infinte vertex.
The vertices degree is the
number of edges connecting to it.
The vertices index in the triangulation.
The one of the cells the vertex is connected to.
Are the two vertices equal.
The first vertex.
The second vertex.
True if the vertexs are equal.
Are the two vertices not equal.
The first vertex.
The second vertex.
True if the vertexs are not equal.
Are these objects equal.
The other object.
True if the objects are equal.
Are these vertexs equal.
The other vertex.
True if the vertexs are equal.
The vertexs hash code.
The vertexs hash code.
Enumerate around all the other vertices in this vertexs cell.
The triangulation the vertex belongs to.
All the other vertices in this vertexs cell
Enumerate around all the other vertices in this vertexs cell.
A array of the other vertices in the triangulation.
A array of the other cells in the triangulation.
All the other vertices in this vertexs cell
Cache to reuse arrays.
Thread safe?
Returns a array of Point2d objects that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of Point2d objects that is at least the size of count.
Returns a array of Segment2d objects that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of Segment2d objects that is at least the size of count.
Returns a array of Point3d objects that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of Point3d objects that is at least the size of count.
Returns a array of HPoint3d objects that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of HPoint3d objects that is at least the size of count.
Returns a array of ints that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of ints that is at least the size of count.
Returns a array of ints that is at least the size of count.
The minimum size of the array.
Should the array be cleared first.
Returns a array of ints that is at least the size of count.
Should a new array be created.
The current array.
The required new array size.
Creates a new array if disabled, the current one is null or to small.
Check a array that is passed to the c++ dll.
If the array is invalid it will cause a hard crash.
Array can be null if count is 0;
================================================
FILE: CGALDotNet/CGALGlobal.cs
================================================
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
using CGALDotNet.Geometry;
[assembly: InternalsVisibleTo("CGALDotNetConsole")]
[assembly: InternalsVisibleTo("CGALDotNetTest")]
namespace CGALDotNet
{
///
/// Global utility functions.
///
public static class CGALGlobal
{
public const int NULL_INDEX = -1;
private const string DLL_NAME = "CGALWrapper.dll";
private const CallingConvention CDECL = CallingConvention.Cdecl;
///
/// Get the version of CGAL in use.
///
public static string Version
{
get
{
int v = CGALGlobal_VersionNumber();
int MAJOR = v / 10000000 % 100;
int MINOR = v / 100000 % 100;
int PATCH = v / 10000 % 10;
int BUILD = v % 10000;
return string.Format("{0}.{1}.{2}.{3}", MAJOR, MINOR, PATCH, BUILD);
}
}
///
/// Get the version of eigen being used.
///
public static string EigenVersion
{
get
{
var v = CGALGlobal_EigenVersionNumber();
int WORLD = v.first;
int MAJOR = v.second;
int MINOR = v.third;
return string.Format("{0}.{1}.{2}", WORLD, MAJOR, MINOR);
}
}
///
/// Returns OBTUSE, RIGHT or ACUTE depending on the
/// angle formed by the two vectors u and v.
///
/// The first vector.
/// The second vector.
/// OBTUSE, RIGHT or ACUTE depending on the
/// angle formed by the two vectors u and v.
public static ANGLE Angle(Vector2d u, Vector2d v)
{
return CGALGlobal_EIK_Angle_Vector2(u, v);
}
///
/// Returns OBTUSE, RIGHT or ACUTE depending on the
/// angle formed by the two vectors u and v.
///
/// The first vector.
/// The second vector.
/// OBTUSE, RIGHT or ACUTE depending on the
/// angle formed by the two vectors u and v.
public static ANGLE Angle(Vector2 u, Vector2 v)
{
return CGALGlobal_EIK_Angle_Vector2(u.Ptr, v.Ptr);
}
///
/// Returns OBTUSE, RIGHT or ACUTE depending on the
/// angle formed by the two vectors u and v.
///
/// The first vector.
/// The second vector.
/// OBTUSE, RIGHT or ACUTE depending on the
/// angle formed by the two vectors u and v.
public static ANGLE Angle(Vector2 u, Vector2 v)
{
return CGALGlobal_EEK_Angle_Vector2(u.Ptr, v.Ptr);
}
///
/// returns OBTUSE, RIGHT or ACUTE depending on the
/// angle formed by the two vectors u and v.
///
/// The first vector.
/// The second vector.
/// OBTUSE, RIGHT or ACUTE depending on the
/// angle formed by the two vectors u and v.
public static ANGLE Angle(Vector3d u, Vector3d v)
{
return CGALGlobal_EIK_Angle_Vector3d(u, v);
}
///
/// Returns an approximation of the angle between u and v.
///
/// The first vector.
/// The second vector.
/// The angle is given in degrees.
public static Degree ApproxAngle(Vector2d u, Vector2d v)
{
return new Degree(CGALGlobal_EIK_ApproxAngle_Vector3d(u.xy0, v.xy0));
}
///
/// Returns an approximation of the angle between p-q and r-q.
///
/// The first tetrahedrons point.
/// The second tetrahedrons point.
/// The third tetrahedrons point.
/// The angle is given in degrees.
public static Degree ApproxAngle(Point2d p, Point2d q, Point2d r)
{
var u = Point2d.Direction(q, p).xy0;
var v = Point2d.Direction(q, r).xy0;
return new Degree(CGALGlobal_EIK_ApproxAngle_Vector3d(u, v));
}
///
/// Returns an approximation of the angle between u and v.
///
/// The first vector.
/// The second vector.
/// The angle is given in degrees.
public static Degree ApproxAngle(Vector3d u, Vector3d v)
{
return new Degree(CGALGlobal_EIK_ApproxAngle_Vector3d(u, v));
}
///
/// Returns an approximation of the angle between p-q and r-q.
///
/// The first tetrahedrons point.
/// The second tetrahedrons point.
/// The third tetrahedrons point.
/// The angle is given in degrees.
public static Degree ApproxAngle(Point3d p, Point3d q, Point3d r)
{
var u = Point3d.Direction(q, p);
var v = Point3d.Direction(q, r);
return new Degree(CGALGlobal_EIK_ApproxAngle_Vector3d(u, v));
}
///
/// Returns an approximation of the signed dihedral angle
/// in the tetrahedron pqrs of edge pq.
/// p,q,r and p,q,s are not collinear.
///
/// The first tetrahedrons point.
/// The second tetrahedrons point.
/// The third tetrahedrons point.
/// The fourth tetrahedrons point.
/// The sign is negative if orientation(p,q,r,s)
/// is CGAL::NEGATIVE and positive otherwise.
/// The angle is given in degrees.
public static Degree ApproxDihedralAngle(Point3d p, Point3d q, Point3d r, Point3d s)
{
return new Degree(CGALGlobal_EIK_ApproxDihedralAngle_Point3(p, q, r, s));
}
///
/// Returns true, if the three points are collinear
/// and q lies between p and r.
/// Note that true is returned, if q==p or q==r.
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true, if the three points are
/// collinear and q lies between p and r.
public static bool AreOrderedAlongLine(Point2d p, Point2d q, Point2d r)
{
return CGALGlobal_EIK_AreOrderedAlongLine_Point2d(p, q, r);
}
///
/// Returns true, if the three points are collinear
/// and q lies between p and r.
/// Note that true is returned, if q==p or q==r.
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true, if the three points are
/// collinear and q lies between p and r.
public static bool AreOrderedAlongLine(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EIK_AreOrderedAlongLine_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// Returns true, if the three points are collinear
/// and q lies between p and r.
/// Note that true is returned, if q==p or q==r.
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true, if the three points are
/// collinear and q lies between p and r.
public static bool AreOrderedAlongLine(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EEK_AreOrderedAlongLine_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// Returns true, if the three points are collinear
/// and q lies between p and r.
/// Note that true is returned, if q==p or q==r.
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true, if the three points are
/// collinear and q lies between p and r.
public static bool AreOrderedAlongLine(Point3d p, Point3d q, Point3d r)
{
return CGALGlobal_EIK_AreOrderedAlongLine_Point3d(p, q, r);
}
///
/// returns true, if the three points are collinear
/// and q lies strictly between p and r.
/// Note that false is returned, if q==p or q==r.
///
/// The first point.
/// The second point.
/// The third point.
/// returns true, iff the three points are
/// collinear and q lies strictly between p and r.
public static bool AreStrictlyOrderedAlongLine(Point2d p, Point2d q, Point2d r)
{
return CGALGlobal_EIK_AreStrictlyOrderedAlongLine_Point2d(p, q, r);
}
///
/// returns true, if the three points are collinear
/// and q lies strictly between p and r.
/// Note that false is returned, if q==p or q==r.
///
/// The first point.
/// The second point.
/// The third point.
/// returns true, iff the three points are
/// collinear and q lies strictly between p and r.
public static bool AreStrictlyOrderedAlongLine(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EIK_AreStrictlyOrderedAlongLine_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// returns true, if the three points are collinear
/// and q lies strictly between p and r.
/// Note that false is returned, if q==p or q==r.
///
/// The first point.
/// The second point.
/// The third point.
/// returns true, iff the three points are
/// collinear and q lies strictly between p and r.
public static bool AreStrictlyOrderedAlongLine(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EEK_AreStrictlyOrderedAlongLine_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// returns true, if the three points are collinear
/// and q lies strictly between p and r.
/// Note that false is returned, if q==p or q==r.
///
/// The first point.
/// The second point.
/// The third point.
/// returns true, iff the three points are
/// collinear and q lies strictly between p and r.
public static bool AreStrictlyOrderedAlongLine(Point3d p, Point3d q, Point3d r)
{
return CGALGlobal_EIK_AreStrictlyOrderedAlongLine_Point3d(p, q, r);
}
///
/// Returns true, if p, q, and r are collinear
///
/// The first point.
/// The second point.
/// The third point.
/// returns true, if p, q, and r are collinear
public static bool Collinear(Point2d p, Point2d q, Point2d r)
{
return CGALGlobal_EIK_Collinear_Point2d(p, q, r);
}
///
/// Returns true, if p, q, and r are collinear
///
/// The first point.
/// The second point.
/// The third point.
/// returns true, if p, q, and r are collinear
public static bool Collinear(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EIK_Collinear_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// Returns true, if p, q, and r are collinear
///
/// The first point.
/// The second point.
/// The third point.
/// returns true, if p, q, and r are collinear
public static bool Collinear(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EEK_Collinear_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// Returns true, if p, q, and r are collinear
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true, iff p, q, and r are collinear
public static bool Collinear(Point3d p, Point3d q, Point3d r)
{
return CGALGlobal_EIK_Collinear_Point3d(p, q, r);
}
///
/// Compute the barycenter of the points p1, p2 and p3
/// with corresponding weights w1, w2 and w3 as 1.
///
/// The first point.
/// The second point.
/// The third point.
/// Compute the barycenter of the points.
public static Point2d Barycenter(Point2d p, Point2d q, Point2d r)
{
return CGALGlobal_EIK_Barycenter_Point2d(p, q, r);
}
///
/// Compute the barycenter of the points p1, p2 and p3
/// with corresponding weights w1, w2 and w3 as 1.
///
/// The first point.
/// The second point.
/// The third point.
/// Compute the barycenter of the points.
public static Point2 Barycenter(Point2 p, Point2 q, Point2 r)
{
var ptr = CGALGlobal_EIK_Barycenter_Point2(p.Ptr, q.Ptr, r.Ptr);
return new Point2(ptr);
}
///
/// Compute the barycenter of the points p1, p2 and p3
/// with corresponding weights w1, w2 and w3 as 1.
///
/// The first point.
/// The second point.
/// The third point.
/// Compute the barycenter of the points.
public static Point2 Barycenter(Point2 p, Point2 q, Point2 r)
{
var ptr = CGALGlobal_EEK_Barycenter_Point2(p.Ptr, q.Ptr, r.Ptr);
return new Point2(ptr);
}
///
/// Compute the barycenter of the points p1, p2 and p3
/// with corresponding weights w1, w2 and w3 as 1.
///
/// The first point.
/// The second point.
/// The third point.
/// Compute the barycenter of the points.
public static Point3d Barycenter(Point3d p, Point3d q, Point3d r)
{
return CGALGlobal_EIK_Barycenter_Point3d(p, q, r);
}
///
/// Constructs the bisector line of the two points p and q.
/// The bisector is oriented in such a way that p lies on its positive side.
///
/// The first point.
/// The second point.
/// Constructs the bisector line of the two points p and q.
public static Line2d Bisector(Point3d p, Point3d q)
{
return CGALGlobal_EIK_Bisector_Point3d(p, q);
}
///
/// Constructs the bisector of the two lines l1 and l2.
///
/// In the general case, the bisector has the direction of
/// the vector which is the sum of the normalized directions
/// of the two lines, and which passes through the intersection
/// of l1 and l2. If l1 and l2 are parallel, then the bisector
/// is defined as the line which has the same direction as l1,
/// and which is at the same distance from l1 and l2.
/// If Kernel::FT is not a model of FieldWithSqrt an
/// approximation of the square root will be used in this
/// function, impacting the exactness of the result even
/// with an (exact) multiprecision number type.
///
/// The first line.
/// The second line.
/// Constructs the bisector of the two lines l1 and l2.
public static Line2d Bisector(Line2d l1, Line2d l2)
{
return CGALGlobal_EIK_Bisector_Line2d(l1, l2);
}
///
/// Constructs the bisector of the two lines l1 and l2.
///
/// In the general case, the bisector has the direction of
/// the vector which is the sum of the normalized directions
/// of the two lines, and which passes through the intersection
/// of l1 and l2. If l1 and l2 are parallel, then the bisector
/// is defined as the line which has the same direction as l1,
/// and which is at the same distance from l1 and l2.
/// If Kernel::FT is not a model of FieldWithSqrt an
/// approximation of the square root will be used in this
/// function, impacting the exactness of the result even
/// with an (exact) multiprecision number type.
///
/// The first line.
/// The second line.
/// Constructs the bisector of the two lines l1 and l2.
public static Line2 Bisector(Line2 l1, Line2 l2)
{
var ptr = CGALGlobal_EIK_Bisector_Line2(l1.Ptr, l2.Ptr);
return new Line2(ptr);
}
///
/// Constructs the bisector of the two lines l1 and l2.
///
/// In the general case, the bisector has the direction of
/// the vector which is the sum of the normalized directions
/// of the two lines, and which passes through the intersection
/// of l1 and l2. If l1 and l2 are parallel, then the bisector
/// is defined as the line which has the same direction as l1,
/// and which is at the same distance from l1 and l2.
/// If Kernel::FT is not a model of FieldWithSqrt an
/// approximation of the square root will be used in this
/// function, impacting the exactness of the result even
/// with an (exact) multiprecision number type.
///
/// The first line.
/// The second line.
/// Constructs the bisector of the two lines l1 and l2.
public static Line2 Bisector(Line2 l1, Line2 l2)
{
var ptr = CGALGlobal_EEK_Bisector_Line2(l1.Ptr, l2.Ptr);
return new Line2(ptr);
}
///
/// Returns true, if p, q, r, and s are coplanar.
///
/// The first point.
/// The second point.
/// The third point.
/// The fourth point
/// Returns true, if p, q, r, and s are coplanar.
public static bool Coplanar(Point3d p, Point3d q, Point3d r, Point3d s)
{
return CGALGlobal_EIK_Coplanar_Point3d(p, q, r, s);
}
///
/// If p,q,r are collinear, then CGAL_COLLINEAR is returned.
/// If not, then p,q,r define a plane p. The return value in this
/// case is either CGAL_POSITIVE or CGAL_NEGATIVE, but we don't
/// specify it explicitly. However, we guarantee that all calls to
/// this predicate over 3 points in p will return a coherent
/// orientation if considered a 2D orientation in p
///
/// The first point.
/// The second point.
/// The third point.
/// If p,q,r are collinear, then CGAL_COLLINEAR is returned.
public static ORIENTATION CoplanarOrientation(Point3d p, Point3d q, Point3d r)
{
return CGALGlobal_EIK_CoplanarOrientation_3Point3d(p, q, r);
}
///
/// Let P be the plane defined by the points p, q, and r.
/// Note that the order defines the orientation of P. The function computes
/// the orientation of points p, q, and s in P: If p, q, s are collinear,
/// CGAL_COLLINEAR is returned. If P and the plane defined by p, q,
/// and s have the same orientation, CGAL_POSITIVE is returned;
/// otherwise CGAL_NEGATIVE is returned.
/// p, q, r, and s are coplanar and p, q, and r are not collinear.
///
/// The first point.
/// The second point.
/// The third point.
/// The fourth point
///
public static ORIENTATION CoplanarOrientation(Point3d p, Point3d q, Point3d r, Point3d s)
{
return CGALGlobal_EIK_CoplanarOrientation_4Point3d(p, q, r, s);
}
///
/// Constructs the line which is at the same distance from the three points p, q and r.
/// p, q and r are not collinear.
///
///
///
///
/// Constructs the line which is at the same distance from the three points p, q and r.
public static Line3d EquidistantLine(Point3d p, Point3d q, Point3d r)
{
return CGALGlobal_EIK_EquidistantLine_Line3d(p, q, r);
}
///
/// Returns true if p, q, and r form a left turn.
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true if p, q, and r form a left turn.
public static bool LeftTurn(Point2d p, Point2d q, Point2d r)
{
return CGALGlobal_EIK_LeftTurn_Point2d(p, q, r);
}
///
/// Returns true if p, q, and r form a left turn.
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true if p, q, and r form a left turn.
public static bool LeftTurn(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EIK_LeftTurn_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// Returns true if p, q, and r form a left turn.
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true if p, q, and r form a left turn.
public static bool LeftTurn(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EEK_LeftTurn_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// Returns true if p, q, and r form a right turn.
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true if p, q, and r form a right turn.
public static bool RightTurn(Point2d p, Point2d q, Point2d r)
{
return CGALGlobal_EIK_RightTurn_Point2d(p, q, r);
}
///
/// Returns true if p, q, and r form a right turn.
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true if p, q, and r form a right turn.
public static bool RightTurn(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EIK_RightTurn_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// Returns true if p, q, and r form a right turn.
///
/// The first point.
/// The second point.
/// The third point.
/// Returns true if p, q, and r form a right turn.
public static bool RightTurn(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EIK_RightTurn_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// Returns LEFT_TURN, if r lies to the left of the oriented
/// line l defined by p and q, returns RIGHT_TURN if r lies
/// to the right of l, and returns COLLINEAR if r lies on l.
///
/// The first point.
/// The second point.
/// The third point.
///
public static ORIENTATION Orientation(Point2d p, Point2d q, Point2d r)
{
return CGALGlobal_EIK_Orientation_Point2d(p, q, r);
}
///
/// Returns LEFT_TURN, if r lies to the left of the oriented
/// line l defined by p and q, returns RIGHT_TURN if r lies
/// to the right of l, and returns COLLINEAR if r lies on l.
///
/// The first point.
/// The second point.
/// The third point.
///
public static ORIENTATION Orientation(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EIK_Orientation_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// Returns LEFT_TURN, if r lies to the left of the oriented
/// line l defined by p and q, returns RIGHT_TURN if r lies
/// to the right of l, and returns COLLINEAR if r lies on l.
///
/// The first point.
/// The second point.
/// The third point.
///
public static ORIENTATION Orientation(Point2 p, Point2 q, Point2 r)
{
return CGALGlobal_EEK_Orientation_Point2(p.Ptr, q.Ptr, r.Ptr);
}
///
/// returns LEFT_TURN if u and v form a left turn, returns
/// RIGHT_TURN if u and v form a right turn, and returns
/// COLLINEAR if u and v are collinear.
///
///
///
///
public static ORIENTATION Orientation(Vector2d u, Vector2d v)
{
return CGALGlobal_EIK_Orientation_Vector2d(u, v);
}
///
/// Returns LEFT_TURN, if r lies to the left of the oriented
/// line l defined by p and q, returns RIGHT_TURN if r lies
/// to the right of l, and returns COLLINEAR if r lies on l.
///
/// The first point.
/// The second point.
///
public static ORIENTATION Orientation(Vector2 p, Vector2 q)
{
return CGALGlobal_EIK_Orientation_Vector2(p.Ptr, q.Ptr);
}
///
/// Returns LEFT_TURN, if r lies to the left of the oriented
/// line l defined by p and q, returns RIGHT_TURN if r lies
/// to the right of l, and returns COLLINEAR if r lies on l.
///
/// The first point.
/// The second point.
///
public static ORIENTATION Orientation(Vector2 p, Vector2 q)
{
return CGALGlobal_EEK_Orientation_Vector2(p.Ptr, q.Ptr);
}
///
/// returns POSITIVE, if s lies on the positive side of the
/// oriented plane h defined by p, q, and r, returns NEGATIVE
/// if s lies on the negative side of h, and returns COPLANAR
/// if s lies on h.
///
/// The first point.
/// The second point.
/// The third point.
/// The fourth point
///
public static ORIENTATION Orientation(Point3d p, Point3d q, Point3d r, Point3d s)
{
return CGALGlobal_EIK_Orientation_Point3d(p, q, r, s);
}
///
/// returns NEGATIVE if u, v and w are negatively oriented,
/// POSITIVE if u, v and w are positively oriented,
/// and COPLANAR if u, v and w are coplanar.
///
///
///
///
///
public static ORIENTATION Orientation(Vector3d u, Vector3d v, Vector3d w)
{
return CGALGlobal_EIK_Orientation_Vector3d(u, v, w);
}
///
/// computes an orthogonal vector of the plane defined by p, q
/// and r, which is directed to the positive side of this plane.
///
/// The first point.
/// The second point.
/// The third point.
/// computes an orthogonal vector of the plane
public static Vector3d OrthogonalVector(Point3d p, Point3d q, Point3d r)
{
return CGALGlobal_EIK_OrthogonalVector_Point3d(p, q, r);
}
///
/// returns true, if l1 and l2 are parallel or if one of those
/// (or both) is degenerate.
///
/// The first line.
/// The seconed line.
/// returns true, if l1 and l2 are parallel
public static bool Parallel(Line2d l1, Line2d l2)
{
return CGALGlobal_EIK_Parallel_Line2d(l1, l2);
}
///
/// returns true, if l1 and l2 are parallel or if one of those
/// (or both) is degenerate.
///
/// The first line.
/// The seconed line.
/// returns true, if l1 and l2 are parallel
public static bool Parallel(Line2 l1, Line2 l2)
{
return CGALGlobal_EIK_Parallel_Line2(l1.Ptr, l2.Ptr);
}
///
/// returns true, if l1 and l2 are parallel or if one of those
/// (or both) is degenerate.
///
/// The first line.
/// The seconed line.
/// returns true, if l1 and l2 are parallel
public static bool Parallel(Line2 l1, Line2 l2)
{
return CGALGlobal_EEK_Parallel_Line2(l1.Ptr, l2.Ptr);
}
///
/// returns true, if r1 and r2 are parallel or if one of
/// those (or both) is degenerate.
///
/// The first ray.
/// The second ray.
/// returns true, if r1 and r2 are parallel
public static bool Parallel(Ray2d r1, Ray2d r2)
{
return CGALGlobal_EIK_Parallel_Ray2d(r1, r2);
}
///
/// returns true, if r1 and r2 are parallel or if one of
/// those (or both) is degenerate.
///
/// The first ray.
/// The second ray.
/// returns true, if r1 and r2 are parallel
public static bool Parallel(Ray2 r1, Ray2 r2)
{
return CGALGlobal_EIK_Parallel_Ray2(r1.Ptr, r2.Ptr);
}
///
/// returns true, if r1 and r2 are parallel or if one of
/// those (or both) is degenerate.
///
/// The first ray.
/// The second ray.
/// returns true, if r1 and r2 are parallel
public static bool Parallel(Ray2 r1, Ray2 r2)
{
return CGALGlobal_EEK_Parallel_Ray2(r1.Ptr, r2.Ptr);
}
///
/// returns true, if s1 and s2 are parallel or if one of
/// those (or both) is degenerate.
///
/// The first segment.
/// The secong segment.
/// returns true, if s1 and s2 are parallel
public static bool Parallel(Segment2d s1, Segment2d s2)
{
return CGALGlobal_EIK_Parallel_Segment2d(s1, s2);
}
///
/// returns true, if s1 and s2 are parallel or if one of
/// those (or both) is degenerate.
///
/// The first segment.
/// The secong segment.
/// returns true, if s1 and s2 are parallel
public static bool Parallel(Segment2 s1, Segment2 s2)
{
return CGALGlobal_EIK_Parallel_Segment2(s1.Ptr, s2.Ptr);
}
///
/// returns true, if s1 and s2 are parallel or if one of
/// those (or both) is degenerate.
///
/// The first segment.
/// The secong segment.
/// returns true, if s1 and s2 are parallel
public static bool Parallel(Segment2 s1, Segment2 s2)
{
return CGALGlobal_EEK_Parallel_Segment2(s1.Ptr, s2.Ptr);
}
//---------------------------------------------------------------------------//
// Version //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int CGALGlobal_VersionNumber();
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern Index3 CGALGlobal_EigenVersionNumber();
//---------------------------------------------------------------------------//
// Angle //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ANGLE CGALGlobal_EIK_Angle_Vector2(Vector2d u, Vector2d v);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ANGLE CGALGlobal_EIK_Angle_Vector2(IntPtr u, IntPtr v);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ANGLE CGALGlobal_EEK_Angle_Vector2(IntPtr u, IntPtr v);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ANGLE CGALGlobal_EIK_Angle_Vector3d(Vector3d u, Vector3d v);
//---------------------------------------------------------------------------//
// ApproxAngle //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double CGALGlobal_EIK_ApproxAngle_Vector3d(Vector3d u, Vector3d v);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double CGALGlobal_EIK_ApproxAngle_Vector2(IntPtr u, IntPtr v);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double CGALGlobal_EEK_ApproxAngle_Vector2(IntPtr u, IntPtr v);
//---------------------------------------------------------------------------//
// ApproxDihedralAngle //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double CGALGlobal_EIK_ApproxDihedralAngle_Point3(Point3d p, Point3d q, Point3d r, Point3d s);
//---------------------------------------------------------------------------//
// AreOrderedAlongLine //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_AreOrderedAlongLine_Point2d(Point2d p, Point2d q, Point2d r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_AreOrderedAlongLine_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EEK_AreOrderedAlongLine_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_AreOrderedAlongLine_Point3d(Point3d p, Point3d q, Point3d r);
//---------------------------------------------------------------------------//
// AreStrictlyOrderedAlongLine //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_AreStrictlyOrderedAlongLine_Point2d(Point2d p, Point2d q, Point2d r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_AreStrictlyOrderedAlongLine_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EEK_AreStrictlyOrderedAlongLine_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_AreStrictlyOrderedAlongLine_Point3d(Point3d p, Point3d q, Point3d r);
//---------------------------------------------------------------------------//
// Collinear //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_Collinear_Point2d(Point2d p, Point2d q, Point2d r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_Collinear_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EEK_Collinear_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_Collinear_Point3d(Point3d p, Point3d q, Point3d r);
//---------------------------------------------------------------------------//
// Barycenter //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern Point2d CGALGlobal_EIK_Barycenter_Point2d(Point2d p, Point2d q, Point2d r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr CGALGlobal_EIK_Barycenter_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr CGALGlobal_EEK_Barycenter_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern Point3d CGALGlobal_EIK_Barycenter_Point3d(Point3d p, Point3d q, Point3d r);
//---------------------------------------------------------------------------//
// Bisector //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern Line2d CGALGlobal_EIK_Bisector_Point3d(Point3d p, Point3d q);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern Line2d CGALGlobal_EIK_Bisector_Line2d(Line2d p, Line2d q);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr CGALGlobal_EIK_Bisector_Line2(IntPtr p, IntPtr q);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr CGALGlobal_EEK_Bisector_Line2(IntPtr p, IntPtr q);
//---------------------------------------------------------------------------//
// Coplanar //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_Coplanar_Point3d(Point3d p, Point3d q, Point3d r, Point3d s);
//---------------------------------------------------------------------------//
// CoplanarOrientation //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ORIENTATION CGALGlobal_EIK_CoplanarOrientation_3Point3d(Point3d p, Point3d q, Point3d r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ORIENTATION CGALGlobal_EIK_CoplanarOrientation_4Point3d(Point3d p, Point3d q, Point3d r, Point3d s);
//---------------------------------------------------------------------------//
// EquidistantLine //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern Line3d CGALGlobal_EIK_EquidistantLine_Line3d(Point3d p, Point3d q, Point3d r);
//---------------------------------------------------------------------------//
// LeftTurn //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_LeftTurn_Point2d(Point2d p, Point2d q, Point2d r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_LeftTurn_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EEK_LeftTurn_Point2(IntPtr p, IntPtr q, IntPtr r);
//---------------------------------------------------------------------------//
// RightTurn //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_RightTurn_Point2d(Point2d p, Point2d q, Point2d r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_RightTurn_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EEK_RightTurn_Point2(IntPtr p, IntPtr q, IntPtr r);
//---------------------------------------------------------------------------//
// Orientation //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ORIENTATION CGALGlobal_EIK_Orientation_Point2d(Point2d p, Point2d q, Point2d r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ORIENTATION CGALGlobal_EIK_Orientation_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ORIENTATION CGALGlobal_EEK_Orientation_Point2(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ORIENTATION CGALGlobal_EIK_Orientation_Vector2d(Vector2d u, Vector2d v);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ORIENTATION CGALGlobal_EIK_Orientation_Vector2(IntPtr p, IntPtr q);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ORIENTATION CGALGlobal_EEK_Orientation_Vector2(IntPtr p, IntPtr q);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ORIENTATION CGALGlobal_EIK_Orientation_Point3d(Point3d p, Point3d q, Point3d r, Point3d s);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern ORIENTATION CGALGlobal_EIK_Orientation_Vector3d(Vector3d u, Vector3d v, Vector3d w);
//---------------------------------------------------------------------------//
// OrthogonalVector //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern Vector3d CGALGlobal_EIK_OrthogonalVector_Point3d(Point3d p, Point3d q, Point3d r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr CGALGlobal_EIK_OrthogonalVector_Point3(IntPtr p, IntPtr q, IntPtr r);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr CGALGlobal_EEK_OrthogonalVector_Point3(IntPtr p, IntPtr q, IntPtr r);
//---------------------------------------------------------------------------//
// Parallel //
//---------------------------------------------------------------------------//
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_Parallel_Line2d(Line2d l1, Line2d l2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_Parallel_Line2(IntPtr l1, IntPtr l2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EEK_Parallel_Line2(IntPtr l1, IntPtr l2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_Parallel_Ray2d(Ray2d r1, Ray2d r2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_Parallel_Ray2(IntPtr l1, IntPtr l2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EEK_Parallel_Ray2(IntPtr l1, IntPtr l2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_Parallel_Segment2d(Segment2d s1, Segment2d s2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EIK_Parallel_Segment2(IntPtr l1, IntPtr l2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool CGALGlobal_EEK_Parallel_Segment2(IntPtr l1, IntPtr l2);
}
}
================================================
FILE: CGALDotNet/CGALKernel.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using CGALDotNet.Geometry;
using CGALDotNet.Polylines;
using CGALDotNet.Polygons;
using CGALDotNet.Arrangements;
using CGALDotNet.Triangulations;
using CGALDotNet.Hulls;
using CGALDotNet.Polyhedra;
using CGALDotNet.Meshing;
using CGALDotNet.Processing;
namespace CGALDotNet
{
public abstract class CGALKernel
{
internal abstract GeometryKernel2 GeometryKernel2 { get; }
internal abstract PolylineKernel2 PolylineKernel2 { get; }
internal abstract PolylineKernel3 PolylineKernel3 { get; }
internal abstract PolygonKernel2 PolygonKernel2 { get; }
internal abstract PolygonWithHolesKernel2 PolygonWithHolesKernel2 { get; }
internal abstract PolygonBooleanKernel2 PolygonBooleanKernel2 { get; }
internal abstract PolygonPartitionKernel2 PolygonPartitionKernel2 { get; }
internal abstract PolygonSimplificationKernel2 PolygonSimplificationKernel2 { get; }
internal abstract PolygonOffsetKernel2 PolygonOffsetKernel2 { get; }
internal abstract PolygonMinkowskiKernel PolygonMinkowskiKernel { get; }
internal abstract PolygonVisibilityKernel PolygonVisibilityKernel { get; }
internal abstract ArrangementKernel2 ArrangementKernel2 { get; }
internal abstract SweepLineKernel SweepLineKernel { get; }
internal abstract TriangulationKernel2 TriangulationKernel2 { get; }
internal abstract TriangulationKernel3 TriangulationKernel3 { get; }
internal abstract DelaunayTriangulationKernel2 DelaunayTriangulationKernel2 { get; }
internal abstract DelaunayTriangulationKernel3 DelaunayTriangulationKernel3 { get; }
internal abstract ConstrainedTriangulationKernel2 ConstrainedTriangulationKernel2 { get; }
internal abstract ConstrainedDelaunayTriangulationKernel2 ConstrainedDelaunayTriangulationKernel2 { get; }
internal abstract ConformingTriangulationKernel2 ConformingTriangulationKernel2 { get; }
internal abstract ConvexHullKernel2 ConvexHullKernel2 { get; }
internal abstract ConvexHullKernel3 ConvexHullKernel3 { get; }
internal abstract PolyhedronKernel3 PolyhedronKernel3 { get; }
internal abstract NefPolyhedronKernel3 NefPolyhedronKernel3 { get; }
internal abstract SurfaceMeshKernel3 SurfaceMeshKernel3 { get; }
internal abstract TetrahedralRemeshingKernel TetrahedralRemeshingKernel { get; }
internal abstract SurfaceSubdivisionKernel SurfaceSubdivisionKernel { get; }
internal abstract SurfaceSimplificationKernel SurfaceSimplificationKernel { get; }
internal abstract SkinSurfaceMeshingKernel SkinSurfaceMeshingKernel { get; }
internal abstract MeshProcessingMeshingKernel MeshProcessingMeshingKernel { get; }
internal abstract MeshProcessingRepairKernel MeshProcessingRepairKernel { get; }
internal abstract MeshProcessingOrientationKernel MeshProcessingOrientationKernel { get; }
internal abstract MeshProcessingBooleanKernel MeshProcessingBooleanKernel { get; }
internal abstract MeshProcessingConnectionsKernel MeshProcessingConnectionsKernel { get; }
internal abstract MeshProcessingSlicerKernel MeshProcessingSlicerKernel { get; }
internal abstract MeshProcessingFeaturesKernel MeshProcessingFeaturesKernel { get; }
internal abstract MeshProcessingLocateKernel MeshProcessingLocateKernel { get; }
internal abstract HeatMethodKernel HeatMethodKernel { get; }
}
public class EIK : CGALKernel
{
public static readonly EIK Instance = new EIK();
internal override GeometryKernel2 GeometryKernel2 => GeometryKernel2_EIK.Instance;
internal override PolylineKernel2 PolylineKernel2 => PolylineKernel2_EIK.Instance;
internal override PolylineKernel3 PolylineKernel3 => PolylineKernel3_EIK.Instance;
internal override PolygonKernel2 PolygonKernel2 => PolygonKernel2_EIK.Instance;
internal override PolygonWithHolesKernel2 PolygonWithHolesKernel2 => PolygonWithHolesKernel2_EIK.Instance;
internal override PolygonBooleanKernel2 PolygonBooleanKernel2 => PolygonBooleanKernel2_EIK.Instance;
internal override PolygonPartitionKernel2 PolygonPartitionKernel2 => PolygonPartitionKernel2_EIK.Instance;
internal override PolygonSimplificationKernel2 PolygonSimplificationKernel2 => PolygonSimplificationKernel2_EIK.Instance;
internal override PolygonOffsetKernel2 PolygonOffsetKernel2 => PolygonOffsetKernel2_EIK.Instance;
internal override PolygonMinkowskiKernel PolygonMinkowskiKernel => PolygonMinkowskiKernel_EIK.Instance;
internal override PolygonVisibilityKernel PolygonVisibilityKernel => PolygonVisibilityKernel_EIK.Instance;
internal override ArrangementKernel2 ArrangementKernel2 => throw new NotImplementedException();
internal override SweepLineKernel SweepLineKernel => SweepLineKernel_EIK.Instance;
internal override TriangulationKernel2 TriangulationKernel2 => TriangulationKernel2_EIK.Instance;
internal override TriangulationKernel3 TriangulationKernel3 => throw new NotImplementedException();
internal override DelaunayTriangulationKernel2 DelaunayTriangulationKernel2 => DelaunayTriangulationKernel2_EIK.Instance;
internal override DelaunayTriangulationKernel3 DelaunayTriangulationKernel3 => throw new NotImplementedException();
internal override ConstrainedTriangulationKernel2 ConstrainedTriangulationKernel2 => ConstrainedTriangulationKernel2_EIK.Instance;
internal override ConstrainedDelaunayTriangulationKernel2 ConstrainedDelaunayTriangulationKernel2 => throw new NotImplementedException();
internal override ConformingTriangulationKernel2 ConformingTriangulationKernel2 => ConformingTriangulationKernel2_EIK.Instance;
internal override ConvexHullKernel2 ConvexHullKernel2 => ConvexHullKernel2_EIK.Instance;
internal override ConvexHullKernel3 ConvexHullKernel3 => ConvexHullKernel3_EIK.Instance;
internal override PolyhedronKernel3 PolyhedronKernel3 => PolyhedronKernel3_EIK.Instance;
internal override NefPolyhedronKernel3 NefPolyhedronKernel3 => NefPolyhedronKernel3_EIK.Instance;
internal override SurfaceMeshKernel3 SurfaceMeshKernel3 => SurfaceMeshKernel3_EIK.Instance;
internal override TetrahedralRemeshingKernel TetrahedralRemeshingKernel => throw new NotImplementedException();
internal override SurfaceSubdivisionKernel SurfaceSubdivisionKernel => SurfaceSubdivisionKernel_EIK.Instance;
internal override SurfaceSimplificationKernel SurfaceSimplificationKernel => SurfaceSimplificationKernel_EIK.Instance;
internal override SkinSurfaceMeshingKernel SkinSurfaceMeshingKernel => throw new NotImplementedException();
internal override MeshProcessingMeshingKernel MeshProcessingMeshingKernel => MeshProcessingMeshingKernel_EIK.Instance;
internal override MeshProcessingRepairKernel MeshProcessingRepairKernel => MeshProcessingRepairKernel_EIK.Instance;
internal override MeshProcessingOrientationKernel MeshProcessingOrientationKernel => MeshProcessingOrientationKernel_EIK.Instance;
internal override MeshProcessingBooleanKernel MeshProcessingBooleanKernel => MeshProcessingBooleanKernel_EIK.Instance;
internal override MeshProcessingConnectionsKernel MeshProcessingConnectionsKernel => MeshProcessingConnectionsKernel_EIK.Instance;
internal override MeshProcessingSlicerKernel MeshProcessingSlicerKernel => MeshProcessingSlicerKernel_EIK.Instance;
internal override MeshProcessingFeaturesKernel MeshProcessingFeaturesKernel => MeshProcessingFeaturesKernel_EIK.Instance;
internal override MeshProcessingLocateKernel MeshProcessingLocateKernel => MeshProcessingLocateKernel_EIK.Instance;
internal override HeatMethodKernel HeatMethodKernel => HeatMethodKernel_EIK.Instance;
}
public class EEK : CGALKernel
{
public static readonly EEK Instance = new EEK();
internal override GeometryKernel2 GeometryKernel2 => GeometryKernel2_EEK.Instance;
internal override PolylineKernel2 PolylineKernel2 => PolylineKernel2_EEK.Instance;
internal override PolylineKernel3 PolylineKernel3 => PolylineKernel3_EEK.Instance;
internal override PolygonKernel2 PolygonKernel2 => PolygonKernel2_EEK.Instance;
internal override PolygonWithHolesKernel2 PolygonWithHolesKernel2 => PolygonWithHolesKernel2_EEK.Instance;
internal override PolygonBooleanKernel2 PolygonBooleanKernel2 => PolygonBooleanKernel2_EEK.Instance;
internal override PolygonPartitionKernel2 PolygonPartitionKernel2 => PolygonPartitionKernel2_EEK.Instance;
internal override PolygonSimplificationKernel2 PolygonSimplificationKernel2 => PolygonSimplificationKernel2_EEK.Instance;
internal override PolygonOffsetKernel2 PolygonOffsetKernel2 => PolygonOffsetKernel2_EEK.Instance;
internal override PolygonMinkowskiKernel PolygonMinkowskiKernel => PolygonMinkowskiKernel_EEK.Instance;
internal override PolygonVisibilityKernel PolygonVisibilityKernel => PolygonVisibilityKernel_EEK.Instance;
internal override ArrangementKernel2 ArrangementKernel2 => ArrangementKernel2_EEK.Instance;
internal override SweepLineKernel SweepLineKernel => SweepLineKernel_EEK.Instance;
internal override TriangulationKernel2 TriangulationKernel2 => TriangulationKernel2_EEK.Instance;
internal override TriangulationKernel3 TriangulationKernel3 => TriangulationKernel3_EEK.Instance;
internal override DelaunayTriangulationKernel2 DelaunayTriangulationKernel2 => DelaunayTriangulationKernel2_EEK.Instance;
internal override DelaunayTriangulationKernel3 DelaunayTriangulationKernel3 => DelaunayTriangulationKernel3_EEK.Instance;
internal override ConstrainedTriangulationKernel2 ConstrainedTriangulationKernel2 => ConstrainedTriangulationKernel2_EEK.Instance;
internal override ConstrainedDelaunayTriangulationKernel2 ConstrainedDelaunayTriangulationKernel2 => ConstrainedDelaunayTriangulationKernel2_EEK.Instance;
internal override ConformingTriangulationKernel2 ConformingTriangulationKernel2 => ConformingTriangulationKernel2_EEK.Instance;
internal override ConvexHullKernel2 ConvexHullKernel2 => ConvexHullKernel2_EEK.Instance;
internal override ConvexHullKernel3 ConvexHullKernel3 => ConvexHullKernel3_EEK.Instance;
internal override PolyhedronKernel3 PolyhedronKernel3 => PolyhedronKernel3_EEK.Instance;
internal override NefPolyhedronKernel3 NefPolyhedronKernel3 => NefPolyhedronKernel3_EEK.Instance;
internal override SurfaceMeshKernel3 SurfaceMeshKernel3 => SurfaceMeshKernel3_EEK.Instance;
internal override TetrahedralRemeshingKernel TetrahedralRemeshingKernel => TetrahedralRemeshingKernel_EEK.Instance;
internal override SurfaceSubdivisionKernel SurfaceSubdivisionKernel => SurfaceSubdivisionKernel_EEK.Instance;
internal override SurfaceSimplificationKernel SurfaceSimplificationKernel => throw new NotSupportedException();
internal override SkinSurfaceMeshingKernel SkinSurfaceMeshingKernel => SkinSurfaceMeshingKernel_EEK.Instance;
internal override MeshProcessingMeshingKernel MeshProcessingMeshingKernel => MeshProcessingMeshingKernel_EEK.Instance;
internal override MeshProcessingRepairKernel MeshProcessingRepairKernel => MeshProcessingRepairKernel_EEK.Instance;
internal override MeshProcessingOrientationKernel MeshProcessingOrientationKernel => MeshProcessingOrientationKernel_EEK.Instance;
internal override MeshProcessingBooleanKernel MeshProcessingBooleanKernel => MeshProcessingBooleanKernel_EEK.Instance;
internal override MeshProcessingConnectionsKernel MeshProcessingConnectionsKernel => MeshProcessingConnectionsKernel_EEK.Instance;
internal override MeshProcessingSlicerKernel MeshProcessingSlicerKernel => MeshProcessingSlicerKernel_EEK.Instance;
internal override MeshProcessingFeaturesKernel MeshProcessingFeaturesKernel => MeshProcessingFeaturesKernel_EEK.Instance;
internal override MeshProcessingLocateKernel MeshProcessingLocateKernel => MeshProcessingLocateKernel_EEK.Instance;
internal override HeatMethodKernel HeatMethodKernel => HeatMethodKernel_EEK.Instance;
}
}
================================================
FILE: CGALDotNet/CGALObject.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace CGALDotNet
{
///
/// Base class for objects that referrence a CGAL object.
///
public abstract class CGALObject : IDisposable
{
protected const string DLL_NAME = "CGALWrapper.dll";
protected const CallingConvention CDECL = CallingConvention.Cdecl;
///
/// The pointer to the unmanged CGAL object.
///
private IntPtr m_ptr;
///
/// Default constructor.
///
internal CGALObject()
{
m_ptr = IntPtr.Zero;
}
///
/// Constructor taking a referrence to a CGAL object.
///
/// A pointer to a CGAL object.
internal CGALObject(IntPtr ptr)
{
m_ptr = ptr;
}
///
/// The destuctor.
///
~CGALObject()
{
Release();
}
///
/// Has the object been disposed.
///
public bool IsDisposed { get; private set; }
///
/// Get the ptr to the CGAL object.
///
internal IntPtr Ptr
{
get
{
CheckPtr();
return m_ptr;
}
private protected set
{
m_ptr = value;
}
}
///
/// Dispose the CGAL object.
///
public void Dispose()
{
Release();
GC.SuppressFinalize(this);
}
///
/// Print some information about the object.
///
/// Print some information about the object.
public override string ToString()
{
return String.Format("[CGALObject: Ptr={0}, IsDiposed={1}]", Ptr.ToInt64(), IsDisposed);
}
///
/// Print the object into the console.
///
public void Print()
{
var buider = new StringBuilder();
Print(buider);
Console.WriteLine(buider.ToString());
}
///
/// Print the object into a string builder.
///
/// The builder to print into.
public virtual void Print(StringBuilder builder)
{
builder.AppendLine(ToString());
}
///
/// Release the CGAL object.
///
private void Release()
{
if (!IsDisposed)
{
if(m_ptr != IntPtr.Zero)
ReleasePtr();
m_ptr = IntPtr.Zero;
IsDisposed = true;
}
}
///
/// Swap the unmanaged pointer with another.
/// The old ptr will be released first.
///
/// The new ptr. The old ptr will be released first.
internal void Swap(IntPtr ptr)
{
if(IsDisposed)
throw new CGALUnmanagedResourcesReleasedExeception("Can not swap when object has beed disposed.");
if (m_ptr != IntPtr.Zero)
ReleasePtr(Ptr);
Ptr = ptr;
}
///
/// Allow derived class to release the unmanaged memory.
///
protected abstract void ReleasePtr();
///
/// Allow derived class to release the unmanaged memory.
///
protected virtual void ReleasePtr(IntPtr ptr)
{
throw new CGALUnmanagedResourcesNotReleasedExeception("ReleasePtr not implemented.");
}
///
/// Check if the object is still valid.
///
protected void CheckPtr()
{
if(IsDisposed)
throw new CGALUnmanagedResourcesReleasedExeception("Unmanaged resources have been released.");
if (m_ptr == IntPtr.Zero)
throw new CGALUnmanagedResourcesReleasedExeception("Unmanaged resources have not been created.");
}
}
}
================================================
FILE: CGALDotNet/CGALObjectKernel.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace CGALDotNet
{
internal abstract class CGALObjectKernel
{
protected const string DLL_NAME = "CGALWrapper.dll";
protected const CallingConvention CDECL = CallingConvention.Cdecl;
internal abstract string Name { get; }
}
}
================================================
FILE: CGALDotNet/Collections/NativeList.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Collections;
namespace CGALDotNet.Collections
{
///
///
///
///
public sealed class NativeList : NativeList, IList, IEnumerable where T : CGALObject, new()
{
///
///
///
private List m_list;
///
///
///
public NativeList() : base()
{
m_list = new List();
}
///
///
///
///
public NativeList(int count) : base(count)
{
m_list = new List(count);
}
///
///
///
///
internal NativeList(IntPtr ptr) : base(ptr)
{
for(int i = 0; i < Count; i++)
{
var p = NativeList_Get(Ptr, i);
var item = new T();
item.Swap(p);
m_list.Add(item);
}
}
///
///
///
public bool IsSync => Count == m_list.Count;
///
///
///
///
public override string ToString()
{
return String.Format("[NativeList: Count={0}, Capacity={1}, IsSync={2}]", Count, Capacity, IsSync);
}
///
///
///
///
public IEnumerator GetEnumerator()
{
for (int i = 0; i < Count; i++)
yield return m_list[i];
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
///
///
///
///
///
public T this[int i]
{
get => Get(i);
set => Set(i, value);
}
///
///
///
public void Clear()
{
m_list.Clear();
NativeList_Clear(Ptr);
}
///
///
///
///
public void Add(T item)
{
m_list.Add(item);
NativeList_Add(Ptr, item.Ptr);
}
///
///
///
///
public void AddRange(IEnumerable items)
{
foreach(var item in items)
Add(item);
}
///
///
///
///
public NativeList Copy()
{
var ptr = NativeList_Copy(Ptr);
return new NativeList(ptr);
}
///
///
///
///
///
public void CopyTo(T[] array, int startIndex)
{
for (int i = startIndex; i < Count; i++)
array[i] = Get(i);
}
///
///
///
///
///
public bool Contains(T item)
{
return m_list.Contains(item);
}
///
///
///
///
///
public int IndexOf(T item)
{
return m_list.IndexOf(item);
}
///
///
///
///
///
public void Insert(int index, T item)
{
m_list.Insert(index, item);
NativeList_Insert(Ptr, item.Ptr, index);
}
///
///
///
///
///
public bool Remove(T item)
{
var b1 = m_list.Remove(item);
var b2 = NativeList_Remove(Ptr, item.Ptr);
return b1 && b2;
}
///
///
///
///
public void RemoveAt(int index)
{
m_list.RemoveAt(index);
NativeList_RemoveAt(Ptr, index);
}
///
///
///
public void Reverse()
{
m_list.Reverse();
NativeList_Reverse(Ptr);
}
///
///
///
public void TrimExcess()
{
m_list.TrimExcess();
NativeList_TrimExcess(Ptr);
}
///
///
///
///
///
private T Get(int index)
{
return m_list[index];
}
///
///
///
///
///
private void Set(int index, T item)
{
m_list[index] = item;
NativeList_Set(Ptr, index, item.Ptr);
}
}
///
///
///
public abstract class NativeList : CGALObject
{
///
///
///
public NativeList()
{
Ptr = NativeList_Create();
}
///
///
///
///
public NativeList(int count)
{
Ptr = NativeList_CreateWithCount(count);
}
///
///
///
///
internal NativeList(IntPtr ptr)
{
Ptr = ptr;
}
///
///
///
public int Capacity => NativeList_Capacity(Ptr);
///
///
///
public int Count => NativeList_Count(Ptr);
///
///
///
public bool IsReadOnly => false;
///
///
///
protected override void ReleasePtr()
{
NativeList_Release(Ptr);
}
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern IntPtr NativeList_Create();
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern IntPtr NativeList_CreateWithCount(int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern void NativeList_Release(IntPtr listPtr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern void NativeList_Add(IntPtr listPtr, IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern void NativeList_AddRange(IntPtr listPtr, IntPtr[] ptr_array, int count);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern int NativeList_Capacity(IntPtr listPtr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern void NativeList_Clear(IntPtr listPtr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern int NativeList_Count(IntPtr listPtr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern bool NativeList_Contains(IntPtr listPtr, IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern IntPtr NativeList_Copy(IntPtr listPtr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern IntPtr NativeList_Get(IntPtr listPtr, int index);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern void NativeList_Set(IntPtr listPtr, int index, IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern int NativeList_IndexOf(IntPtr listPtr, IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern void NativeList_Insert(IntPtr listPtr, IntPtr ptr, int index);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern bool NativeList_Remove(IntPtr listPtr, IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern void NativeList_RemoveAt(IntPtr listPtr, int index);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern void NativeList_Reverse(IntPtr listPtr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
protected static extern void NativeList_TrimExcess(IntPtr listPtr);
}
}
================================================
FILE: CGALDotNet/Eigen/EigenColumnVector.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Eigen
{
///
///
///
public class EigenColumnVector : EigenVector
{
///
///
///
///
public EigenColumnVector(int dimension)
{
Ptr = EigenColumnVector_CreateVector(dimension);
}
///
///
///
///
///
public EigenColumnVector(double x, double y)
{
Ptr = EigenColumnVector_CreateVector(2);
this[0] = x;
this[1] = y;
}
///
///
///
///
///
///
public EigenColumnVector(double x, double y, double z)
{
Ptr = EigenColumnVector_CreateVector(3);
this[0] = x;
this[1] = y;
this[2] = z;
}
///
///
///
///
///
///
///
public EigenColumnVector(double x, double y, double z, double w)
{
Ptr = EigenColumnVector_CreateVector(4);
this[0] = x;
this[1] = y;
this[2] = z;
this[3] = w;
}
///
///
///
///
public EigenColumnVector(IList list)
{
Ptr = EigenColumnVector_CreateVector(list.Count);
for (int i = 0; i < list.Count; i++)
this[i] = list[i];
}
///
///
///
///
internal EigenColumnVector(IntPtr ptr) : base(ptr)
{
}
///
///
///
///
///
public override double this[int i]
{
get { return EigenColumnVector_Get(Ptr, i); }
set { EigenColumnVector_Set(Ptr, i, value); }
}
///
///
///
public override int Dimension => EigenColumnVector_Dimension(Ptr);
///
///
///
public override double Magnitude => EigenColumnVector_Norm(Ptr);
///
///
///
///
public override string ToString()
{
return String.Format("[EigenColumnVector: Dimension={0}]", Dimension);
}
///
///
///
public EigenColumnVector Normalized => new EigenColumnVector(EigenColumnVector_Normalized(Ptr));
///
///
///
public EigenRowVector Transpose => new EigenRowVector(EigenColumnVector_Transpose(Ptr));
///
///
///
public EigenColumnVector Adjoint => new EigenColumnVector(EigenColumnVector_Adjoint(Ptr));
///
///
///
public EigenColumnVector Conjugate => new EigenColumnVector(EigenColumnVector_Conjugate(Ptr));
///
///
///
///
///
///
public static double Dot(EigenColumnVector v1, EigenColumnVector v2)
{
AreSameSize(v1, v2);
return EigenColumnVector_Dot(v1.Ptr, v2.Ptr);
}
///
///
///
public override void Normalize()
{
EigenColumnVector_Normalize(Ptr);
}
///
///
///
///
public override void Resize(int dimension)
{
EigenColumnVector_Resize(Ptr, dimension);
}
///
///
///
///
///
///
///
///
public static EigenColumnVector Random(int dimension, double min, double max, int seed)
{
var ptr = EigenColumnVector_CreateVector(dimension);
var v = new EigenColumnVector(ptr);
var rnd = new Random(seed);
double range = max - min;
for (int i = 0; i < v.Dimension; i++)
v[i] = min + rnd.NextDouble() * range;
return v;
}
///
///
///
protected override void ReleasePtr()
{
EigenColumnVector_Release(Ptr);
}
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenColumnVector_CreateVector(int dimension);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenColumnVector_Release(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int EigenColumnVector_Rows(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int EigenColumnVector_Dimension(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenColumnVector_Get(IntPtr ptr, int x);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenColumnVector_Set(IntPtr ptr, int x, double value);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenColumnVector_Dot(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenColumnVector_Normalized(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenColumnVector_Normalize(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenColumnVector_Norm(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenColumnVector_Transpose(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenColumnVector_Adjoint(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenColumnVector_Conjugate(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenColumnVector_Resize(IntPtr ptr, int dimension);
}
}
================================================
FILE: CGALDotNet/Eigen/EigenMatrix.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Eigen
{
///
/// enum for egien solvers.
///
public enum EIGEN_SOLVER
{
COL_PIV_HOUSEHOLDER_QR,
PARTIAL_PIV_LU,
FULL_PIV_LU,
HOUSEHOLDER_QR,
LLT,
LDLT,
BDCSVD,
JACOBI_SVD,
FULL_PIV_HOUSEHOLDER_QR,
COMPLETE_ORTH_DECOM
}
public enum EIGEN_SOLVER_OPTIONS
{
COMPUTE_FULL_U = 4, //Used to indicate that the square matrix U is to be computed.
COMPUTE_THIN_U = 8, //Used to indicate that the thin matrix U is to be computed.
COMPUTE_FULL_V = 16, //Used to indicate that the square matrix V is to be computed.
COMPUTE_THIN_V = 32, //Used to indicate that the thin matrix V is to be computed.
}
public class EigenMatrix : CGALObject
{
///
/// Create a new matrix filled with zeros.
///
/// The number of rows.
/// The number of columns.
public EigenMatrix(int rows, int columns)
{
if (rows <= 0)
throw new ArgumentException("Row vectors count can not be <= zero.");
if (columns <= 0)
throw new ArgumentException("Column vectors count can not be <= zero.");
Ptr = EigenMatrix_Create(rows, columns);
}
///
/// Create a new matrix fill with the array contents.
///
/// The array.
public EigenMatrix(double[,] array)
{
int rowsCount = array.GetLength(0);
int columnsCount = array.GetLength(1);
if (rowsCount == 0)
throw new ArgumentException("Row vectors count can not be zero.");
if (columnsCount == 0)
throw new ArgumentException("Column vectors count can not be zero.");
Ptr = EigenMatrix_Create(rowsCount, columnsCount);
for (int i = 0; i < rowsCount; i++)
{
for (int j = 0; j < columnsCount; j++)
{
this[i, j] = array[i, j];
}
}
}
///
/// Create a new matrix filled with the contents of the column vectors.
/// All column vectors must have the same dimension.
///
///
public EigenMatrix(IList columns)
{
if (columns.Count == 0)
throw new ArgumentException("Column vectors count can not be zero.");
int rowsCount = columns.Count;
int columnsCount = columns[0].Dimension;
Ptr = EigenMatrix_Create(rowsCount, columnsCount);
for (int i = 0; i < rowsCount; i++)
{
if (columns[i].Dimension != columnsCount)
throw new ArgumentException("Column vector is not the same size as fisrt column vector.");
for (int j = 0; j < columnsCount; j++)
{
this[i, j] = columns[i][j];
}
}
}
///
/// Create a 2 x 2 matrix.
///
public EigenMatrix(double m00, double m01,
double m10, double m11)
{
Ptr = EigenMatrix_Create(2, 2);
this[0, 0] = m00; this[0, 1] = m01;
this[1, 0] = m10; this[1, 1] = m11;
}
///
/// Create a 3 x 3 matrix.
///
public EigenMatrix(double m00, double m01, double m02,
double m10, double m11, double m12,
double m20, double m21, double m22)
{
Ptr = EigenMatrix_Create(3, 3);
this[0, 0] = m00; this[0, 1] = m01; this[0, 2] = m02;
this[1, 0] = m10; this[1, 1] = m11; this[1, 2] = m12;
this[2, 0] = m20; this[2, 1] = m21; this[2, 2] = m22;
;
}
///
/// Create a 4 x 4 matrix.
///
public EigenMatrix( double m00, double m01, double m02, double m03,
double m10, double m11, double m12, double m13,
double m20, double m21, double m22, double m23,
double m30, double m31, double m32, double m33)
{
Ptr = EigenMatrix_Create(4, 4);
this[0,0] = m00; this[0,1] = m01; this[0,2] = m02; this[0,3] = m03;
this[1,0] = m10; this[1,1] = m11; this[1,2] = m12; this[1,3] = m13;
this[2,0] = m20; this[2,1] = m21; this[2,2] = m22; this[2,3] = m23;
this[3,0] = m30; this[3,1] = m31; this[3,2] = m32; this[3,3] = m33;
}
///
/// Create a new matrix from a pointer.
///
///
internal EigenMatrix(IntPtr ptr) : base(ptr)
{
}
///
/// Create a identity matrix.
///
/// The number of rows and columns of the matrix. Must be square.
/// The identity matrix.
public static EigenMatrix Identity(int size)
{
if (size <= 0)
throw new ArgumentException("Size can not be <= zero.");
var ptr = EigenMatrix_CreateIdentity(size, size);
return new EigenMatrix(ptr);
}
///
/// Create a matrix filled with the numbers 1, 2. 3, etc to end.
/// Used for debugging.
///
/// The number of rows.
/// The number columns.
/// The Matrix.
///
internal static EigenMatrix Series(int rows, int columns)
{
if (rows <= 0)
throw new ArgumentException("Rows can not be <= zero.");
if (columns <= 0)
throw new ArgumentException("Colums can not be <= zero.");
var m = new EigenMatrix(rows, columns);
int i = 0;
for (int x = 0; x < m.Rows; x++)
{
for (int y = 0; y < m.Columns; y++)
{
m[x, y] = i++;
}
}
return m;
}
///
/// Create a new matrix fill with random numbers.
///
/// The number of rows.
/// The number columns.
/// The minimum random number generated.
/// The maximum random number generated.
/// The random generators seed.
/// The matrix.
public static EigenMatrix Random(int rows, int columns, double min, double max, int seed)
{
var m = new EigenMatrix(rows, columns);
var rnd = new Random(seed);
double range = max - min;
for (int i = 0; i < m.Length; i++)
m[i] = min + rnd.NextDouble() * range;
return m;
}
///
/// The number of rows in the matrix.
///
public int Rows => EigenMatrix_Rows(Ptr);
///
/// The number of columns in the matrix.
///
public int Columns => EigenMatrix_Columns(Ptr);
///
/// The total size of the matrix which is
/// the rows times the number of columns.
///
public int Length => Rows * Columns;
///
/// The single dimension array accessor.
///
/// The array index.
/// The value at the index i.
public double this[int i]
{
get { return EigenMatrix_GetX(Ptr, i); }
set { EigenMatrix_SetX(Ptr, i, value); }
}
///
/// The double dimension array accessor.
///
/// The row index.
/// The column index.
/// The value at the index i,j.
public double this[int i, int j]
{
get { return EigenMatrix_GetXY(Ptr, i, j); }
set { EigenMatrix_SetXY(Ptr, i, j, value); }
}
///
/// The matrix string info.
///
/// The matrix string info.
public override string ToString()
{
return String.Format("[EigenMatrix: Rows={0}, Columns={1}]", Rows, Columns);
}
///
/// The matrix transposed.
/// Flips a matrix over its diagonal that is,
/// it switches the row and column indices of the matrix.
///
public EigenMatrix Transpose
{
get
{
var ptr = EigenMatrix_Transpose(Ptr);
return new EigenMatrix(ptr);
}
}
///
/// The matrices conjugate.
/// The matrix obtained by replacing each element a(ij) with its complex conjugate, A^=(a^(ij)).
///
public EigenMatrix Conjugate
{
get
{
var ptr = EigenMatrix_Conjugate(Ptr);
return new EigenMatrix(ptr);
}
}
///
/// The matrices adjoint.
/// The transpose of its cofactor matrix.
///
public EigenMatrix Adjoint
{
get
{
var ptr = EigenMatrix_Adjoint(Ptr);
return new EigenMatrix(ptr);
}
}
///
/// Is the matrix invertible.
///
public bool IsInvertible
{
get
{
if(IsSquare) return false;
return EigenMatrix_IsInvertible(Ptr);
}
}
///
/// The inverse of a square matrix A,
/// sometimes called a reciprocal matrix,
/// is a matrix A^(-1) such that AA^(-1)=I.
/// DOes not check if the matrix is invertible.
///
public EigenMatrix Inverse
{
get
{
CheckIfSqaure(this);
var ptr = EigenMatrix_Inverse(Ptr);
return new EigenMatrix(ptr);
}
}
///
/// The determinant is a scalar value that is a
/// function of the entries of a square matrix.
///
public double Determinant
{
get
{
CheckIfSqaure(this);
return EigenMatrix_Determinant(Ptr);
}
}
///
/// The trace of a square matrix is defined to be the
/// sum of elements on the main diagonal from the upper left to the lower right.
///
public double Trace
{
get
{
CheckIfSqaure(this);
return EigenMatrix_Trace(Ptr);
}
}
///
/// A square matrix has the same number of rows and columns.
///
public bool IsSquare => Rows == Columns;
///
/// A diagonal matrix is a matrix in which the entries
/// outside the main diagonal are all zero.
///
public bool IsDiagonal => EigenMatrix_IsDiagonal(Ptr);
///
/// A square matrix is called upper triangular
/// if all the entries below the main diagonal are zero.
///
public bool IsUpperTriangular => EigenMatrix_IsUpperTriangular(Ptr);
///
/// A square matrix is called lower triangular
/// if all the entries above the main diagonal are zero.
///
public bool IsLowerTriangular => EigenMatrix_IsLowerTriangular(Ptr);
///
/// Multiple each component in matrix by the scalar.
///
/// The matrix.
/// The scalar.
/// The matrix with each component multiplied by the scalar.
public static EigenMatrix operator *(EigenMatrix m, double s)
{
return new EigenMatrix(EigenMatrix_MulScalar(m.Ptr, s));
}
///
/// Divide each component in matrix by the scalar.
///
/// The matrix.
/// The scalar.
/// The matrix with each component divided by the scalar.
public static EigenMatrix operator /(EigenMatrix m, double s)
{
return new EigenMatrix(EigenMatrix_DivideScalar(m.Ptr, s));
}
///
/// Multiple the two matrices.
/// The first matrices number of columns must
/// the same as the second matrices number of rows.
///
/// The first matrix.
/// The second matrix.
/// The product matrix.
public static EigenMatrix operator *(EigenMatrix m1, EigenMatrix m2)
{
IsValidProduct(m1, m2);
return new EigenMatrix(EigenMatrix_MulMatrix(m1.Ptr, m2.Ptr));
}
///
/// Add two matrices.
/// The matrices must be the same size.
///
/// The first matrix.
/// The second matrix.
/// A matrix where each compoent is the sum of the other two matrices.
public static EigenMatrix operator +(EigenMatrix m1, EigenMatrix m2)
{
AreSameSize(m1, m2);
return new EigenMatrix(EigenMatrix_AddMatrix(m1.Ptr, m2.Ptr));
}
///
/// Subtract two matrices.
/// The matrices must be the same size.
///
/// The first matrix.
/// The second matrix.
/// A matrix where each compoent is the difference of the other two matrices.
public static EigenMatrix operator -(EigenMatrix m1, EigenMatrix m2)
{
AreSameSize(m1, m2);
return new EigenMatrix(EigenMatrix_SubMatrix(m1.Ptr, m2.Ptr));
}
///
/// Multiple a matrix and a column vector.
///
/// The matrix.
/// The column vector.
/// The product column vector.
public static EigenColumnVector operator *(EigenMatrix m, EigenColumnVector v)
{
IsValidProduct(m, v);
return new EigenColumnVector(EigenMatrix_MulColumnVector(m.Ptr, v.Ptr));
}
///
/// Is this matrix the identity matrix.
///
/// The threshold the values in the
/// matrix can be to the expected value.
/// Is this matrix the identity matrix.
public bool IsIdentity(double eps = MathUtil.DEG_TO_RAD_64)
{
if (!IsSquare) return false;
for (int y = 0; y < Columns; y++)
{
for (int x = 0; x < Rows; x++)
{
if (x == y)
{
if (!MathUtil.IsOne(this[x, y], eps))
return false;
}
else
{
if (!MathUtil.IsZero(this[x, y], eps))
return false;
}
}
}
return true;
}
///
/// Is this matrix filled with zeros.
///
/// The threshold the values in the
/// matrix can be to the expected value.
/// Is this matrix filled with zeros.
public bool IsZero(double eps = MathUtil.DEG_TO_RAD_64)
{
for (int y = 0; y < Columns; y++)
{
for (int x = 0; x < Rows; x++)
{
if (!MathUtil.IsZero(this[x, y], eps))
return false;
}
}
return true;
}
///
/// Are all the values in this matrix positive.
///
/// Are all the values in this matrix positive.
public bool IsPositive()
{
for (int y = 0; y < Columns; y++)
{
for (int x = 0; x < Rows; x++)
{
if (this[x, y] < 0)
return false;
}
}
return true;
}
///
/// Does the matrix have a component that is nan.
///
/// Does the matrix have a component that is nan.
public bool HasNAN()
{
for (int y = 0; y < Columns; y++)
{
for (int x = 0; x < Rows; x++)
{
if (double.IsNaN(this[x, y]))
return true;
}
}
return false;
}
///
/// Replaces all nan values in the matrix with 0.
///
public void NoNAN()
{
for (int y = 0; y < Columns; y++)
{
for (int x = 0; x < Rows; x++)
{
if (double.IsNaN(this[x, y]))
this[x, y] = 0;
}
}
}
///
/// Are all the values in the matrix finite (non-infinite and non-nan).
///
/// Are all the values in the matrix finite (non-infinite and non-nan).
public bool IsFinite()
{
for (int y = 0; y < Columns; y++)
{
for (int x = 0; x < Rows; x++)
{
if (!MathUtil.IsFinite(this[x, y]))
return false;
}
}
return true;
}
///
/// Replaces all infinite and nan values in matrix with 0.
///
public void MakeFinite()
{
for (int y = 0; y < Columns; y++)
{
for (int x = 0; x < Rows; x++)
{
if (!MathUtil.IsFinite(this[x, y]))
this[x, y] = 0;
}
}
}
///
/// Are all the values in the matrix the same.
///
/// The threshold the values in the
/// matrix can be to the expected value.
/// Are all the values in the matrix the same.
public bool IsConst(double eps = MathUtil.EPS_64)
{
var value = this[0];
for (int y = 0; y < Columns; y++)
{
for (int x = 0; x < Rows; x++)
{
if (!MathUtil.AlmostEqual(this[x, y], value, eps))
return false;
}
}
return true;
}
///
/// Create a sub matrix from this matrix.
///
/// The row to start at.
/// THe column to start at.
/// The number of rows.
/// The number of columns.
/// A sub matrix from this matrix.
public EigenMatrix SubMatrix(int startRow, int startCol, int rows, int cols)
{
var ptr = EigenMatrix_Block(Ptr, startRow, startCol, rows, cols);
return new EigenMatrix(ptr);
}
///
/// Create a sub matrix from this matrix.
///
/// The number of rows.
/// The number of columns.
/// A sub matrix from this matrix.
public EigenMatrix SubMatrix(int rows, int cols)
{
var ptr = EigenMatrix_Reshaped(Ptr, rows, cols);
return new EigenMatrix(ptr);
}
///
/// Solve the linear system.
///
/// The vector to solve.
/// The solver type.
/// The solution vector.
public EigenColumnVector Solve(EigenColumnVector v, EIGEN_SOLVER solver = EIGEN_SOLVER.COL_PIV_HOUSEHOLDER_QR)
{
switch (solver)
{
case EIGEN_SOLVER.COL_PIV_HOUSEHOLDER_QR:
return ColPivHouseholderQr(v);
case EIGEN_SOLVER.PARTIAL_PIV_LU:
return PartialPivLu(v);
case EIGEN_SOLVER.FULL_PIV_LU:
return FullPivLu(v);
case EIGEN_SOLVER.HOUSEHOLDER_QR:
return HouseholderQr(v);
case EIGEN_SOLVER.LLT:
return LLT(v);
case EIGEN_SOLVER.LDLT:
return LDLT(v);
case EIGEN_SOLVER.BDCSVD:
return BdcSvd(v);
case EIGEN_SOLVER.JACOBI_SVD:
return JacobiSvd(v);
case EIGEN_SOLVER.FULL_PIV_HOUSEHOLDER_QR:
return FullPivHouseholderQR(v);
case EIGEN_SOLVER.COMPLETE_ORTH_DECOM:
return CompleteOrthogonalDecomposition(v);
default:
return ColPivHouseholderQr(v);
}
}
///
/// Solve the linear system.
///
/// The vector to solve.
/// The solver type.
/// The solution vector.
public EigenMatrix Solve(EigenMatrix v, EIGEN_SOLVER solver = EIGEN_SOLVER.COL_PIV_HOUSEHOLDER_QR)
{
switch (solver)
{
case EIGEN_SOLVER.COL_PIV_HOUSEHOLDER_QR:
return ColPivHouseholderQr(v);
case EIGEN_SOLVER.PARTIAL_PIV_LU:
return PartialPivLu(v);
case EIGEN_SOLVER.FULL_PIV_LU:
return FullPivLu(v);
case EIGEN_SOLVER.HOUSEHOLDER_QR:
return HouseholderQr(v);
case EIGEN_SOLVER.LLT:
return LLT(v);
case EIGEN_SOLVER.LDLT:
return LDLT(v);
case EIGEN_SOLVER.BDCSVD:
return BdcSvd(v);
case EIGEN_SOLVER.JACOBI_SVD:
return JacobiSvd(v);
case EIGEN_SOLVER.FULL_PIV_HOUSEHOLDER_QR:
return FullPivHouseholderQR(v);
case EIGEN_SOLVER.COMPLETE_ORTH_DECOM:
return CompleteOrthogonalDecomposition(v);
default:
return ColPivHouseholderQr(v);
}
}
public EigenColumnVector ColPivHouseholderQr(EigenColumnVector v)
{
IsValidProduct(this, v);
var ptr = EigenMatrix_ColPivHouseholderQr_Vec(Ptr, v.Ptr);
return new EigenColumnVector(ptr);
}
public EigenMatrix ColPivHouseholderQr(EigenMatrix m)
{
IsValidProduct(this, m);
var ptr = EigenMatrix_ColPivHouseholderQr_Mat(Ptr, m.Ptr);
return new EigenMatrix(ptr);
}
public EigenColumnVector PartialPivLu(EigenColumnVector v)
{
IsValidProduct(this, v);
if (!IsInvertible)
throw new InvalidOperationException("Matrix must be invertible for PartialPivLu solver.");
var ptr = EigenMatrix_PartialPivLu_Vec(Ptr, v.Ptr);
return new EigenColumnVector(ptr);
}
public EigenMatrix PartialPivLu(EigenMatrix v)
{
IsValidProduct(this, v);
if (!IsInvertible)
throw new InvalidOperationException("Matrix must be invertible for PartialPivLu solver.");
var ptr = EigenMatrix_PartialPivLu_Mat(Ptr, v.Ptr);
return new EigenMatrix(ptr);
}
public EigenColumnVector FullPivLu(EigenColumnVector v)
{
IsValidProduct(this, v);
var ptr = EigenMatrix_FullPivLu_Vec(Ptr, v.Ptr);
return new EigenColumnVector(ptr);
}
public EigenMatrix FullPivLu(EigenMatrix v)
{
IsValidProduct(this, v);
var ptr = EigenMatrix_FullPivLu_Mat(Ptr, v.Ptr);
return new EigenMatrix(ptr);
}
public EigenColumnVector HouseholderQr(EigenColumnVector v)
{
IsValidProduct(this, v);
var ptr = EigenMatrix_HouseholderQr_Vec(Ptr, v.Ptr);
return new EigenColumnVector(ptr);
}
public EigenMatrix HouseholderQr(EigenMatrix v)
{
IsValidProduct(this, v);
var ptr = EigenMatrix_HouseholderQr_Mat(Ptr, v.Ptr);
return new EigenMatrix(ptr);
}
public EigenColumnVector LLT(EigenColumnVector v)
{
IsValidProduct(this, v);
if (!IsPositive())
throw new InvalidOperationException("Matrix must be positive for LLT solver.");
var ptr = EigenMatrix_LLT_Vec(Ptr, v.Ptr);
return new EigenColumnVector(ptr);
}
public EigenMatrix LLT(EigenMatrix v)
{
IsValidProduct(this, v);
if (!IsPositive())
throw new InvalidOperationException("Matrix must be positive for LLT solver.");
var ptr = EigenMatrix_LLT_Mat(Ptr, v.Ptr);
return new EigenMatrix(ptr);
}
public EigenColumnVector LDLT(EigenColumnVector v)
{
IsValidProduct(this, v);
var ptr = EigenMatrix_LDLT_Vec(Ptr, v.Ptr);
return new EigenColumnVector(ptr);
}
public EigenMatrix LDLT(EigenMatrix m)
{
IsValidProduct(this, m);
var ptr = EigenMatrix_LDLT_Mat(Ptr, m.Ptr);
return new EigenMatrix(ptr);
}
public EigenColumnVector BdcSvd(EigenColumnVector v)
{
IsValidProduct(this, v);
int options = (int)EIGEN_SOLVER_OPTIONS.COMPUTE_THIN_U |
(int)EIGEN_SOLVER_OPTIONS.COMPUTE_THIN_V;
var ptr = EigenMatrix_BdcSvd_Vec(Ptr, v.Ptr, options);
return new EigenColumnVector(ptr);
}
public EigenMatrix BdcSvd(EigenMatrix v)
{
IsValidProduct(this, v);
int options = (int)EIGEN_SOLVER_OPTIONS.COMPUTE_THIN_U |
(int)EIGEN_SOLVER_OPTIONS.COMPUTE_THIN_V;
var ptr = EigenMatrix_BdcSvd_Mat(Ptr, v.Ptr, options);
return new EigenMatrix(ptr);
}
public EigenColumnVector JacobiSvd(EigenColumnVector v)
{
IsValidProduct(this, v);
int options = (int)EIGEN_SOLVER_OPTIONS.COMPUTE_THIN_U |
(int)EIGEN_SOLVER_OPTIONS.COMPUTE_THIN_V;
var ptr = EigenMatrix_JacobiSvd_Vec(Ptr, v.Ptr, options);
return new EigenColumnVector(ptr);
}
public EigenMatrix JacobiSvd(EigenMatrix v)
{
IsValidProduct(this, v);
int options = (int)EIGEN_SOLVER_OPTIONS.COMPUTE_THIN_U |
(int)EIGEN_SOLVER_OPTIONS.COMPUTE_THIN_V;
var ptr = EigenMatrix_JacobiSvd_Mat(Ptr, v.Ptr, options);
return new EigenMatrix(ptr);
}
public EigenColumnVector FullPivHouseholderQR(EigenColumnVector v)
{
IsValidProduct(this, v);
var ptr = EigenMatrix_FullPivHouseholderQr_Vec(Ptr, v.Ptr);
return new EigenColumnVector(ptr);
}
public EigenMatrix FullPivHouseholderQR(EigenMatrix v)
{
IsValidProduct(this, v);
var ptr = EigenMatrix_FullPivHouseholderQr_Mat(Ptr, v.Ptr);
return new EigenMatrix(ptr);
}
public EigenColumnVector CompleteOrthogonalDecomposition(EigenColumnVector v)
{
IsValidProduct(this, v);
var ptr = EigenMatrix_CompleteOrthogonalDecomposition_Vec(Ptr, v.Ptr);
return new EigenColumnVector(ptr);
}
public EigenMatrix CompleteOrthogonalDecomposition(EigenMatrix v)
{
IsValidProduct(this, v);
var ptr = EigenMatrix_CompleteOrthogonalDecomposition_Mat(Ptr, v.Ptr);
return new EigenMatrix(ptr);
}
///
/// Find the relative error from the linear system.
///
/// The vector that was solved.
/// The vector that was the solution.
/// The relative error.
public double RelativeError(EigenColumnVector v, EigenColumnVector x)
{
IsValidProduct(this, v);
return EigenMatrix_RelativeError_Vec(Ptr, v.Ptr, x.Ptr);
}
///
/// Find the relative error from the linear system.
///
/// The vector that was solved.
/// The vector that was the solution.
/// The relative error.
public double RelativeError(EigenMatrix v, EigenMatrix x)
{
IsValidProduct(this, v);
return EigenMatrix_RelativeError_Mat(Ptr, v.Ptr, x.Ptr);
}
///
/// Find the eigen values of the matrix.
///
/// The eigen values if found, null otherwise.
/// True if the values could be determined.
public bool EigenValues(out EigenColumnVector values)
{
var ptr = EigenMatrix_Eigenvalues(Ptr);
if (ptr != IntPtr.Zero)
{
values = new EigenColumnVector(ptr);
return true;
}
else
{
values = null;
return false;
}
}
///
/// Find the eigen vectors of the matrix.
///
/// The eigen vectors if found, null otherwise.
/// True if the vectors could be determined.
public bool EigenVectors(out EigenMatrix vectors)
{
var ptr = EigenMatrix_Eigenvectors(Ptr);
if (ptr != IntPtr.Zero)
{
vectors = new EigenMatrix(ptr);
return true;
}
else
{
vectors = null;
return false;
}
}
///
///
///
///
///
///
public bool EigenValuesAndVectors(out EigenColumnVector values, out EigenMatrix vectors)
{
IntPtr valuesPtr;
IntPtr vectorsPtr;
if (EigenMatrix_EigenValuesVectors(Ptr, out valuesPtr, out vectorsPtr))
{
values = new EigenColumnVector(valuesPtr);
vectors = new EigenMatrix(vectorsPtr);
return true;
}
else
{
values = null;
vectors = null;
return false;
}
}
///
/// Try and find the inverse of the matrix.
///
/// The inverse if found, null otherwise.
/// True if the inverse was found.
public bool TryInverse(out EigenMatrix inverse)
{
inverse = null;
if(!IsSquare) return false;
var ptr = EigenMatrix_TryInverse(Ptr);
if(ptr != IntPtr.Zero)
{
inverse = new EigenMatrix(ptr);
return true;
}
else
{
return false;
}
}
///
///
///
///
///
public EigenRowVector GetRow(int Row)
{
CheckRows(this, Row + 1);
var v = new EigenRowVector(Rows);
for (int i = 0; i < Rows; i++)
v[i] = this[i, Row];
return v;
}
///
///
///
///
///
public void SetRow(int Row, EigenRowVector v)
{
AreSameSize(this, v);
for (int i = 0; i < Rows; i++)
this[i, Row] = v[i];
}
///
///
///
///
///
///
public void SetRow(int row, double x, double y)
{
CheckSize(this, row + 1, 2);
this[row, 0] = x;
this[row, 1] = y;
}
///
///
///
///
///
///
///
public void SetRow(int row, double x, double y, double z)
{
CheckSize(this, row + 1, 3);
this[row, 0] = x;
this[row, 1] = y;
this[row, 2] = z;
}
///
///
///
///
///
///
///
///
public void SetRow(int row, double x, double y, double z, double w)
{
CheckSize(this, row + 1, 4);
this[row, 0] = x;
this[row, 1] = y;
this[row, 2] = z;
this[row, 3] = w;
}
///
///
///
///
///
public EigenColumnVector GetColumn(int Column)
{
CheckColumns(this, Column + 1);
var v = new EigenColumnVector(Columns);
for (int i = 0; i < Columns; i++)
v[i] = this[Column, i];
return v;
}
///
///
///
///
///
public void SetColumn(int Column, EigenColumnVector v)
{
AreSameSize(this, v);
for (int i = 0; i < Columns; i++)
this[Column, i] = v[i];
}
///
///
///
///
///
///
public void SetColumn(int column, double x, double y)
{
CheckSize(this, 2, column + 1);
this[0, column] = x;
this[1, column] = y;
}
///
///
///
///
///
///
///
public void SetColumn(int column, double x, double y, double z)
{
CheckSize(this, 3, column + 1);
this[0, column] = x;
this[1, column] = y;
this[2, column] = z;
}
///
///
///
///
///
///
///
///
public void SetColumn(int column, double x, double y, double z, double w)
{
CheckSize(this, 4, column + 1);
this[0, column] = x;
this[1, column] = y;
this[2, column] = z;
this[3, column] = w;
}
///
///
///
///
public void Round(int digits)
{
for (int i = 0; i < Length; i++)
this[i] = Math.Round(this[i], digits);
}
///
///
///
///
///
public static EigenMatrix Translate(Point3d point)
{
var m = EigenMatrix.Identity(4);
m.SetColumn(3, point.x, point.y, point.z, 1);
return m;
}
///
///
///
///
///
public static EigenMatrix Scale(Point3d point)
{
var m = EigenMatrix.Identity(4);
m[0, 0] = point.x;
m[1, 1] = point.y;
m[2, 2] = point.z;
return m;
}
///
///
///
///
///
static public EigenMatrix Scale(double s)
{
var m = EigenMatrix.Identity(4);
m[0, 0] = s;
m[1, 1] = s;
m[2, 2] = s;
return m;
}
///
///
///
///
///
static public EigenMatrix RotateX(Radian radian)
{
var m = new EigenMatrix(4, 4);
double ca = MathUtil.Cos(radian);
double sa = MathUtil.Sin(radian);
return new EigenMatrix( 1, 0, 0, 0,
0, ca, -sa, 0,
0, sa, ca, 0,
0, 0, 0, 1);
}
///
///
///
///
///
static public EigenMatrix RotateY(Radian radian)
{
var m = new EigenMatrix(4, 4);
double ca = MathUtil.Cos(radian);
double sa = MathUtil.Sin(radian);
return new EigenMatrix(ca, 0, sa, 0,
0, 1, 0, 0,
-sa, 0, ca, 0,
0, 0, 0, 1);
}
///
///
///
///
///
static public EigenMatrix RotateZ(Radian radian)
{
var m = new EigenMatrix(4, 4);
double ca = MathUtil.Cos(radian);
double sa = MathUtil.Sin(radian);
return new EigenMatrix(ca, -sa, 0, 0,
sa, ca, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1);
}
///
/// Create a rotation from a angle and the rotation axis.
///
/// The rotation amount.
/// The axis to rotate on.
/// The rotation matrix.
static public EigenMatrix Rotate(Radian radian, Vector3d axis)
{
var m = EigenMatrix.Identity(4);
double sinTheta = MathUtil.Sin(radian);
double cosTheta = MathUtil.Cos(radian);
// Compute rotation of first basis vector
m[0, 0] = axis.x * axis.x + (1 - axis.x * axis.x) * cosTheta;
m[0, 1] = axis.x * axis.y * (1 - cosTheta) - axis.z * sinTheta;
m[0, 2] = axis.x * axis.z * (1 - cosTheta) + axis.y * sinTheta;
m[0, 3] = 0;
// Compute rotations of second and third basis vectors
m[1, 0] = axis.x * axis.y * (1 - cosTheta) + axis.z * sinTheta;
m[1, 1] = axis.y * axis.y + (1 - axis.y * axis.y) * cosTheta;
m[1, 2] = axis.y * axis.z * (1 - cosTheta) - axis.x * sinTheta;
m[1, 3] = 0;
m[2, 0] = axis.x * axis.z * (1 - cosTheta) - axis.y * sinTheta;
m[2, 1] = axis.y * axis.z * (1 - cosTheta) + axis.x * sinTheta;
m[2, 2] = axis.z * axis.z + (1 - axis.z * axis.z) * cosTheta;
m[2, 3] = 0;
return m;
}
///
///
///
///
public override void Print(StringBuilder builder)
{
builder.AppendLine(this.ToString());
for (int x = 0; x < Rows; x++)
{
for (int y = 0; y < Columns; y++)
{
builder.Append(this[x, y].ToString());
if (y != Columns - 1)
builder.Append(",");
}
builder.AppendLine();
}
}
internal static void CheckIfSqaure(EigenMatrix m)
{
if (!m.IsSquare)
throw new InvalidOperationException("Matrix must be Square.");
}
internal static void IsValidProduct(EigenMatrix m, EigenColumnVector v)
{
if (v.Dimension != m.Columns)
throw new InvalidOperationException("Matrix must have same number of columns as vectors dimension.");
}
internal static void IsValidProduct(EigenMatrix m1, EigenMatrix m2)
{
if (m1.Columns != m2.Rows)
throw new InvalidOperationException("Matrix1 must have same number of columns as matrix2 has rows.");
}
internal static void AreSameSize(EigenMatrix m1, EigenMatrix m2)
{
if (m1.Rows != m2.Rows)
throw new InvalidOperationException("Matrix1 must be the same size as matrix2.");
if (m1.Columns != m2.Columns)
throw new InvalidOperationException("Matrix1 must be the same size as matrix2.");
}
internal static void AreSameSize(EigenMatrix m, EigenRowVector v)
{
if (m.Rows != v.Dimension)
throw new InvalidOperationException("Matrix must have the same number of rows as vector dimension.");
}
internal static void AreSameSize(EigenMatrix m, EigenColumnVector v)
{
if (m.Columns != v.Dimension)
throw new InvalidOperationException("Matrix must have the same number of columns as vector dimension.");
}
internal static void CheckSize(EigenMatrix m, int rows, int columns)
{
if (rows > m.Rows)
throw new InvalidOperationException(String.Format("Matrix must have at least {0} rows.", rows));
if (columns > m.Columns)
throw new InvalidOperationException(String.Format("Matrix must have at least {0} columns.", columns));
}
internal static void CheckRows(EigenMatrix m, int rows)
{
if (rows > m.Rows)
throw new InvalidOperationException(String.Format("Matrix must have at least {0} rows.", rows));
}
internal static void CheckColumns(EigenMatrix m, int columns)
{
if (columns > m.Columns)
throw new InvalidOperationException(String.Format("Matrix must have at least {0} rows.", columns));
}
protected override void ReleasePtr()
{
EigenMatrix_Release(Ptr);
}
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_Create(int rows, int columns);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_CreateIdentity(int rows, int columns);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenMatrix_Release(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int EigenMatrix_Rows(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int EigenMatrix_Columns(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenMatrix_GetXY(IntPtr ptr, int x, int y);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenMatrix_SetXY(IntPtr ptr, int x, int y, double value);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenMatrix_GetX(IntPtr ptr, int x);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenMatrix_SetX(IntPtr ptr, int x, double value);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_Transpose(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_Conjugate(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_Adjoint(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_Inverse(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenMatrix_Determinant(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenMatrix_Trace(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool EigenMatrix_IsIdentity(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool EigenMatrix_IsDiagonal(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool EigenMatrix_IsUpperTriangular(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool EigenMatrix_IsLowerTriangular(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_MulScalar(IntPtr ptr1, double s);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_DivideScalar(IntPtr ptr1, double s);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_MulMatrix(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_AddMatrix(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_SubMatrix(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_MulColumnVector(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_Block(IntPtr ptr, int startRox, int startCol, int blockRows, int blockCols);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_Reshaped(IntPtr ptr, int rows, int cols);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_ColPivHouseholderQr_Vec(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_ColPivHouseholderQr_Mat(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_PartialPivLu_Vec(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_PartialPivLu_Mat(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_FullPivLu_Vec(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_FullPivLu_Mat(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_HouseholderQr_Vec(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_HouseholderQr_Mat(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_LLT_Vec(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_LLT_Mat(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_LDLT_Vec(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_LDLT_Mat(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_BdcSvd_Vec(IntPtr ptr1, IntPtr ptr2, int options);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_BdcSvd_Mat(IntPtr ptr1, IntPtr ptr2, int options);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_JacobiSvd_Vec(IntPtr ptr1, IntPtr ptr2, int options);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_JacobiSvd_Mat(IntPtr ptr1, IntPtr ptr2, int options);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_FullPivHouseholderQr_Vec(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_FullPivHouseholderQr_Mat(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_CompleteOrthogonalDecomposition_Vec(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_CompleteOrthogonalDecomposition_Mat(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenMatrix_RelativeError_Vec(IntPtr ptr1, IntPtr ptr2, IntPtr ptr3);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenMatrix_RelativeError_Mat(IntPtr ptr1, IntPtr ptr2, IntPtr ptr3);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_Eigenvalues(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_Eigenvectors(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool EigenMatrix_EigenValuesVectors(IntPtr ptr, [Out] out IntPtr values, [Out] out IntPtr vectors);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern bool EigenMatrix_IsInvertible(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenMatrix_TryInverse(IntPtr ptr);
}
}
================================================
FILE: CGALDotNet/Eigen/EigenRowVector.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Eigen
{
///
///
///
public class EigenRowVector : EigenVector
{
///
///
///
///
public EigenRowVector(int dimension)
{
Ptr = EigenRowVector_CreateVector(dimension);
}
///
///
///
///
///
public EigenRowVector(double x, double y)
{
Ptr = EigenRowVector_CreateVector(2);
this[0] = x;
this[1] = y;
}
public EigenRowVector(double x, double y, double z)
{
Ptr = EigenRowVector_CreateVector(3);
this[0] = x;
this[1] = y;
this[2] = z;
}
///
///
///
///
///
///
///
public EigenRowVector(double x, double y, double z, double w)
{
Ptr = EigenRowVector_CreateVector(4);
this[0] = x;
this[1] = y;
this[2] = z;
this[3] = w;
}
///
///
///
///
public EigenRowVector(IList list)
{
Ptr = EigenRowVector_CreateVector(list.Count);
for(int i = 0; i < list.Count; i++)
this[i] = list[i];
}
///
///
///
///
internal EigenRowVector(IntPtr ptr) : base(ptr)
{
}
///
///
///
///
///
public override double this[int i]
{
get { return EigenRowVector_Get(Ptr, i); }
set { EigenRowVector_Set(Ptr, i, value); }
}
///
///
///
public override int Dimension => EigenRowVector_Dimension(Ptr);
///
///
///
public override double Magnitude => EigenRowVector_Norm(Ptr);
///
/// /
///
///
public override string ToString()
{
return String.Format("[EigenRowVector: Dimension={0}]", Dimension);
}
///
///
///
public EigenRowVector Normalized => new EigenRowVector(EigenRowVector_Normalized(Ptr));
///
///
///
public EigenColumnVector Transpose => new EigenColumnVector(EigenRowVector_Transpose(Ptr));
///
///
///
public EigenRowVector Adjoint => new EigenRowVector(EigenRowVector_Adjoint(Ptr));
///
///
///
public EigenRowVector Conjugate => new EigenRowVector(EigenRowVector_Conjugate(Ptr));
///
///
///
///
///
///
public static double Dot(EigenRowVector v1, EigenRowVector v2)
{
AreSameSize(v1, v2);
return EigenRowVector_Dot(v1.Ptr, v2.Ptr);
}
///
///
///
public override void Normalize()
{
EigenRowVector_Normalize(Ptr);
}
public override void Resize(int dimension)
{
EigenRowVector_Resize(Ptr, dimension);
}
///
///
///
///
///
///
///
///
public static EigenRowVector Random(int dimension, double min, double max, int seed)
{
var ptr = EigenRowVector_CreateVector(dimension);
var v = new EigenRowVector(ptr);
var rnd = new Random(seed);
double range = max - min;
for (int i = 0; i < v.Dimension; i++)
v[i] = min + rnd.NextDouble() * range;
return v;
}
///
///
///
protected override void ReleasePtr()
{
EigenRowVector_Release(Ptr);
}
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenRowVector_CreateVector(int dimension);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenRowVector_Release(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int EigenRowVector_Rows(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern int EigenRowVector_Dimension(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenRowVector_Get(IntPtr ptr, int x);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenRowVector_Set(IntPtr ptr, int x, double value);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenRowVector_Dot(IntPtr ptr1, IntPtr ptr2);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenRowVector_Normalized(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenRowVector_Normalize(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern double EigenRowVector_Norm(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenRowVector_Transpose(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenRowVector_Adjoint(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern IntPtr EigenRowVector_Conjugate(IntPtr ptr);
[DllImport(DLL_NAME, CallingConvention = CDECL)]
private static extern void EigenRowVector_Resize(IntPtr ptr, int dimension);
}
}
================================================
FILE: CGALDotNet/Eigen/EigenVector.cs
================================================
using System;
using System.Text;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Eigen
{
///
///
///
public abstract class EigenVector : CGALObject
{
///
///
///
internal EigenVector()
{
}
///
///
///
///
internal EigenVector(IntPtr ptr) : base(ptr)
{
}
///
/// The first value in the vector.
///
public double x
{
get { return this[0]; }
set { this[0] = value; }
}
///
/// The second value in the vector.
///
public double y
{
get { return this[1]; }
set { this[1] = value; }
}
///
/// The third value in the vector.
///
public double z
{
get { return this[2]; }
set { this[2] = value; }
}
///
/// The fourth value in the vector.
///
public double w
{
get { return this[3]; }
set { this[3] = value; }
}
///
///
///
///
///
public abstract double this[int i] { get; set; }
///
///
///
public abstract int Dimension { get; }
///
///
///
public abstract double Magnitude { get; }
///
///
///
public abstract void Normalize();
///
///
///
///
public abstract void Resize(int dimension);
///
///
///
///
///
public bool IsZero(double eps = MathUtil.DEG_TO_RAD_64)
{
for (int x = 0; x < Dimension; x++)
{
if (!MathUtil.IsZero(this[x], eps))
return false;
}
return true;
}
///
///
///
///
public bool IsPositive()
{
for (int x = 0; x < Dimension; x++)
{
if (this[x] < 0)
return false;
}
return true;
}
///
///
///
///
public bool HasNAN()
{
for (int x = 0; x < Dimension; x++)
{
if (double.IsNaN(this[x]))
return true;
}
return false;
}
///
///
///
public void NoNAN()
{
for (int x = 0; x < Dimension; x++)
{
if (double.IsNaN(this[x]))
this[x] = 0;
}
}
///
///
///
///
public bool IsFinite()
{
for (int x = 0; x < Dimension; x++)
{
if (!MathUtil.IsFinite(this[x]))
return false;
}
return true;
}
///
///
///
public void MakeFinite()
{
for (int x = 0; x < Dimension; x++)
{
if (!MathUtil.IsFinite(this[x]))
this[x] = 0;
}
}
///
///
///
///
///
public bool IsConst(double eps = MathUtil.EPS_64)
{
var value = this[0];
for (int x = 0; x < Dimension; x++)
{
if (!MathUtil.AlmostEqual(this[x], value, eps))
return false;
}
return true;
}
///
///
///
///
public void Round(int digits)
{
for (int i = 0; i < Dimension; i++)
this[i] = Math.Round(this[i], digits);
}
///
///
///
///
public override void Print(StringBuilder builder)
{
builder.AppendLine(this.ToString());
if (this is EigenColumnVector)
{
for (int i = 0; i < Dimension; i++)
{
builder.Append(this[i].ToString());
if (i != Dimension - 1)
builder.AppendLine(",");
else
builder.AppendLine();
}
}
else
{
for (int i = 0; i < Dimension; i++)
{
builder.Append(this[i].ToString());
if (i != Dimension - 1)
builder.Append(",");
else
builder.AppendLine();
}
}
}
///
///
///
///
///
///
internal static void AreSameSize(EigenVector v1, EigenVector v2)
{
if (v1.Dimension != v2.Dimension)
throw new InvalidOperationException("Vector1 must be the same size as Vector2.");
}
}
}
================================================
FILE: CGALDotNet/Extensions/ArrayExtensions.cs
================================================
using System;
using System.Collections.Generic;
using CGALDotNet.Triangulations;
namespace CGALDotNet.Extensions
{
public static class ArrayExtensions
{
public static void Round(this TriVertex2[] array, int digits)
{
if (digits < 0) return;
for (int i = 0; i < array.Length; i++)
{
var p = array[i].Point;
array[i].Point = p.Rounded(digits);
}
}
public static void Round(this TriVertex3[] array, int digits)
{
if (digits < 0) return;
for (int i = 0; i < array.Length; i++)
{
var p = array[i].Point;
array[i].Point = p.Rounded(digits);
}
}
}
}
================================================
FILE: CGALDotNet/Extensions/EnumExtensions.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
namespace CGALDotNet.Extensions
{
public static class EnumExtensions
{
internal static bool ToBool(this BOOL_OR_UNDETERMINED e)
{
return e == BOOL_OR_UNDETERMINED.TRUE;
}
}
}
================================================
FILE: CGALDotNet/Extensions/PrimativeExtensions.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
namespace CGALDotNet.Extensions
{
public static class PrimativeExtensions
{
internal static BOOL_OR_UNDETERMINED ToBoolOrUndetermined(this bool b)
{
return b ? BOOL_OR_UNDETERMINED.TRUE : BOOL_OR_UNDETERMINED.FALSE;
}
}
}
================================================
FILE: CGALDotNet/Geometry/Box2.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
using CGALDotNet;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Geometry
{
///
/// The generic Box wrapper for a CGAL object.
///
/// The kernel type.
public sealed class Box2 : Box2 where K : CGALKernel, new()
{
///
/// Create box from min and max values.
///
/// The min x and y value.
/// The max x and y value.
public Box2(double min, double max) :
base(new Point2d(min), new Point2d(max), new K())
{
}
///
/// Create box from min and max points.
///
/// The min point.
/// The max point.
public Box2(Point2d min, Point2d max) :
base(min, max, new K())
{
}
///
/// Create from a pointer.
///
/// The iso rectangle pointer.
internal Box2(IntPtr ptr) : base(new K(), ptr)
{
}
///
/// The type of kernel object uses.
///
public string KernelName => Kernel.Name;
///
/// The iso rectangle as a string.
///
/// The iso rectangle as a string.
public override string ToString()
{
return string.Format("[Box2<{0}>: Min={1}, Max={2}]",
KernelName, Min, Max);
}
///
/// Translate the shape.
///
/// The amount to translate.
public void Translate(Point2d translation)
{
Kernel.Box2_Transform(Ptr, translation, 0, 1);
}
///
/// Rotate the shape.
///
/// The amount to rotate.
public void Rotate(Degree rotation)
{
Kernel.Box2_Transform(Ptr, Point2d.Zero, rotation.radian, 1);
}
///
/// Scale the shape.
///
/// The amount to scale.
public void Scale(double scale)
{
Kernel.Box2_Transform(Ptr, Point2d.Zero, 0, scale);
}
///
/// Transform the rectangle.
///
/// The amount to translate.
/// The amount to rotate
/// The amount to scale.
public void Transform(Point2d translation, Degree rotation, double scale)
{
Kernel.Box2_Transform(Ptr, translation, rotation.radian, scale);
}
///
/// Create a deep copy of the rectangle.
///
/// The deep copy.
public Box2 Copy()
{
var ptr = Kernel.Box2_Copy(Ptr);
return new Box2(ptr);
}
}
///
/// The abstract iso rectangle definition.
///
public abstract class Box2 : CGALObject
{
///
/// Default constructor.
///
private Box2()
{
}
///
///
///
///
///
///
internal Box2(Point2d min, Point2d max, CGALKernel kernel)
{
Kernel = kernel.GeometryKernel2;
Ptr = Kernel.Box2_Create(min, max);
}
///
/// Construct with a new kernel.
///
/// The geometry kernel.
/// The Box pointer.
internal Box2(CGALKernel kernel, IntPtr ptr) : base(ptr)
{
Kernel = kernel.GeometryKernel2;
}
///
/// The iso rectangle kernel.
/// Contains the functions to the unmanaged CGAL object.
///
protected private GeometryKernel2 Kernel { get; private set; }
///
/// Convert to shape struct.
///
public Box2d Shape => new Box2d(Min, Max);
///
/// The rectangles min point.
///
public Point2d Min
{
get { return Kernel.Box2_GetMin(Ptr); }
set { Kernel.Box2_SetMin(Ptr, value); }
}
///
/// The rectangles max point.
///
public Point2d Max
{
get { return Kernel.Box2_GetMax(Ptr); }
set { Kernel.Box2_SetMax(Ptr, value); }
}
///
/// The rectangles area.
///
public double Area
{
get
{
if (IsDegenerate)
return 0;
else
return Kernel.Box2_Area(Ptr);
}
}
///
/// Is the rectangle degenerate.
///
public bool IsDegenerate => Kernel.Box2_IsDegenerate(Ptr);
///
/// The side the rectangle the point is on.
///
/// The point.
/// If the point is iside, outside or on boundary.
public BOUNDED_SIDE BoundedSide(Point2d point)
{
if (IsDegenerate)
return BOUNDED_SIDE.UNDETERMINED;
else
return Kernel.Box2_BoundedSide(Ptr, point);
}
///
/// Does the rectangle contain the point.
///
/// The point
/// Should a point on
/// the boundary count as being inside.
/// Does the rectangle contain the point
public bool ContainsPoint(Point2d point, bool includeBoundary = true)
{
if (IsDegenerate)
return false;
else
return Kernel.Box2_ContainsPoint(Ptr, point, includeBoundary);
}
///
/// Release the unmanaged pointer.
///
protected override void ReleasePtr()
{
Kernel.Box2_Release(Ptr);
}
///
/// Round the shape.
///
/// The number of digits to round to.
public void Round(int digits)
{
this.Min = Min.Rounded(digits);
this.Max = Max.Rounded(digits);
}
///
/// Convert to another kernel.
/// Must provide a different kernel to convert to or
/// just a deep copy will be returned.
///
/// The shape with another kernel type.
public Box2 Convert() where T : CGALKernel, new()
{
var k = typeof(T).Name;
var e = CGALEnum.ToKernelEnum(k);
var ptr = Kernel.Box2_Convert(Ptr, e);
return new Box2(ptr);
}
}
}
================================================
FILE: CGALDotNet/Geometry/CGALIntersections_Geometry_EEK.cs
================================================
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using CGALDotNetGeometry.Numerics;
using CGALDotNetGeometry.Shapes;
namespace CGALDotNet.Geometry
{
///
/// The static intersection class.
///
public static partial class CGALIntersections
{
/// --------------------------------------------------------
///
/// The Point DoIntersect functions
///
/// --------------------------------------------------------
public static bool DoIntersect(Point2 point, Line2 line)
{
return Intersections_Geometry_EEK_DoIntersect_PointLine(point.Ptr, line.Ptr);
}
public static bool DoIntersect(Point2 point, Ray2 ray)
{
return Intersections_Geometry_EEK_DoIntersect_PointRay(point.Ptr, ray.Ptr);
}
public static bool DoIntersect(Point2 point, Segment2 segment)
{
return Intersections_Geometry_EEK_DoIntersect_PointSegment(point.Ptr, segment.Ptr);
}
public static bool DoIntersect(Point2 point, Triangle2 triangle)
{
return Intersections_Geometry_EEK_DoIntersect_PointTriangle(point.Ptr, triangle.Ptr);
}
public static bool DoIntersect(Point2 point, Box2 box)
{
return Intersections_Geometry_EEK_DoIntersect_PointBox(point.Ptr, box.Ptr);
}
/// --------------------------------------------------------
///
/// The Line DoIntersect functions
///
/// --------------------------------------------------------
public static bool DoIntersect(Line2 line, Point2 point)
{
return Intersections_Geometry_EEK_DoIntersect_LinePoint(line.Ptr, point.Ptr);
}
public static bool DoIntersect(Line2 line, Line2 line2)
{
return Intersections_Geometry_EEK_DoIntersect_LineLine(line.Ptr, line2.Ptr);
}
public static bool DoIntersect(Line2 line, Ray2 ray)
{
return Intersections_Geometry_EEK_DoIntersect_LineRay(line.Ptr, ray.Ptr);
}
public static bool DoIntersect(Line2 line, Segment2 segment)
{
return Intersections_Geometry_EEK_DoIntersect_LineSegment(line.Ptr, segment.Ptr);
}
public static bool DoIntersect(Line2 line, Triangle2 triangle)
{
return Intersections_Geometry_EEK_DoIntersect_LineTriangle(line.Ptr, triangle.Ptr);
}
public static bool DoIntersect(Line2 line, Box2 box)
{
return Intersections_Geometry_EEK_DoIntersect_LineBox(line.Ptr, box.Ptr);
}
/// --------------------------------------------------------
///
/// The Ray DoIntersect functions
///
/// --------------------------------------------------------
public static bool DoIntersect(Ray2 ray, Point2 point)
{
return Intersections_Geometry_EEK_DoIntersect_RayPoint(ray.Ptr, point.Ptr);
}
public static bool DoIntersect(Ray2 ray, Line2 line)
{
return Intersections_Geometry_EEK_DoIntersect_RayLine(ray.Ptr, line.Ptr);
}
public static bool DoIntersect(Ray2 ray, Ray2 ray2)
{
return Intersections_Geometry_EEK_DoIntersect_RayRay(ray.Ptr, ray2.Ptr);
}
public static bool DoIntersect(Ray2 ray, Segment2 segment)
{
return Intersections_Geometry_EEK_DoIntersect_RaySegment(ray.Ptr, segment.Ptr);
}
public static bool DoIntersect(Ray2 ray, Triangle2 triangle)
{
return Intersections_Geometry_EEK_DoIntersect_RayTriangle(ray.Ptr, triangle.Ptr);
}
public static bool DoIntersect(Ray2 ray, Box2 box)
{
return Intersections_Geometry_EEK_DoIntersect_RayBox(ray.Ptr, box.Ptr);
}
/// --------------------------------------------------------
///
/// The Segment DoIntersect functions
///
/// --------------------------------------------------------
public static bool DoIntersect(Segment2 segment, Point2 point)
{
return Intersections_Geometry_EEK_DoIntersect_SegmentPoint(segment.Ptr, point.Ptr);
}
public static bool DoIntersect(Segment2 segment, Line2 line)
{
return Intersections_Geometry_EEK_DoIntersect_SegmentLine(segment.Ptr, line.Ptr);
}
public static bool DoIntersect(Segment2 segment, Ray2 ray)
{
return Intersections_Geometry_EEK_DoIntersect_SegmentRay(segment.Ptr, ray.Ptr);
}
public static bool DoIntersect(Segment2 segment, Segment2 segment2)
{
return Intersections_Geometry_EEK_DoIntersect_SegmentSegment(segment.Ptr, segment2.Ptr);
}
public static bool DoIntersect(Segment2 segment, Triangle2 triangle)
{
return Intersections_Geometry_EEK_DoIntersect_SegmentTriangle(segment.Ptr, triangle.Ptr);
}
public static bool DoIntersect(Segment2 segment, Box2 box)
{
return Intersections_Geometry_EEK_DoIntersect_SegmentBox(segment.Ptr, box.Ptr);
}
/// --------------------------------------------------------
///
/// The Triangle DoIntersect functions
///
/// --------------------------------------------------------
public static bool DoIntersect(Triangle2 triangle, Point2 point)
{
return Intersections_Geometry_EEK_DoIntersect_TrianglePoint(triangle.Ptr, point.Ptr);
}
public static bool DoIntersect(Triangle2 triangle, Line2 line)
{
return Intersections_Geometry_EEK_DoIntersect_TriangleLine(triangle.Ptr, line.Ptr);
}
public static bool DoIntersect(Triangle2 triangle, Ray2 ray)
{
return Intersections_Geometry_EEK_DoIntersect_TriangleRay(triangle.Ptr, ray.Ptr);
}
public static bool DoIntersect(Triangle2 triangle, Segment2 segment)
{
return Intersections_Geometry_EEK_DoIntersect_TriangleSegment(triangle.Ptr, segment.Ptr);
}
public static bool DoIntersect(Triangle2 triangle, Triangle2 triangle2)
{
return Intersections_Geometry_EEK_DoIntersect_TriangleTriangle(triangle.Ptr, triangle2.Ptr);
}
public static bool DoIntersect(Triangle2 triangle, Box2 box)
{
return Intersections_Geometry_EEK_DoIntersect_TriangleBox(triangle.Ptr, box.Ptr);
}
/// --------------------------------------------------------
///
/// The Box DoIntersect functions
///
/// --------------------------------------------------------
public static bool DoIntersect(Box2 box, Point2 point)
{
return Intersections_Geometry_EEK_DoIntersect_BoxPoint(box.Ptr, point.Ptr);
}
public static bool DoIntersect(Box2 box, Line2 line)
{
return Intersections_Geometry_EEK_DoIntersect_BoxLine(box.Ptr, line.Ptr);
}
public static bool DoIntersect(Box2 box, Ray2 ray)
{
return Intersections_Geometry_EEK_DoIntersect_BoxRay(box.Ptr, ray.Ptr);
}
public static bool DoIntersect(Box2 box, Segment2 segment)
{
return Intersections_Geometry_EEK_DoIntersect_BoxSegment(box.Ptr, segment.Ptr);
}
public static bool DoIntersect(Box2 box, Triangle2 triangle)
{
return Intersections_Geometry_EEK_DoIntersect_BoxTriangle(box.Ptr, triangle.Ptr);
}
public static bool DoIntersect(Box2 box, Box2 box2)
{
return Intersections_Geometry_EEK_DoIntersect_BoxBox(box.Ptr, box2.Ptr);
}
/// --------------------------------------------------------
///
/// The Point Intersection functions
///
/// --------------------------------------------------------
public static IntersectionResult2d Intersection(Point2 point, Line2 line)
{
return Intersections_Geometry_EEK_Intersection_PointLine(point.Ptr, line.Ptr);
}
public static IntersectionResult2d Intersection(Point2 point, Ray2 ray)
{
return Intersections_Geometry_EEK_Intersection_PointRay(point.Ptr, ray.Ptr);
}
public static IntersectionResult2d Intersection(Point2 point, Segment2 segment)
{
return Intersections_Geometry_EEK_Intersection_PointSegment(point.Ptr, segment.Ptr);
}
public static IntersectionResult2d Intersection(Point2 point, Triangle2 triangle)
{
return Intersections_Geometry_EEK_Intersection_PointTriangle(point.Ptr, triangle.Ptr);
}
public static IntersectionResult2d Intersection(Point2 point, Box2 box)
{
return Intersections_Geometry_EEK_Intersection_PointBox(point.Ptr, box.Ptr);
}
/// --------------------------------------------------------
///
/// The Line Intersection functions
///
/// -----------------------------------------------------
public static IntersectionResult2d Intersection(Line2 line, Point2 point)
{
return Intersections_Geometry_EEK_Intersection_LinePoint(line.Ptr, point.Ptr);
}
public static IntersectionResult2d Intersection(Line2 line, Line2 line2)
{
return Intersections_Geometry_EEK_Intersection_LineLine(line.Ptr, line2.Ptr);
}
public static IntersectionResult2d Intersection(Line2 line, Ray2 ray)
{
return Intersections_Geometry_EEK_Intersection_LineRay(line.Ptr, ray.Ptr);
}
public static IntersectionResult2d Intersection(Line2 line, Segment2 segment)
{
return Intersections_Geometry_EEK_Intersection_LineSegment(line.Ptr, segment.Ptr);
}
public static IntersectionResult2d Intersection(Line2 line, Triangle2 triangle)
{
return Intersections_Geometry_EEK_Intersection_LineTriangle(line.Ptr, triangle.Ptr);
}
public static IntersectionResult2d Intersection(Line2 line, Box2 box)
{
return Intersections_Geometry_EEK_Intersection_LineBox(line.Ptr, box.Ptr);
}
/// --------------------------------------------------------
///
/// The Ray Intersection functions
///
/// -----------------------------------------------------
public static IntersectionResult2d Intersection(Ray2 ray, Point2 point)
{
return Intersections_Geometry_EEK_Intersection_RayPoint(ray.Ptr, point.Ptr);
}
public static IntersectionResult2d Intersection(Ray2 ray, Line2 line)
{
return Intersections_Geometry_EEK_Intersection_RayLine(ray.Ptr, line.Ptr);
}
public static IntersectionResult2d Intersection(Ray2 ray, Ray2 ray2)
{
return Intersections_Geometry_EEK_Intersection_RayRay(ray.Ptr, ray2.Ptr);
}
public static IntersectionResult2d Intersection(Ray2 ray, Segment2 segment)
{
return Intersections_Geometry_EEK_Intersection_RaySegment(ray.Ptr, segment.Ptr);
}
public static IntersectionResult2d Intersection(Ray2 ray, Triangle2 triangle)
{
return Intersections_Geometry_EEK_Intersection_RayTriangle(ray.Ptr, triangle.Ptr);
}
public static IntersectionResult2d Intersection(Ray2 ray, Box2 box)
{
return Intersections_Geometry_EEK_Intersection_RayBox(ray.Ptr, box.Ptr);
}
/// --------------------------------------------------------
///
/// The Segment Intersection functions
///
/// -----------------------------------------------------
public static IntersectionResult2d Intersection(Segment2 segment, Point2 point)
{
return Intersections_Geometry_EEK_Intersection_SegmentPoint(segment.Ptr, point.Ptr);
}
public static IntersectionResult2d Intersection(Segment2 segment, Line2 line)
{
return Intersections_Geometry_EEK_Intersection_SegmentLine(segment.Ptr, line.Ptr);
}
public static IntersectionResult2d Intersection(Segment2 segment, Ray2 ray)
{
return Intersections_Geometry_EEK_Intersection_SegmentRay(segment.Ptr, ray.Ptr);
}
public static IntersectionResult2d Intersection(Segment2 segment, Segment2 segment2)
{
return Intersections_Geometry_EEK_Intersection_SegmentSegment(segment.Ptr, segment2.Ptr);
}
public static IntersectionResult2d Intersection(Segment2 segment, Triangle2 triangle)
{
return Intersections_Geometry_EEK_Intersection_SegmentTriangle(segment.Ptr, triangle.Ptr);
}
public static IntersectionResult2d Intersection(Segment2 segment, Box2 box)
{
return Intersections_Geometry_EEK_Intersection_SegmentBox(segment.Ptr, box.Ptr);
}
/// --------------------------------------------------------
///
/// The Triangle Intersection functions
///
/// -----------------------------------------------------
public static IntersectionResult2d Intersection(Triangle2 triangle, Point2 point)
{
return Intersections_Geometry_EEK_Intersection_TrianglePoint(triangle.Ptr, point.Ptr);
}
public static IntersectionResult2d Intersection(Triangle2 triangle, Line2 line)
{
return Intersections_Geometry_EEK_Intersection_TriangleLine(triangle.Ptr, line.Ptr);
}
public static IntersectionResult2d Intersection(Triangle2 triangle, Ray2 ray)
{
return Intersections_Geometry_EEK_Intersection_TriangleRay(triangle.Ptr, ray.Ptr);
}
public static IntersectionResult2d Intersection(Triangle2 triangle, Segment2 segment)
{
return Intersections_Geometry_EEK_Intersection_TriangleSegment(triangle.Ptr, segment.Ptr);
}
public static IntersectionResult2d Intersection(Triangle2 triangle, Triangle2 triangle2)
{
return Intersections_Geometry_EEK_Intersection_TriangleTriangle(triangle.Ptr, triangle2.Ptr);
}
public static IntersectionResult2d Intersection(Triangle2 triangle, Box2 box)
{
return Intersections_Geometry_EEK_Intersection_TriangleBox(triangle.Ptr, box.Ptr);
}
/// --------------------------------------------------------
///
/// The Box Intersection functions
///
/// -----------------------------------------------------
public static IntersectionResult2d Intersection(Box2 box, Point2 point)
{
return Intersections_Geometry_EEK_Intersection_BoxPoint(box.Ptr, point.Ptr);
}
public static IntersectionResult2d Intersection(Box2 box, Line2 line)
{
return Intersections_Geometry_EEK_Intersection_BoxLine(box.Ptr, line.Ptr);
}
public static IntersectionResult2d Intersection(Box2 box, Ray2 ray)
{
return Intersections_Geometry_EEK_Intersection_BoxRay(box.Ptr, ray.Ptr);
}
public static IntersectionResult2d Intersection(Box2 box, Segment2 segment)
{
return Intersections_Geometry_EEK_Intersection_BoxSegment(box.Ptr, segment.Ptr);
}
public static IntersectionResult2d Intersection(Box2 box, Triangle2 triangle)
{
return Intersections_Geometry_EEK_Intersection_BoxTriangle(box.Ptr, triangle.Ptr);
}
public static IntersectionResult2d Intersection(Box2 box, Box2 box2)
{
return Intersections_Geometry_EEK_Intersection_BoxBox(box.Ptr, box2.Ptr);
}
/// --------------------------------------------------------
///
/// The Point SqrDistance functions
///
/// -----------------------------------------------------
public static double SqrDistance(Point2 point, Point2 point2)
{
return Intersections_Geometry_EEK_SqrDistance_PointPoint(point.Ptr, point2.Ptr);
}
public static double SqrDistance(Point2 point, Line2 line)
{
return Intersections_Geometry_EEK_SqrDistance_PointLine(point.Ptr, line.Ptr);
}
public static double SqrDistance(Point2