|
SFCGAL
2.3.0
|
Typedefs | |
| typedef uint32_t | srid_t |
| SRID type. More... | |
| typedef void | sfcgal_geometry_t |
| sfcgal_geometry_t is an opaque pointer type that is used to represent a pointer to SFCGAL::Geometry More... | |
| typedef void | sfcgal_prepared_geometry_t |
| Opaque type that represents the C++ type SFCGAL::PreparedGeometry. More... | |
| typedef void | sfcgal_primitive_t |
| sfcgal_primitive_t is an opaque pointer type that is used to represent a pointer to SFCGAL::Primitive More... | |
| typedef int(* | sfcgal_error_handler_t) (const char *,...) |
| Warning and error handlers. More... | |
Functions | |
| SFCGAL_API void | sfcgal_set_geometry_validation (int enabled) |
| Set the geometry validation mode. More... | |
| SFCGAL_API sfcgal_geometry_type_t | sfcgal_geometry_type_id (const sfcgal_geometry_t *geom) |
| Returns the type of a given geometry. More... | |
| SFCGAL_API void | sfcgal_geometry_type (const sfcgal_geometry_t *geom, char **type, size_t *type_len) |
| Returns the type of a given geometry as a string. More... | |
| SFCGAL_API int | sfcgal_geometry_dimension (const sfcgal_geometry_t *geom) |
| Returns the dimension of a given geometry ( 0 : punctual, 1 : curve, ...) More... | |
| SFCGAL_API int | sfcgal_geometry_is_valid (const sfcgal_geometry_t *geom) |
| Tests if the given geometry is valid or not. More... | |
| SFCGAL_API int | sfcgal_geometry_is_valid_detail (const sfcgal_geometry_t *geom, char **invalidity_reason, sfcgal_geometry_t **invalidity_location) |
| Tests if the given geometry is valid or not And return details in case of invalidity. More... | |
| SFCGAL_API int | sfcgal_geometry_is_complexity_detail (const sfcgal_geometry_t *geom, char **invalidity_reason, sfcgal_geometry_t **invalidity_location) |
| SFCGAL_API int | sfcgal_geometry_is_simple (const sfcgal_geometry_t *geom) |
| Tests if the given geometry is simple or not. More... | |
| SFCGAL_API int | sfcgal_geometry_is_simple_detail (const sfcgal_geometry_t *geom, char **complexity_reason) |
| Tests if the given geometry is simple or not And return details in case of complexity. More... | |
| SFCGAL_API int | sfcgal_geometry_is_3d (const sfcgal_geometry_t *geom) |
| Tests if the given geometry is 3D or not. More... | |
| SFCGAL_API int | sfcgal_geometry_is_measured (const sfcgal_geometry_t *geom) |
| Tests if the given geometry is measured (has an m) or not. More... | |
| SFCGAL_API int | sfcgal_geometry_is_empty (const sfcgal_geometry_t *geom) |
| Tests if the given geometry is empty or not. More... | |
| SFCGAL_API int | sfcgal_geometry_is_closed (const sfcgal_geometry_t *geom) |
| Tests if the given geometry is closed or not. More... | |
| SFCGAL_API int | sfcgal_geometry_drop_z (sfcgal_geometry_t *geom) |
| Drops the z coordinate of the geometry. More... | |
| SFCGAL_API int | sfcgal_geometry_drop_m (sfcgal_geometry_t *geom) |
| Drops the m coordinate of the geometry. More... | |
| SFCGAL_API int | sfcgal_geometry_force_z (sfcgal_geometry_t *geom, double default_z) |
| Adds a z-dimension to the geometry, initialized to a preset value. More... | |
| SFCGAL_API int | sfcgal_geometry_force_m (sfcgal_geometry_t *geom, double default_m) |
| Adds a m-dimension to the geometry, initialized to a preset value. More... | |
| SFCGAL_API void | sfcgal_geometry_swap_xy (sfcgal_geometry_t *geom) |
| Swaps the x and y coordinates of the geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_clone (const sfcgal_geometry_t *geom) |
| Returns a deep clone of the given geometry. More... | |
| SFCGAL_API void | sfcgal_geometry_delete (sfcgal_geometry_t *geom) |
| Deletes a given geometry. More... | |
| SFCGAL_API size_t | sfcgal_geometry_num_geometries (const sfcgal_geometry_t *collection) |
| Returns the number of geometries of the given geometry collection. More... | |
| SFCGAL_API void | sfcgal_geometry_as_text (const sfcgal_geometry_t *geom, char **buffer, size_t *len) |
| Returns a WKT representation of the given geometry using CGAL exact integer fractions as coordinate values. More... | |
| SFCGAL_API void | sfcgal_geometry_as_text_decim (const sfcgal_geometry_t *geom, int num_decimals, char **buffer, size_t *len) |
| Returns a WKT representation of the given geometry using floating point coordinate values. More... | |
| SFCGAL_API void | sfcgal_geometry_as_wkb (const sfcgal_geometry_t *geom, char **buffer, size_t *len) |
| Returns a WKB representation of the given geometry. More... | |
| SFCGAL_API void | sfcgal_geometry_as_hexwkb (const sfcgal_geometry_t *geom, char **buffer, size_t *len) |
| Returns a WKB representation as hexadecimal of the given geometry. More... | |
| SFCGAL_API void | sfcgal_geometry_as_vtk (const sfcgal_geometry_t *geom, char **buffer, size_t *len) |
| Creates a VTK string of the given geometry. More... | |
| SFCGAL_API void | sfcgal_geometry_as_vtk_file (const sfcgal_geometry_t *geom, const char *filename) |
| Creates a VTK file of the given geometry. More... | |
| SFCGAL_API void | sfcgal_geometry_as_obj_file (const sfcgal_geometry_t *geom, const char *filename) |
| Creates a OBJ file of the given geometry The generated OBJ file uses the Z-up convention. More... | |
| SFCGAL_API void | sfcgal_geometry_as_obj (const sfcgal_geometry_t *geom, char **buffer, size_t *len) |
| Creates a OBJ string of the given geometry The generated OBJ string uses the Z-up convention. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_io_read_obj (const char *str, size_t len) |
| Reads a geometry from an OBJ format string. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_io_read_obj_file (const char *filename) |
| Reads a geometry from an OBJ file. More... | |
| SFCGAL_API void | sfcgal_geometry_as_stl (const sfcgal_geometry_t *geom, char **buffer, size_t *len) |
| Creates a STL string of the given geometry The generated STL string uses the Z-up convention. More... | |
| SFCGAL_API void | sfcgal_geometry_as_stl_file (const sfcgal_geometry_t *geom, const char *filename) |
| Creates a STL file of the given geometry The generated STL file uses the Z-up convention. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_point_create (void) |
| Creates an empty point. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_point_create_from_xy (double x, double y) |
| Creates a point from two X and Y coordinates. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_point_create_from_xyz (double x, double y, double z) |
| Creates a point from three X, Y and Z coordinates. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_point_create_from_xym (double x, double y, double m) |
| Creates a point from three X, Y and M coordinates. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_point_create_from_xyzm (double x, double y, double z, double m) |
| Creates a point from four X, Y, Z and M coordinates. More... | |
| SFCGAL_API double | sfcgal_point_x (const sfcgal_geometry_t *geom) |
| Returns the X coordinate of the given SFCGAL::Point. More... | |
| SFCGAL_API double | sfcgal_point_y (const sfcgal_geometry_t *geom) |
| Returns the Y coordinate of the given SFCGAL::Point. More... | |
| SFCGAL_API double | sfcgal_point_z (const sfcgal_geometry_t *geom) |
| Returns the Z coordinate of the given SFCGAL::Point. More... | |
| SFCGAL_API double | sfcgal_point_m (const sfcgal_geometry_t *geom) |
| Returns the M coordinate of the given SFCGAL::Point. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_linestring_create (void) |
| Creates an empty SFCGAL::LineString. More... | |
| SFCGAL_API size_t | sfcgal_linestring_num_points (const sfcgal_geometry_t *linestring) |
| Returns the number of points of the given SFCGAL::LineString. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_linestring_point_n (const sfcgal_geometry_t *linestring, size_t index) |
| Returns the ith point of a given SFCGAL::LineString. More... | |
| SFCGAL_API void | sfcgal_linestring_add_point (sfcgal_geometry_t *linestring, sfcgal_geometry_t *point) |
| Adds a point to a SFCGAL::LineString. More... | |
| SFCGAL_API void | sfcgal_linestring_closes (sfcgal_geometry_t *linestring) |
| Closes the SCGAL::LineString if it is not already closed. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_triangle_create (void) |
| Creates an empty SFCGAL::Triangle. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_triangle_create_from_points (const sfcgal_geometry_t *pta, const sfcgal_geometry_t *ptb, const sfcgal_geometry_t *ptc) |
| Creates a SFCGAL::Triangle from three given SFCGAL::Point. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_triangle_vertex (const sfcgal_geometry_t *triangle, int index) |
| Returns one the SFCGAL::Triangle's vertex as a SFCGAL::Point. More... | |
| SFCGAL_API void | sfcgal_triangle_set_vertex (sfcgal_geometry_t *triangle, int index, const sfcgal_geometry_t *vertex) |
| Sets one vertex of a SFCGAL::Triangle. More... | |
| SFCGAL_API void | sfcgal_triangle_set_vertex_from_xy (sfcgal_geometry_t *triangle, int index, double x, double y) |
| Sets one vertex of a SFCGAL::Triangle from two coordinates. More... | |
| SFCGAL_API void | sfcgal_triangle_set_vertex_from_xyz (sfcgal_geometry_t *triangle, int index, double x, double y, double z) |
| Sets one vertex of a SFCGAL::Triangle from three coordinates. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_polygon_create (void) |
| Creates an empty SFCGAL::Polygon. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_polygon_create_from_exterior_ring (sfcgal_geometry_t *ring) |
| Creates an empty SFCGAL::Polygon from an exterior ring. More... | |
| SFCGAL_API void | sfcgal_polygon_set_exterior_ring (sfcgal_geometry_t *polygon, sfcgal_geometry_t *ring) |
| Sets the exterior ring of a given SFCGAL::Polygon. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_polygon_exterior_ring (const sfcgal_geometry_t *polygon) |
| Returns the exterior ring of a given SFCGAL::Polygon. More... | |
| SFCGAL_API size_t | sfcgal_polygon_num_interior_rings (const sfcgal_geometry_t *polygon) |
| Returns the number of interior rings of a given SFCGAL::Polygon. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_polygon_interior_ring_n (const sfcgal_geometry_t *polygon, size_t index) |
| Returns the ith interior ring of a given SFCGAL::Polygon. More... | |
| SFCGAL_API void | sfcgal_polygon_add_interior_ring (sfcgal_geometry_t *polygon, sfcgal_geometry_t *ring) |
| Adds an interior ring to a given SFCGAL::Polygon. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_collection_create (void) |
| Creates an empty SFCGAL::GeometryCollection. More... | |
| SFCGAL_API size_t | sfcgal_geometry_collection_num_geometries (const sfcgal_geometry_t *collection) |
| Returns the number of geometries of a given SFCGAL::GeometryCollection. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_geometry_collection_geometry_n (const sfcgal_geometry_t *collection, size_t index) |
| Returns the ith geometry of a SFCGAL::GeometryCollection. More... | |
| SFCGAL_API void | sfcgal_geometry_collection_set_geometry_n (sfcgal_geometry_t *collection, sfcgal_geometry_t *geometry, size_t index) |
| Set the ith geometry of a given SFCGAL::GeometryCollection. More... | |
| SFCGAL_API void | sfcgal_geometry_collection_add_geometry (sfcgal_geometry_t *collection, sfcgal_geometry_t *geometry) |
| Adds a Geometry to a given SFCGAL::GeometryCollection. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_multi_point_create (void) |
| Creates an empty SFCGAL::MultiPoint. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_multi_linestring_create (void) |
| Creates an empty SFCGAL::MultiLineString. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_multi_polygon_create (void) |
| Creates an empty SFCGAL::MultiPolygon. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_multi_solid_create (void) |
| Creates an empty SFCGAL::MultiSolid. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_polyhedral_surface_create (void) |
| Creates an empty SFCGAL::PolyhedralSurface. More... | |
| SFCGAL_API size_t | sfcgal_polyhedral_surface_num_patches (const sfcgal_geometry_t *polyhedral) |
| Returns the number of patches of a given SFCGAL::PolyhedralSurface. More... | |
| SFCGAL_API size_t | sfcgal_polyhedral_surface_num_polygons (const sfcgal_geometry_t *polyhedral) |
| Returns the number of polygons of a given SFCGAL::PolyhedralSurface. More... | |
| SFCGAL_API size_t | sfcgal_polyhedral_surface_num_edges (const sfcgal_geometry_t *polyhedral) |
| Get the number of edges into a PolyhedralSurface. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_polyhedral_surface_patch_n (const sfcgal_geometry_t *polyhedral, size_t index) |
| Returns the ith patch of a given SFCGAL::PolyhedralSurface. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_polyhedral_surface_polygon_n (const sfcgal_geometry_t *polyhedral, size_t index) |
| Returns the ith polygon of a given SFCGAL::PolyhedralSurface. More... | |
| SFCGAL_API void | sfcgal_polyhedral_surface_add_patch (sfcgal_geometry_t *polyhedral, sfcgal_geometry_t *patch) |
| Adds a patch to a given SFCGAL::PolyhedralSurface. More... | |
| SFCGAL_API void | sfcgal_polyhedral_surface_set_patch_n (sfcgal_geometry_t *polyhedral, sfcgal_geometry_t *patch, size_t index) |
| Set the ith patch of a given SFCGAL::PolyhedralSurface. More... | |
| SFCGAL_API void | sfcgal_polyhedral_surface_add_polygon (sfcgal_geometry_t *polyhedral, sfcgal_geometry_t *polygon) |
| Adds a SFCGAL::Polygon to a given SFCGAL::PolyhedralSurface. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_triangulated_surface_create (void) |
| Creates an empty SFCGAL::TriangulatedSurface. More... | |
| SFCGAL_API size_t | sfcgal_triangulated_surface_num_patches (const sfcgal_geometry_t *tin) |
| Returns the number of patches of a given SFCGAL::TriangulatedSurface. More... | |
| SFCGAL_API size_t | sfcgal_triangulated_surface_num_triangles (const sfcgal_geometry_t *tin) |
| Returns the number of triangles of a given SFCGAL::TriangulatedSurface. More... | |
| SFCGAL_API size_t | sfcgal_triangulated_surface_num_edges (const sfcgal_geometry_t *tin) |
| Get the number of edges into a TriangulatedSurface. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_triangulated_surface_patch_n (const sfcgal_geometry_t *tin, size_t index) |
| Returns the ith patch of a given SFCGAL::TriangulatedSurface. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_triangulated_surface_triangle_n (const sfcgal_geometry_t *tin, size_t index) |
| Returns the ith SFCGAL::Triangle of a given SFCGAL::TriangulatedSurface. More... | |
| SFCGAL_API void | sfcgal_triangulated_surface_set_patch_n (sfcgal_geometry_t *tin, sfcgal_geometry_t *patch, size_t index) |
| Set the ith patch of a given SFCGAL::TriangulatedSurface. More... | |
| SFCGAL_API void | sfcgal_triangulated_surface_add_patch (sfcgal_geometry_t *tin, sfcgal_geometry_t *patch) |
| Adds a patch to a given SFCGAL::TriangulatedSurface. More... | |
| SFCGAL_API void | sfcgal_triangulated_surface_add_triangle (sfcgal_geometry_t *tin, sfcgal_geometry_t *triangle) |
| Adds a SFCGAL::Triangle to a given SFCGAL::TriangulatedSurface. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_solid_create (void) |
| Creates an empty SFCGAL::Solid. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_solid_create_from_exterior_shell (sfcgal_geometry_t *shell) |
| Creates a SFCGAL::Solid from an exterior shell. More... | |
| SFCGAL_API size_t | sfcgal_solid_num_shells (const sfcgal_geometry_t *solid) |
| Returns the number of shells of a given SFCGAL::Solid. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_solid_shell_n (const sfcgal_geometry_t *solid, size_t index) |
| Returns the ith shell of a given SFCGAL::Solid. More... | |
| SFCGAL_API void | sfcgal_solid_add_interior_shell (sfcgal_geometry_t *solid, sfcgal_geometry_t *shell) |
| Adds a shell to a given SFCGAL::Solid. More... | |
| SFCGAL_API void | sfcgal_solid_set_exterior_shell (sfcgal_geometry_t *solid, sfcgal_geometry_t *shell) |
| Set the exterior shell of a given SFCGAL::Solid. More... | |
| SFCGAL_API int | sfcgal_geometry_has_validity_flag (const sfcgal_geometry_t *geom) |
| Gets the validity flag of the geometry. More... | |
| SFCGAL_API void | sfcgal_geometry_force_valid (sfcgal_geometry_t *geom, int valid) |
| Sets the validity flag of the geometry. More... | |
| SFCGAL_API sfcgal_prepared_geometry_t * | sfcgal_prepared_geometry_create (void) |
| Creates an empty SFCGAL::PreparedGeometry. More... | |
| SFCGAL_API sfcgal_prepared_geometry_t * | sfcgal_prepared_geometry_create_from_geometry (sfcgal_geometry_t *geometry, srid_t srid) |
| Creates a SFCGAL::PreparedGeometry from a Geometry and an SRID. More... | |
| SFCGAL_API void | sfcgal_prepared_geometry_delete (sfcgal_prepared_geometry_t *prepared) |
| Deletes a given SFCGAL::PreparedGeometry. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_prepared_geometry_geometry (const sfcgal_prepared_geometry_t *prepared) |
| Returns the SFCGAL::Geometry associated with a given SFCGAL::PreparedGeometry. More... | |
| SFCGAL_API void | sfcgal_prepared_geometry_set_geometry (sfcgal_prepared_geometry_t *prepared, sfcgal_geometry_t *geometry) |
| Sets the Geometry associated with the given SFCGAL::PreparedGeometry. More... | |
| SFCGAL_API srid_t | sfcgal_prepared_geometry_srid (const sfcgal_prepared_geometry_t *prepared) |
| Returns SRID associated with a given SFCGAL::PreparedGeometry. More... | |
| SFCGAL_API void | sfcgal_prepared_geometry_set_srid (sfcgal_prepared_geometry_t *prepared, srid_t srid) |
| Sets SRID associated with a given SFCGAL::PreparedGeometry. More... | |
| SFCGAL_API void | sfcgal_prepared_geometry_as_ewkt (const sfcgal_prepared_geometry_t *prepared, int num_decimals, char **buffer, size_t *len) |
| Returns an EWKT representation of the given SFCGAL::PreparedGeometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_io_read_wkt (const char *str, size_t len) |
| io::readWKT More... | |
| SFCGAL_API sfcgal_prepared_geometry_t * | sfcgal_io_read_ewkt (const char *str, size_t len) |
| Parse an Extended Well-Known Text (EWKT) representation into a PreparedGeometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_io_read_geojson (const char *str, size_t len) |
| Parse a GeoJSON representation into a Geometry. More... | |
| SFCGAL_API sfcgal_prepared_geometry_t * | sfcgal_io_read_geojson_prepared (const char *str, size_t len) |
| Parse a GeoJSON representation into a PreparedGeometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_io_read_wkb (const char *str, size_t len) |
| io::readWKB More... | |
| SFCGAL_API void | sfcgal_io_write_binary_prepared (const sfcgal_prepared_geometry_t *geom, char **buffer, size_t *len) |
| Serialization. More... | |
| SFCGAL_API sfcgal_prepared_geometry_t * | sfcgal_io_read_binary_prepared (const char *str, size_t len) |
| Read a SFCGAL::PreparedGeometry from a binary representation. More... | |
| SFCGAL_API void | sfcgal_geometry_as_geojson (const sfcgal_geometry_t *geom, bool strict, int precision, bool include_bbox, char **buffer, size_t *len) |
| Convert a Geometry to its GeoJSON representation. More... | |
| SFCGAL_API void | sfcgal_prepared_geometry_as_geojson (const sfcgal_prepared_geometry_t *prepared, bool strict, int precision, bool include_bbox, char **buffer, size_t *len) |
| Convert a PreparedGeometry to its GeoJSON representation. More... | |
| SFCGAL_API int | sfcgal_geometry_intersects (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Tests the intersection of geom1 and geom2. More... | |
| SFCGAL_API int | sfcgal_geometry_intersects_3d (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Tests the 3D intersection of geom1 and geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_intersection (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Returns the intersection of geom1 and geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_intersection_3d (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Returns the 3D intersection of geom1 and geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_difference (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Returns the difference of geom1 and geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_difference_3d (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Returns the 3D difference of geom1 and geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_union (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Returns the union of geom1 and geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_union_3d (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Returns the 3D union of geom1 and geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_convexhull (const sfcgal_geometry_t *geom) |
| Returns the convex hull of geom. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_convexhull_3d (const sfcgal_geometry_t *geom) |
| Returns the 3D convex hull of geom. More... | |
| SFCGAL_API double | sfcgal_geometry_volume (const sfcgal_geometry_t *geom) |
| Returns the volume of geom (must be a volume) More... | |
| SFCGAL_API double | sfcgal_geometry_area (const sfcgal_geometry_t *geom) |
| Returns the area of geom. More... | |
| SFCGAL_API double | sfcgal_geometry_area_3d (const sfcgal_geometry_t *geom) |
| Returns the 3D area of geom. More... | |
| SFCGAL_API int | sfcgal_geometry_is_planar (const sfcgal_geometry_t *geom) |
| Tests if the given Geometry is planar. More... | |
| SFCGAL_API int | sfcgal_geometry_orientation (const sfcgal_geometry_t *geom) |
| Returns the orientation of the given SFCGAL::Polygon -1 for a counter clockwise orientation 1 for a clockwise orientation 0 for an invalid or undetermined orientation. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_tesselate (const sfcgal_geometry_t *geom) |
| Returns a tessellation of the given Geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_tessellate (const sfcgal_geometry_t *geom) |
| Returns a tessellation of the given Geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_triangulate_2dz (const sfcgal_geometry_t *geom) |
| Returns a triangulation of the given Geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_extrude (const sfcgal_geometry_t *geom, double ex, double ey, double ez) |
| Returns an extrusion of the given Geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_make_solid (const sfcgal_geometry_t *geom) |
| Convert a SFCGAL::PolyhedralSurface to a SFCGAL::Solid. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_force_lhr (const sfcgal_geometry_t *geom) |
| Force a Left Handed Rule on the given Geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_force_rhr (const sfcgal_geometry_t *geom) |
| Force a Right Handed Rule on the given Geometry. More... | |
| SFCGAL_API double | sfcgal_geometry_distance (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Computes the distance of the two given Geometry objects. More... | |
| SFCGAL_API double | sfcgal_geometry_distance_3d (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Computes the 3D distance of the two given Geometry objects. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_round (const sfcgal_geometry_t *geom, int scale) |
| Round coordinates of the given Geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_minkowski_sum (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Returns the 2D minkowski sum geom1 + geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_insert_points_within_tolerance (const sfcgal_geometry_t *base, const sfcgal_geometry_t *source, double tolerance) |
| Insert points from source geometry into base geometry within tolerance. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_minkowski_sum_3d (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Returns the 3D minkowski sum geom1 + geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_offset_polygon (const sfcgal_geometry_t *geom, double radius) |
| Returns the offset polygon of the given Geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_straight_skeleton (const sfcgal_geometry_t *geom) |
| Returns the straight skeleton of the given Geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_straight_skeleton_distance_in_m (const sfcgal_geometry_t *geom) |
| Returns the straight skeleton of the given Geometry with the distance to the border as M coordinate. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_extrude_straight_skeleton (const sfcgal_geometry_t *geom, double height) |
| Returns the extrude straight skeleton of the given SFCGAL::Polygon. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_extrude_polygon_straight_skeleton (const sfcgal_geometry_t *geom, double building_height, double roof_height) |
| Returns the union of the polygon z-extrusion (with respect to building_height) and the extrude straight skeleton (with respect to roof_height) of the given SFCGAL::Polygon. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_extrude_straight_skeleton_with_angles (const sfcgal_geometry_t *geom, double height, const double *angles, const size_t *angles_per_ring, size_t num_rings) |
| Returns the extrude straight skeleton for the given SFCGAL::Geometry with custom per-edge angles. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_extrude_polygon_straight_skeleton_with_angles (const sfcgal_geometry_t *geom, double building_height, double roof_height, const double *angles, const size_t *angles_per_ring, size_t num_rings) |
| Returns the union of the polygon z-extrusion (with respect to building_height) and the extrude straight skeleton (with respect to roof_height) of the given SFCGAL::Polygon, with custom per-edge angles. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_extrude_straight_skeleton_with_weights (const sfcgal_geometry_t *geom, double height, const double *weights, const size_t *weights_per_ring, size_t num_rings) |
| Returns the extrude straight skeleton of the given SFCGAL::Polygon, with custom per-edge weights. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_extrude_polygon_straight_skeleton_with_weights (const sfcgal_geometry_t *geom, double building_height, double roof_height, const double *weights, const size_t *weights_per_ring, size_t num_rings) |
| Returns the union of the polygon z-extrusion (with respect to building_height) and the extrude straight skeleton (with respect to roof_height) of the given SFCGAL::Polygon, with custom per-edge weights. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_generate_roof (const sfcgal_geometry_t *geom, sfcgal_roof_type_t roof_type, double slope_angle, double height, size_t primary_edge_index) |
| Generate a roof from a polygon using a specified type. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_generate_flat_roof (const sfcgal_geometry_t *geom, double height) |
| Generate a flat roof from a polygon. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_generate_hipped_roof (const sfcgal_geometry_t *geom, double height) |
| Generate a hipped roof from a polygon using straight skeleton. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_generate_gable_roof (const sfcgal_geometry_t *geom, double height, double slope_angle) |
| Generate a gable roof from a polygon. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_generate_skillion_roof (const sfcgal_geometry_t *geom, double height, double slope_angle, size_t primary_edge_index) |
| Generate a skillion (mono-pitch) roof from a polygon. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_approximate_medial_axis (const sfcgal_geometry_t *geom) |
| Returns the approximate medial axis for the given SFCGAL::Polygon Approximate medial axis is based on straight skeleton. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_projected_medial_axis (const sfcgal_geometry_t *geom) |
| Returns the projected medial axis for the given SFCGAL::Polygon Projected medial axis is based on approximate medial axis and extend end lines to polygon edges. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_straight_skeleton_partition (const sfcgal_geometry_t *geom, bool auto_orientation) |
| Returns the straight skeleton partition for the given SFCGAL::Polygon. More... | |
| SFCGAL_API int | sfcgal_geometry_covers (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Tests the 2D coverage of geom1 and geom2. More... | |
| SFCGAL_API int | sfcgal_geometry_covers_3d (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Tests the 3D coverage of geom1 and geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_line_sub_string (const sfcgal_geometry_t *geom, double start, double end) |
| Returns the substring of the given SFCGAL::LineString between fractional distances. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_alpha_shapes (const sfcgal_geometry_t *geom, double alpha, bool allow_holes) |
| Returns the alpha shapes of geom. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_optimal_alpha_shapes (const sfcgal_geometry_t *geom, bool allow_holes, size_t nb_components) |
| Returns the optimal alpha shapes of geom. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_alpha_wrapping_3d (const sfcgal_geometry_t *geom, size_t relative_alpha, size_t relative_offset) |
| Returns the 3D alpha wrapping of a geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_envelope (const sfcgal_geometry_t *geom) |
| Returns the envelope of geom. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_envelope_3d (const sfcgal_geometry_t *geom) |
| Returns the 3d envelope of geom. More... | |
| SFCGAL_API double | sfcgal_geometry_length (const sfcgal_geometry_t *geom) |
| Returns the 2D length of geom. More... | |
| SFCGAL_API double | sfcgal_geometry_length_3d (const sfcgal_geometry_t *geom) |
| Returns the 3D length of geom. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_boundary (const sfcgal_geometry_t *geom) |
| Returns the boundary of geom. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_centroid (const sfcgal_geometry_t *geom) |
| Returns a SFCGAL::Point representing the geometry centroid. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_centroid_3d (const sfcgal_geometry_t *geom) |
| Returns a SFCGAL::Point representing the geometry centroid. More... | |
| SFCGAL_API int | sfcgal_geometry_is_equals (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2) |
| Returns true if geom1 is equals to geom2. More... | |
| SFCGAL_API int | sfcgal_geometry_is_almost_equals (const sfcgal_geometry_t *geom1, const sfcgal_geometry_t *geom2, double tolerance) |
| Returns true if geom1 is almost equals to geom2. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_y_monotone_partition_2 (const sfcgal_geometry_t *geom) |
| Returns the y monotone partition of a geometry (polygon without hole) More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_approx_convex_partition_2 (const sfcgal_geometry_t *geom) |
| Returns the approximal convex partition of a geometry (polygon without hole) More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_greene_approx_convex_partition_2 (const sfcgal_geometry_t *geom) |
| Returns the greene approximal convex partition of a geometry (polygon without hole) More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_optimal_convex_partition_2 (const sfcgal_geometry_t *geom) |
| Returns the optimal convex partition of a geometry (polygon without hole) More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_visibility_point (const sfcgal_geometry_t *polygon, const sfcgal_geometry_t *point) |
| Returns the visibility polygon of a SFCGAL::Point inside a SFCGAL::Polygon. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_visibility_segment (const sfcgal_geometry_t *polygon, const sfcgal_geometry_t *point_a, const sfcgal_geometry_t *point_b) |
| build the visibility polygon of the segment [point_a ; point_b] on a SFCGAL::Polygon More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_buffer3d (const sfcgal_geometry_t *geom, double radius, int segments, sfcgal_buffer3d_type_t buffer_type) |
| Computes a 3D buffer around a geometry. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_rotate_2d (const sfcgal_geometry_t *geom, double angle, double cx, double cy) |
| Rotates a geometry in 2D around a specified point by a given angle. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_rotate (const sfcgal_geometry_t *geom, double angle) |
| Rotates a geometry in 2D around the origin (0,0) by a given angle. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_rotate_3d_around_center (const sfcgal_geometry_t *geom, double angle, double ax, double ay, double az, double cx, double cy, double cz) |
| Rotates a geometry in 3D around a specified axis and center point by a given angle. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_rotate_3d (const sfcgal_geometry_t *geom, double angle, double ax, double ay, double az) |
| Rotates a geometry in 3D around a specified axis and origin (0, 0, 0) by a given angle. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_rotate_x (const sfcgal_geometry_t *geom, double angle) |
| Rotates a geometry in 3D around the X axis and origin (0, 0, 0) by a given angle. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_rotate_y (const sfcgal_geometry_t *geom, double angle) |
| Rotates a geometry around the Y axis and origin (0, 0, 0) by a given angle. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_rotate_z (const sfcgal_geometry_t *geom, double angle) |
| Rotates a geometry around the Z axis and origin (0, 0, 0) by a given angle. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_scale (const sfcgal_geometry_t *geom, double scale) |
| Scale a geometry by a given factor. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_scale_3d (const sfcgal_geometry_t *geom, double sx, double sy, double sz) |
| Scale a geometry by different factors for each dimension. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_scale_3d_around_center (const sfcgal_geometry_t *geom, double sx, double sy, double sz, double cx, double cy, double cz) |
| Scale a geometry by different factors for each dimension around a center point. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_translate_3d (const sfcgal_geometry_t *geom, double dx, double dy, double dz) |
| Translate a geometry by a 3D vector. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_translate_2d (const sfcgal_geometry_t *geom, double dx, double dy) |
| Translate a geometry by a 2D vector. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_transform (const sfcgal_geometry_t *geom, const double *matrix4x4) |
| Transform a geometry by a 3D matrix (4x4) More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_simplify (const sfcgal_geometry_t *geom, double threshold, bool preserve_topology) |
| Simplify a geometry by simplifying the polylines it contains. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_simplify_surface_edge_count (const sfcgal_geometry_t *geometry, size_t edge_count, sfcgal_simplification_strategy_t strategy) |
| Simplify a surface mesh using CGAL edge collapse algorithm. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_simplify_surface_edge_ratio (const sfcgal_geometry_t *geometry, double edge_ratio, sfcgal_simplification_strategy_t strategy) |
| Simplify a surface mesh using CGAL edge collapse algorithm. More... | |
| SFCGAL_API sfcgal_primitive_type_t | sfcgal_primitive_type_id (const sfcgal_primitive_t *primitive) |
| Returns the type of a given primtive. More... | |
| SFCGAL_API sfcgal_primitive_t * | sfcgal_primitive_create (sfcgal_primitive_type_t primitive_type) |
| Creates a new primitive of the specified type with default parameters. More... | |
| SFCGAL_API void | sfcgal_primitive_delete (sfcgal_primitive_t *primitive) |
| Deletes a previously allocated primitive. More... | |
| SFCGAL_API sfcgal_primitive_t * | sfcgal_primitive_clone (const sfcgal_primitive_t *primitive) |
| Returns a deep clone of the given primitive. More... | |
| SFCGAL_API int | sfcgal_primitive_is_almost_equals (const sfcgal_primitive_t *prim1, const sfcgal_primitive_t *prim2, double tolerance) |
| Returns true if prim1 is equals to prim2. More... | |
| SFCGAL_API double | sfcgal_primitive_area (const sfcgal_primitive_t *prim, bool with_discretization) |
| Computes primitive area. More... | |
| SFCGAL_API double | sfcgal_primitive_volume (const sfcgal_primitive_t *prim, bool with_discretization) |
| Computes primitive volume. More... | |
| SFCGAL_API void | sfcgal_primitive_parameters (const sfcgal_primitive_t *primitive, char **buffer, size_t *len) |
| Retrieves the list of primitive parameters as JSON array of { name, type, value }. More... | |
| SFCGAL_API void | sfcgal_primitive_parameter (const sfcgal_primitive_t *primitive, const char *name, char **buffer, size_t *len) |
Retrieves the primitive parameter name as JSON object { name, type, value }. More... | |
| SFCGAL_API void | sfcgal_primitive_set_parameter (sfcgal_primitive_t *primitive, const char *name, const char *json_value) |
Sets the value of a primitive parameter name as JSON object { name, type, value }. More... | |
| SFCGAL_API double | sfcgal_primitive_parameter_double (const sfcgal_primitive_t *primitive, const char *name) |
| Retrieves the value of a primitive parameter as a double. More... | |
| SFCGAL_API void | sfcgal_primitive_set_parameter_double (sfcgal_primitive_t *primitive, const char *name, double parameter) |
| Sets the value of a primitive parameter as a double. More... | |
| SFCGAL_API unsigned int | sfcgal_primitive_parameter_int (const sfcgal_primitive_t *primitive, const char *name) |
| Retrieves the value of a primitive parameter as an unsigned int. More... | |
| SFCGAL_API void | sfcgal_primitive_set_parameter_int (sfcgal_primitive_t *primitive, const char *name, unsigned int parameter) |
| Sets the value of a primitive parameter as an unsigned int. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_primitive_as_polyhedral_surface (const sfcgal_primitive_t *primitive) |
| Generates a polyhedral surface representation of the primitive. More... | |
| SFCGAL_API double * | sfcgal_primitive_transformation (const sfcgal_primitive_t *primitive) |
| Retrieves the primitive's current transformation matrix as an array. More... | |
| SFCGAL_API sfcgal_primitive_t * | sfcgal_primitive_translate (const sfcgal_primitive_t *primitive, double dx, double dy, double dz) |
| Translates a primitive by a 3D vector. More... | |
| SFCGAL_API sfcgal_primitive_t * | sfcgal_primitive_rotate (const sfcgal_primitive_t *primitive, double angle, double ax, double ay, double az, double cx, double cy, double cz) |
| Rotates a primitive around a specified axis and center point by a given angle. More... | |
| SFCGAL_API sfcgal_primitive_t * | sfcgal_primitive_scale (const sfcgal_primitive_t *primitive, double sx, double sy, double sz, double cx, double cy, double cz) |
| Scales a primitive by the given factor. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_split_3d (const sfcgal_geometry_t *geom, double ptx, double pty, double ptz, double normalx, double normaly, double normalz, bool close_geometries) |
| Splits the given geometry with a plane defined by a point and a normal vector. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_chamfer (const sfcgal_geometry_t *solid, const sfcgal_geometry_t *edge, double radius, double radius_y, double epsilon) |
| Replace sharp edges of a solid with a flat bevelled face (chamfer). More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_geometry_fillet (const sfcgal_geometry_t *solid, const sfcgal_geometry_t *edge, double radius, int segments, double epsilon) |
| Replace sharp edges of a solid with a smooth circular-arc fillet. More... | |
| SFCGAL_API void | sfcgal_set_error_handlers (sfcgal_error_handler_t warning_handler, sfcgal_error_handler_t error_handler) |
| Sets the error handlers. More... | |
| SFCGAL_API void | sfcgal_set_alloc_handlers (sfcgal_alloc_handler_t alloc_handler, sfcgal_free_handler_t free_handler) |
| Sets the allocation handlers. More... | |
| SFCGAL_API void | sfcgal_free_buffer (void *buffer) |
| Delete a buffer previously allocated and returned by SFCGAL. More... | |
| SFCGAL_API void | sfcgal_init (void) |
| This function must be called before all the other one. More... | |
| SFCGAL_API const char * | sfcgal_version (void) |
| Get version. More... | |
| SFCGAL_API const char * | sfcgal_full_version (void) |
| Get full version (including CGAL and Boost versions) More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_create (void) |
| Creates an empty NURBS curve. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_create_from_points (const sfcgal_geometry_t **points, size_t num_points, unsigned int degree, sfcgal_knot_method_t knot_method) |
| Creates a NURBS curve from control points with uniform weights. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_create_from_points_and_weights (const sfcgal_geometry_t **points, const double *weights, size_t num_points, unsigned int degree, sfcgal_knot_method_t knot_method) |
| Creates a NURBS curve from control points and weights. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_create_from_full_data (const sfcgal_geometry_t **points, const double *weights, size_t num_points, unsigned int degree, const double *knots, size_t num_knots) |
| Creates a NURBS curve with full control over parameters. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_create_bezier (const sfcgal_geometry_t **points, size_t num_points) |
| Creates a NURBS curve from Bezier control points. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_create_bspline (const sfcgal_geometry_t **points, size_t num_points, unsigned int degree) |
| Creates a uniform B-spline curve. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_create_circular_arc (const sfcgal_geometry_t *center, double radius, double start_angle, double end_angle, const sfcgal_geometry_t *normal) |
| Creates a circular arc as NURBS curve. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_interpolate (const sfcgal_geometry_t **points, size_t num_points, unsigned int degree, sfcgal_knot_method_t knot_method, sfcgal_end_condition_t end_condition) |
| Creates an interpolating NURBS curve through points. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_approximate (const sfcgal_geometry_t **points, size_t num_points, unsigned int degree, double tolerance, size_t max_control_points) |
| Creates an approximating NURBS curve. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_fit (const sfcgal_geometry_t **points, size_t num_points, unsigned int degree, sfcgal_fit_method_t fit_method, sfcgal_knot_method_t knot_method, sfcgal_end_condition_t end_condition, double tolerance, size_t max_control_points) |
| Unified curve fitting interface. More... | |
| SFCGAL_API size_t | sfcgal_nurbs_curve_num_control_points (const sfcgal_geometry_t *curve) |
| Returns the number of control points of a NURBS curve. More... | |
| SFCGAL_API const sfcgal_geometry_t * | sfcgal_nurbs_curve_control_point_n (const sfcgal_geometry_t *curve, size_t index) |
| Returns the ith control point of a NURBS curve. More... | |
| SFCGAL_API void | sfcgal_nurbs_curve_set_control_point_n (sfcgal_geometry_t *curve, size_t index, const sfcgal_geometry_t *point) |
| Sets the ith control point of a NURBS curve. More... | |
| SFCGAL_API double | sfcgal_nurbs_curve_weight_n (const sfcgal_geometry_t *curve, size_t index) |
| Returns the weight at index of a NURBS curve. More... | |
| SFCGAL_API void | sfcgal_nurbs_curve_set_weight_n (sfcgal_geometry_t *curve, size_t index, double weight) |
| Sets the weight at index of a NURBS curve. More... | |
| SFCGAL_API unsigned int | sfcgal_nurbs_curve_degree (const sfcgal_geometry_t *curve) |
| Returns the degree of a NURBS curve. More... | |
| SFCGAL_API size_t | sfcgal_nurbs_curve_num_knots (const sfcgal_geometry_t *curve) |
| Returns the number of knots in the knot vector of a NURBS curve. More... | |
| SFCGAL_API double | sfcgal_nurbs_curve_knot_n (const sfcgal_geometry_t *curve, size_t index) |
| Returns the knot value at index of a NURBS curve. More... | |
| SFCGAL_API int | sfcgal_nurbs_curve_is_rational (const sfcgal_geometry_t *curve) |
| Tests if a NURBS curve is rational (uses non-uniform weights) More... | |
| SFCGAL_API int | sfcgal_nurbs_curve_is_bezier (const sfcgal_geometry_t *curve) |
| Tests if a NURBS curve is in Bezier form. More... | |
| SFCGAL_API int | sfcgal_nurbs_curve_is_bspline (const sfcgal_geometry_t *curve) |
| Tests if a NURBS curve is a B-spline (uniform weights) More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_evaluate (const sfcgal_geometry_t *curve, double parameter) |
| Evaluates a point on the NURBS curve at given parameter. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_derivative (const sfcgal_geometry_t *curve, double parameter, unsigned int order) |
| Computes the derivative of a NURBS curve at given parameter. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_to_linestring (const sfcgal_geometry_t *curve, unsigned int num_segments) |
| Converts a NURBS curve to a LineString with specified number of segments. More... | |
| SFCGAL_API sfcgal_geometry_t * | sfcgal_nurbs_curve_to_linestring_adaptive (const sfcgal_geometry_t *curve, double tolerance, unsigned int min_segments, unsigned int max_segments) |
| Converts a NURBS curve to a LineString with adaptive tessellation. More... | |
| typedef int(* sfcgal_error_handler_t) (const char *,...) |
Warning and error handlers.
| typedef void sfcgal_geometry_t |
sfcgal_geometry_t is an opaque pointer type that is used to represent a pointer to SFCGAL::Geometry
| typedef void sfcgal_prepared_geometry_t |
Opaque type that represents the C++ type SFCGAL::PreparedGeometry.
| typedef void sfcgal_primitive_t |
sfcgal_primitive_t is an opaque pointer type that is used to represent a pointer to SFCGAL::Primitive
| typedef uint32_t srid_t |
SRID type.
| enum sfcgal_fit_method_t |
Geometric types.
| enum sfcgal_knot_method_t |
| enum sfcgal_roof_type_t |
| SFCGAL_API sfcgal_geometry_t* sfcgal_approx_convex_partition_2 | ( | const sfcgal_geometry_t * | geom | ) |
Returns the approximal convex partition of a geometry (polygon without hole)
| geom | input geometry |
| SFCGAL_API void sfcgal_free_buffer | ( | void * | buffer | ) |
| SFCGAL_API const char* sfcgal_full_version | ( | void | ) |
Get full version (including CGAL and Boost versions)
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_alpha_shapes | ( | const sfcgal_geometry_t * | geom, |
| double | alpha, | ||
| bool | allow_holes | ||
| ) |
Returns the alpha shapes of geom.
| geom | the input geometry |
| alpha | It can have values from 0 to infinity. Smaller alpha values produce more concave results. Alpha values greater than some data-dependent value produce the convex hull of the input. |
| allow_holes | defines whether alpha shapes are allowed to contain holes |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_alpha_wrapping_3d | ( | const sfcgal_geometry_t * | geom, |
| size_t | relative_alpha, | ||
| size_t | relative_offset | ||
| ) |
Returns the 3D alpha wrapping of a geometry.
| geom | input geometry |
| relative_alpha | This parameter is used to determine which features will appear in the output. A small relative_alpha will produce an output less complex but less faithful to the input. |
| relative_offset | This parameter controls the tightness of the result. A large relative_offset parameter will tend to better preserve sharp features as projection. If this parameter is equal to 0, it is computed from the alpha parameter |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_approximate_medial_axis | ( | const sfcgal_geometry_t * | geom | ) |
Returns the approximate medial axis for the given SFCGAL::Polygon Approximate medial axis is based on straight skeleton.
| geom | the input geometry |
| SFCGAL_API double sfcgal_geometry_area | ( | const sfcgal_geometry_t * | geom | ) |
Returns the area of geom.
| geom | the input geometry |
| SFCGAL_API double sfcgal_geometry_area_3d | ( | const sfcgal_geometry_t * | geom | ) |
Returns the 3D area of geom.
| geom | the input geometry |
| SFCGAL_API void sfcgal_geometry_as_geojson | ( | const sfcgal_geometry_t * | geom, |
| bool | strict, | ||
| int | precision, | ||
| bool | include_bbox, | ||
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Convert a Geometry to its GeoJSON representation.
| [in] | geom | the input geometry |
| [in] | strict | If true, output strictly RFC 7946 compliant GeoJSON. Non-standard types (TIN, Solid, etc.) are converted to standard types. If false, use SFCGAL type names as extensions (allows round-trip). |
| [in] | precision | Number of decimal places for coordinates. -1 means full precision. |
| [in] | include_bbox | Include bounding box in output. |
| [out] | buffer | The output buffer |
| [out] | len | The size of buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API void sfcgal_geometry_as_hexwkb | ( | const sfcgal_geometry_t * | geom, |
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Returns a WKB representation as hexadecimal of the given geometry.
| geom | the input geometry | |
| [out] | buffer | the output buffer |
| [out] | len | the size of the buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API void sfcgal_geometry_as_obj | ( | const sfcgal_geometry_t * | geom, |
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Creates a OBJ string of the given geometry The generated OBJ string uses the Z-up convention.
| [in] | geom | the input geometry |
| [out] | buffer | the OBJ buffer |
| [out] | len | the size of buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API void sfcgal_geometry_as_obj_file | ( | const sfcgal_geometry_t * | geom, |
| const char * | filename | ||
| ) |
Creates a OBJ file of the given geometry The generated OBJ file uses the Z-up convention.
| geom | the input geometry |
| filename | OBJ filename |
| SFCGAL_API void sfcgal_geometry_as_stl | ( | const sfcgal_geometry_t * | geom, |
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Creates a STL string of the given geometry The generated STL string uses the Z-up convention.
| [in] | geom | the input geometry |
| [out] | buffer | the STL buffer |
| [out] | len | the size of buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API void sfcgal_geometry_as_stl_file | ( | const sfcgal_geometry_t * | geom, |
| const char * | filename | ||
| ) |
Creates a STL file of the given geometry The generated STL file uses the Z-up convention.
| geom | the input geometry |
| filename | STL filename |
| SFCGAL_API void sfcgal_geometry_as_text | ( | const sfcgal_geometry_t * | geom, |
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Returns a WKT representation of the given geometry using CGAL exact integer fractions as coordinate values.
| geom | the input geometry | |
| [out] | buffer | the output buffer |
| [out] | len | the size of the buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API void sfcgal_geometry_as_text_decim | ( | const sfcgal_geometry_t * | geom, |
| int | num_decimals, | ||
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Returns a WKT representation of the given geometry using floating point coordinate values.
Floating point precision can be set via the num_decimals parameter. Setting num_decimals to -1 yields the same result as sfcgal_geometry_as_text()
| geom | the input geometry | |
| num_decimals | decimal precision | |
| [out] | buffer | the output buffer |
| [out] | len | the size of the buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API void sfcgal_geometry_as_vtk | ( | const sfcgal_geometry_t * | geom, |
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Creates a VTK string of the given geometry.
| geom | the input geometry | |
| [out] | buffer | the output buffer |
| [out] | len | the size of the buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API void sfcgal_geometry_as_vtk_file | ( | const sfcgal_geometry_t * | geom, |
| const char * | filename | ||
| ) |
Creates a VTK file of the given geometry.
| geom | the input geometry |
| filename | VTK filename |
| SFCGAL_API void sfcgal_geometry_as_wkb | ( | const sfcgal_geometry_t * | geom, |
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Returns a WKB representation of the given geometry.
| geom | the input geometry | |
| [out] | buffer | the output buffer |
| [out] | len | the size of the buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_boundary | ( | const sfcgal_geometry_t * | geom | ) |
Returns the boundary of geom.
| geom | input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_buffer3d | ( | const sfcgal_geometry_t * | geom, |
| double | radius, | ||
| int | segments, | ||
| sfcgal_buffer3d_type_t | buffer_type | ||
| ) |
Computes a 3D buffer around a geometry.
| geom | The input geometry (must be a SFCGAL::Point or SFCGAL::LineString) |
| radius | The buffer radius |
| segments | The number of segments to use for approximating curved surfaces |
| buffer_type | The type of buffer to compute (ROUND, CYLSPHERE, or FLAT) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_centroid | ( | const sfcgal_geometry_t * | geom | ) |
Returns a SFCGAL::Point representing the geometry centroid.
| geom | input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_centroid_3d | ( | const sfcgal_geometry_t * | geom | ) |
Returns a SFCGAL::Point representing the geometry centroid.
| geom | input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_chamfer | ( | const sfcgal_geometry_t * | solid, |
| const sfcgal_geometry_t * | edge, | ||
| double | radius, | ||
| double | radius_y, | ||
| double | epsilon | ||
| ) |
Replace sharp edges of a solid with a flat bevelled face (chamfer).
Each matched edge is cut back by radius along both adjacent faces. When radius_y differs from radius the bevel is asymmetric: one leg has length radius, the other radius_y.
| solid | The input SFCGAL::Solid |
| edge | SFCGAL::LineString or SFCGAL::MultiLineString selecting the edges to chamfer. |
| radius | Leg length on the first face. |
| radius_y | Leg length on the second face. If negative, defaults to radius (symmetric chamfer). |
| epsilon | Tolerance (in coordinate units) used to locate edge endpoints on the solid mesh. |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_clone | ( | const sfcgal_geometry_t * | geom | ) |
Returns a deep clone of the given geometry.
| geom | the input geometry |
| SFCGAL_API void sfcgal_geometry_collection_add_geometry | ( | sfcgal_geometry_t * | collection, |
| sfcgal_geometry_t * | geometry | ||
| ) |
Adds a Geometry to a given SFCGAL::GeometryCollection.
| collection | the input geometry |
| geometry | the new geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_collection_create | ( | void | ) | -> sfcgal_geometry_t * |
Creates an empty SFCGAL::GeometryCollection.
Creates an empty SFCGAL::GeometryCollection.
| SFCGAL_API const sfcgal_geometry_t* sfcgal_geometry_collection_geometry_n | ( | const sfcgal_geometry_t * | collection, |
| size_t | index | ||
| ) |
Returns the ith geometry of a SFCGAL::GeometryCollection.
| collection | the input geometry |
| index | index of the geometry in the collection |
| SFCGAL_API size_t sfcgal_geometry_collection_num_geometries | ( | const sfcgal_geometry_t * | collection | ) |
Returns the number of geometries of a given SFCGAL::GeometryCollection.
| collection | the input geometry |
| SFCGAL_API void sfcgal_geometry_collection_set_geometry_n | ( | sfcgal_geometry_t * | collection, |
| sfcgal_geometry_t * | geometry, | ||
| size_t | index | ||
| ) |
Set the ith geometry of a given SFCGAL::GeometryCollection.
| collection | the input geometry |
| geometry | the new geometry |
| index | index of the geometry in the collection |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_convexhull | ( | const sfcgal_geometry_t * | geom | ) |
Returns the convex hull of geom.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_convexhull_3d | ( | const sfcgal_geometry_t * | geom | ) |
Returns the 3D convex hull of geom.
| geom | the input geometry |
| SFCGAL_API int sfcgal_geometry_covers | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Tests the 2D coverage of geom1 and geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API int sfcgal_geometry_covers_3d | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Tests the 3D coverage of geom1 and geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API void sfcgal_geometry_delete | ( | sfcgal_geometry_t * | geom | ) |
Deletes a given geometry.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_difference | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Returns the difference of geom1 and geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_difference_3d | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Returns the 3D difference of geom1 and geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API int sfcgal_geometry_dimension | ( | const sfcgal_geometry_t * | geom | ) |
Returns the dimension of a given geometry ( 0 : punctual, 1 : curve, ...)
| geom | the input geometry |
| SFCGAL_API double sfcgal_geometry_distance | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Computes the distance of the two given Geometry objects.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API double sfcgal_geometry_distance_3d | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Computes the 3D distance of the two given Geometry objects.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API int sfcgal_geometry_drop_m | ( | sfcgal_geometry_t * | geom | ) |
Drops the m coordinate of the geometry.
| geom | the input geometry |
| SFCGAL_API int sfcgal_geometry_drop_z | ( | sfcgal_geometry_t * | geom | ) |
Drops the z coordinate of the geometry.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_envelope | ( | const sfcgal_geometry_t * | geom | ) |
Returns the envelope of geom.
| geom | input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_envelope_3d | ( | const sfcgal_geometry_t * | geom | ) |
Returns the 3d envelope of geom.
| geom | input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_extrude | ( | const sfcgal_geometry_t * | geom, |
| double | ex, | ||
| double | ey, | ||
| double | ez | ||
| ) |
Returns an extrusion of the given Geometry.
| geom | the input geometry |
| ex | extrude value on x axis |
| ey | extrude value on y axis |
| ez | extrude value on z axis |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_extrude_polygon_straight_skeleton | ( | const sfcgal_geometry_t * | geom, |
| double | building_height, | ||
| double | roof_height | ||
| ) |
Returns the union of the polygon z-extrusion (with respect to building_height) and the extrude straight skeleton (with respect to roof_height) of the given SFCGAL::Polygon.
This algorithm constructs a roof with a 45-degree pitch and a maximum height of roof_height. The roof rises until either the roof faces meet or the height reaches roof_height, whichever occurs first. Therefore, roof_height is not guaranteed to be reached.
| geom | the input geometry |
| building_height | extrusion height of walls |
| roof_height | extrusion height of roof |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_extrude_polygon_straight_skeleton_with_angles | ( | const sfcgal_geometry_t * | geom, |
| double | building_height, | ||
| double | roof_height, | ||
| const double * | angles, | ||
| const size_t * | angles_per_ring, | ||
| size_t | num_rings | ||
| ) |
Returns the union of the polygon z-extrusion (with respect to building_height) and the extrude straight skeleton (with respect to roof_height) of the given SFCGAL::Polygon, with custom per-edge angles.
This algorithm constructs a roof with custom slopes and a maximum height of roof_height. The roof rises until either the roof faces meet or the height reaches roof_height, whichever occurs first. Therefore, roof_height is not guaranteed to be reached.
| geom | the input geometry |
| building_height | extrusion height of walls |
| roof_height | extrusion height of roof |
| angles | flattened array of angles (in degrees) for each edge of each ring |
| angles_per_ring | array containing the number of angles for each ring |
| num_rings | number of rings (exterior + holes) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_extrude_polygon_straight_skeleton_with_weights | ( | const sfcgal_geometry_t * | geom, |
| double | building_height, | ||
| double | roof_height, | ||
| const double * | weights, | ||
| const size_t * | weights_per_ring, | ||
| size_t | num_rings | ||
| ) |
Returns the union of the polygon z-extrusion (with respect to building_height) and the extrude straight skeleton (with respect to roof_height) of the given SFCGAL::Polygon, with custom per-edge weights.
This algorithm constructs a roof with custom edge weights and a maximum height of roof_height. The roof rises until either the roof faces meet or the height reaches roof_height, whichever occurs first. Therefore, roof_height is not guaranteed to be reached.
| geom | the input geometry |
| building_height | extrusion height of walls |
| roof_height | extrusion height of roof |
| weights | flattened array of weights (tan of angles) for each edge of each ring |
| weights_per_ring | array containing the number of weights for each ring |
| num_rings | number of rings (exterior + holes) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_extrude_straight_skeleton | ( | const sfcgal_geometry_t * | geom, |
| double | height | ||
| ) |
Returns the extrude straight skeleton of the given SFCGAL::Polygon.
This algorithm constructs an extrusion with a 45-degree pitch and a maximum height of height. The height rises until either the extrusion faces meet or the height reaches height, whichever occurs first. Therefore, height is not guaranteed to be reached.
| geom | the input geometry |
| height | extrusion height |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_extrude_straight_skeleton_with_angles | ( | const sfcgal_geometry_t * | geom, |
| double | height, | ||
| const double * | angles, | ||
| const size_t * | angles_per_ring, | ||
| size_t | num_rings | ||
| ) |
Returns the extrude straight skeleton for the given SFCGAL::Geometry with custom per-edge angles.
| geom | the input geometry |
| height | extrusion height |
| angles | flattened array of angles (in degrees) for each edge of each ring |
| angles_per_ring | array containing the number of angles for each ring |
| num_rings | number of rings (exterior + holes) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_extrude_straight_skeleton_with_weights | ( | const sfcgal_geometry_t * | geom, |
| double | height, | ||
| const double * | weights, | ||
| const size_t * | weights_per_ring, | ||
| size_t | num_rings | ||
| ) |
Returns the extrude straight skeleton of the given SFCGAL::Polygon, with custom per-edge weights.
| geom | the input geometry |
| height | extrusion height |
| weights | flattened array of weights (tan of angles) for each edge of each ring |
| weights_per_ring | array containing the number of weights for each ring |
| num_rings | number of rings (exterior + holes) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_fillet | ( | const sfcgal_geometry_t * | solid, |
| const sfcgal_geometry_t * | edge, | ||
| double | radius, | ||
| int | segments, | ||
| double | epsilon | ||
| ) |
Replace sharp edges of a solid with a smooth circular-arc fillet.
Each matched edge is replaced by a cylindrical surface of the given radius, approximated by segments planar faces.
| solid | The input SFCGAL::Solid |
| edge | SFCGAL::LineString or SFCGAL::MultiLineString selecting the edges to fillet. |
| radius | Fillet radius. |
| segments | Number of planar faces approximating the arc. Typical values: 4 (coarse), 8 (default), 16+ (smooth). |
| epsilon | Tolerance (in coordinate units) used to locate edge endpoints on the solid mesh. |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_force_lhr | ( | const sfcgal_geometry_t * | geom | ) |
Force a Left Handed Rule on the given Geometry.
| geom | the input geometry |
| SFCGAL_API int sfcgal_geometry_force_m | ( | sfcgal_geometry_t * | geom, |
| double | default_m | ||
| ) |
Adds a m-dimension to the geometry, initialized to a preset value.
Existing M values remains unchanged. This has no effect on empty geometries.
| geom | the input geometry |
| default_m | m-value to use |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_force_rhr | ( | const sfcgal_geometry_t * | geom | ) |
Force a Right Handed Rule on the given Geometry.
| geom | the input geometry |
| SFCGAL_API void sfcgal_geometry_force_valid | ( | sfcgal_geometry_t * | geom, |
| int | valid | ||
| ) |
Sets the validity flag of the geometry.
FIXME We better have geometry constructors to directly build valid geometries
| geom | the input geometry |
| valid | 1 to force validity or 0 to force invalidity |
| SFCGAL_API int sfcgal_geometry_force_z | ( | sfcgal_geometry_t * | geom, |
| double | default_z | ||
| ) |
Adds a z-dimension to the geometry, initialized to a preset value.
Existing Z values remains unchanged. This has no effect on empty geometries.
| geom | the input geometry |
| default_z | z-value to use |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_generate_flat_roof | ( | const sfcgal_geometry_t * | geom, |
| double | height | ||
| ) |
Generate a flat roof from a polygon.
| geom | the input polygon |
| height | roof height |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_generate_gable_roof | ( | const sfcgal_geometry_t * | geom, |
| double | height, | ||
| double | slope_angle | ||
| ) |
Generate a gable roof from a polygon.
Automatically detects gable ends (shortest edges become vertical).
| geom | the input polygon |
| height | roof height |
| slope_angle | slope angle for non-gable edges in degrees |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_generate_hipped_roof | ( | const sfcgal_geometry_t * | geom, |
| double | height | ||
| ) |
Generate a hipped roof from a polygon using straight skeleton.
| geom | the input polygon |
| height | roof height |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_generate_roof | ( | const sfcgal_geometry_t * | geom, |
| sfcgal_roof_type_t | roof_type, | ||
| double | slope_angle, | ||
| double | height, | ||
| size_t | primary_edge_index | ||
| ) |
Generate a roof from a polygon using a specified type.
Dispatches to flat, hipped, gable, or skillion roof generation.
| geom | the input polygon |
| roof_type | roof type (SFCGAL_ROOF_FLAT, SFCGAL_ROOF_HIPPED, SFCGAL_ROOF_SKILLION, or SFCGAL_ROOF_GABLE) |
| slope_angle | slope angle in degrees for gable/skillion (default: 30) |
| height | roof height (default: 3.0) |
| primary_edge_index | index of the sloped edge for skillion (default: 0) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_generate_skillion_roof | ( | const sfcgal_geometry_t * | geom, |
| double | height, | ||
| double | slope_angle, | ||
| size_t | primary_edge_index | ||
| ) |
Generate a skillion (mono-pitch) roof from a polygon.
| geom | the input polygon |
| height | roof height |
| slope_angle | slope angle in degrees |
| primary_edge_index | index of the sloped edge |
| SFCGAL_API int sfcgal_geometry_has_validity_flag | ( | const sfcgal_geometry_t * | geom | ) |
Gets the validity flag of the geometry.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_insert_points_within_tolerance | ( | const sfcgal_geometry_t * | base, |
| const sfcgal_geometry_t * | source, | ||
| double | tolerance | ||
| ) |
Insert points from source geometry into base geometry within tolerance.
This function densifies the base geometry by adding points from the source geometry where they are within the specified tolerance distance from the base geometry's segments.
| base | The geometry to receive inserted points |
| source | The geometry providing points to insert |
| tolerance | Maximum distance for a point to be considered for insertion |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_intersection | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Returns the intersection of geom1 and geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_intersection_3d | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Returns the 3D intersection of geom1 and geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API int sfcgal_geometry_intersects | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Tests the intersection of geom1 and geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API int sfcgal_geometry_intersects_3d | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Tests the 3D intersection of geom1 and geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API int sfcgal_geometry_is_3d | ( | const sfcgal_geometry_t * | geom | ) |
Tests if the given geometry is 3D or not.
| geom | the input geometry |
| SFCGAL_API int sfcgal_geometry_is_almost_equals | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2, | ||
| double | tolerance | ||
| ) |
Returns true if geom1 is almost equals to geom2.
For each point of geom1 there is a point in geom2 within tolerance distance.
| geom1 | the first geometry |
| geom2 | the second geometry |
| tolerance | the tolerance |
| SFCGAL_API int sfcgal_geometry_is_closed | ( | const sfcgal_geometry_t * | geom | ) |
Tests if the given geometry is closed or not.
| geom | the input geometry |
| SFCGAL_API int sfcgal_geometry_is_complexity_detail | ( | const sfcgal_geometry_t * | geom, |
| char ** | invalidity_reason, | ||
| sfcgal_geometry_t ** | invalidity_location | ||
| ) |
| [in] | geom | the input geometry |
| [out] | invalidity_reason | invalidity reason |
| [out] | invalidity_location | invalidity location |
| SFCGAL_API int sfcgal_geometry_is_empty | ( | const sfcgal_geometry_t * | geom | ) |
Tests if the given geometry is empty or not.
| geom | the input geometry |
| SFCGAL_API int sfcgal_geometry_is_equals | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Returns true if geom1 is equals to geom2.
For each point of geom1 there is a point in geom2.
| geom1 | first input geometry |
| geom2 | second input geometry |
| SFCGAL_API int sfcgal_geometry_is_measured | ( | const sfcgal_geometry_t * | geom | ) |
Tests if the given geometry is measured (has an m) or not.
| geom | the input geometry |
| SFCGAL_API int sfcgal_geometry_is_planar | ( | const sfcgal_geometry_t * | geom | ) |
Tests if the given Geometry is planar.
| geom | the input geometry |
| SFCGAL_API int sfcgal_geometry_is_simple | ( | const sfcgal_geometry_t * | geom | ) |
Tests if the given geometry is simple or not.
| geom | the input geometry |
| SFCGAL_API int sfcgal_geometry_is_simple_detail | ( | const sfcgal_geometry_t * | geom, |
| char ** | complexity_reason | ||
| ) |
Tests if the given geometry is simple or not And return details in case of complexity.
| geom | the input geometry |
| complexity_reason | input/output parameter. If non null, a null-terminated string could be allocated and contain reason of the complexity |
| SFCGAL_API int sfcgal_geometry_is_valid | ( | const sfcgal_geometry_t * | geom | ) |
Tests if the given geometry is valid or not.
| geom | the input geometry |
| SFCGAL_API int sfcgal_geometry_is_valid_detail | ( | const sfcgal_geometry_t * | geom, |
| char ** | invalidity_reason, | ||
| sfcgal_geometry_t ** | invalidity_location | ||
| ) |
Tests if the given geometry is valid or not And return details in case of invalidity.
| [in] | geom | the input geometry |
| [out] | invalidity_reason | input/output parameter. If non null, a null-terminated string could be allocated and contain reason of the invalidity |
| [out] | invalidity_location | input/output parameter. If non null, a geometry could be allocated and contain the location of the invalidity |
| SFCGAL_API double sfcgal_geometry_length | ( | const sfcgal_geometry_t * | geom | ) |
Returns the 2D length of geom.
| geom | input geometry |
| SFCGAL_API double sfcgal_geometry_length_3d | ( | const sfcgal_geometry_t * | geom | ) |
Returns the 3D length of geom.
| geom | input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_line_sub_string | ( | const sfcgal_geometry_t * | geom, |
| double | start, | ||
| double | end | ||
| ) |
Returns the substring of the given SFCGAL::LineString between fractional distances.
| geom | the input geometry |
| start | distance from start to begin extraction |
| end | distance to end to end extraction |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_make_solid | ( | const sfcgal_geometry_t * | geom | ) |
Convert a SFCGAL::PolyhedralSurface to a SFCGAL::Solid.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_minkowski_sum | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Returns the 2D minkowski sum geom1 + geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry (must be a Polygon) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_minkowski_sum_3d | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Returns the 3D minkowski sum geom1 + geom2.
The Minkowski sum of two point sets A and B is defined as: A + B = { a + b : a in A, b in B }
Supports all 3D geometry types including Point, LineString, Polygon, Triangle, TriangulatedSurface, PolyhedralSurface, Solid, and collections.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API size_t sfcgal_geometry_num_geometries | ( | const sfcgal_geometry_t * | collection | ) |
Returns the number of geometries of the given geometry collection.
| collection | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_offset_polygon | ( | const sfcgal_geometry_t * | geom, |
| double | radius | ||
| ) |
Returns the offset polygon of the given Geometry.
| geom | the input geometry |
| radius | offset distance |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_optimal_alpha_shapes | ( | const sfcgal_geometry_t * | geom, |
| bool | allow_holes, | ||
| size_t | nb_components | ||
| ) |
Returns the optimal alpha shapes of geom.
| geom | the input geometry |
| allow_holes | defines whether alpha shapes are allowed to contain holes |
| nb_components | the number of connected components in the output geometry |
| SFCGAL_API int sfcgal_geometry_orientation | ( | const sfcgal_geometry_t * | geom | ) |
Returns the orientation of the given SFCGAL::Polygon -1 for a counter clockwise orientation 1 for a clockwise orientation 0 for an invalid or undetermined orientation.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_projected_medial_axis | ( | const sfcgal_geometry_t * | geom | ) |
Returns the projected medial axis for the given SFCGAL::Polygon Projected medial axis is based on approximate medial axis and extend end lines to polygon edges.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_rotate | ( | const sfcgal_geometry_t * | geom, |
| double | angle | ||
| ) |
Rotates a geometry in 2D around the origin (0,0) by a given angle.
| geom | The geometry to rotate |
| angle | Rotation angle in radians |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_rotate_2d | ( | const sfcgal_geometry_t * | geom, |
| double | angle, | ||
| double | cx, | ||
| double | cy | ||
| ) |
Rotates a geometry in 2D around a specified point by a given angle.
| geom | The geometry to rotate |
| angle | Rotation angle in radians |
| cx | X-coordinate of the center point |
| cy | Y-coordinate of the center point |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_rotate_3d | ( | const sfcgal_geometry_t * | geom, |
| double | angle, | ||
| double | ax, | ||
| double | ay, | ||
| double | az | ||
| ) |
Rotates a geometry in 3D around a specified axis and origin (0, 0, 0) by a given angle.
| geom | The geometry to rotate |
| angle | Rotation angle in radians |
| ax | X-coordinate of the axis vector |
| ay | Y-coordinate of the axis vector |
| az | Z-coordinate of the axis vector |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_rotate_3d_around_center | ( | const sfcgal_geometry_t * | geom, |
| double | angle, | ||
| double | ax, | ||
| double | ay, | ||
| double | az, | ||
| double | cx, | ||
| double | cy, | ||
| double | cz | ||
| ) |
Rotates a geometry in 3D around a specified axis and center point by a given angle.
| geom | The geometry to rotate |
| angle | Rotation angle in radians |
| ax | X-coordinate of the axis vector |
| ay | Y-coordinate of the axis vector |
| az | Z-coordinate of the axis vector |
| cx | X-coordinate of the center point |
| cy | Y-coordinate of the center point |
| cz | Z-coordinate of the center point |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_rotate_x | ( | const sfcgal_geometry_t * | geom, |
| double | angle | ||
| ) |
Rotates a geometry in 3D around the X axis and origin (0, 0, 0) by a given angle.
| geom | The geometry to rotate |
| angle | Rotation angle in radians |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_rotate_y | ( | const sfcgal_geometry_t * | geom, |
| double | angle | ||
| ) |
Rotates a geometry around the Y axis and origin (0, 0, 0) by a given angle.
| geom | The geometry to rotate |
| angle | Rotation angle in radians |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_rotate_z | ( | const sfcgal_geometry_t * | geom, |
| double | angle | ||
| ) |
Rotates a geometry around the Z axis and origin (0, 0, 0) by a given angle.
| geom | The geometry to rotate |
| angle | Rotation angle in radians |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_round | ( | const sfcgal_geometry_t * | geom, |
| int | scale | ||
| ) |
Round coordinates of the given Geometry.
| geom | the input geometry |
| scale | rounding precision |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_scale | ( | const sfcgal_geometry_t * | geom, |
| double | scale | ||
| ) |
Scale a geometry by a given factor.
| geom | The geometry to scale |
| scale | Scale factor |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_scale_3d | ( | const sfcgal_geometry_t * | geom, |
| double | sx, | ||
| double | sy, | ||
| double | sz | ||
| ) |
Scale a geometry by different factors for each dimension.
| geom | The geometry to scale |
| sx | Scale factor for x dimension |
| sy | Scale factor for y dimension |
| sz | Scale factor for z dimension |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_scale_3d_around_center | ( | const sfcgal_geometry_t * | geom, |
| double | sx, | ||
| double | sy, | ||
| double | sz, | ||
| double | cx, | ||
| double | cy, | ||
| double | cz | ||
| ) |
Scale a geometry by different factors for each dimension around a center point.
| geom | The geometry to scale |
| sx | Scale factor for x dimension |
| sy | Scale factor for y dimension |
| sz | Scale factor for z dimension |
| cx | X-coordinate of the center point |
| cy | Y-coordinate of the center point |
| cz | Z-coordinate of the center point |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_simplify | ( | const sfcgal_geometry_t * | geom, |
| double | threshold, | ||
| bool | preserve_topology | ||
| ) |
Simplify a geometry by simplifying the polylines it contains.
| geom | the geometry to simplify |
| threshold | threshold parameter |
| preserve_topology | preserve the topology |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_simplify_surface_edge_count | ( | const sfcgal_geometry_t * | geometry, |
| size_t | edge_count, | ||
| sfcgal_simplification_strategy_t | strategy | ||
| ) |
Simplify a surface mesh using CGAL edge collapse algorithm.
The stop predicate is expressed as an edge quantity.
| geometry | The input geometry to simplify (must be a surface or solid) |
| edge_count | When to stop the simplification process |
| strategy | The cost and placement strategy to use |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_simplify_surface_edge_ratio | ( | const sfcgal_geometry_t * | geometry, |
| double | edge_ratio, | ||
| sfcgal_simplification_strategy_t | strategy | ||
| ) |
Simplify a surface mesh using CGAL edge collapse algorithm.
The stop predicate is expressed as a proportion between 0 and 1.
| geometry | The input geometry to simplify (must be a surface or solid) |
| edge_ratio | The simplification process stops when the edge count ratio is reached |
| strategy | The cost and placement strategy to use |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_split_3d | ( | const sfcgal_geometry_t * | geom, |
| double | ptx, | ||
| double | pty, | ||
| double | ptz, | ||
| double | normalx, | ||
| double | normaly, | ||
| double | normalz, | ||
| bool | close_geometries | ||
| ) |
Splits the given geometry with a plane defined by a point and a normal vector.
| geom | The input geometry to split |
| ptx | X-coordinate of a point belonging to the splitting plane |
| pty | Y-coordinate of a point belonging to the splitting plane |
| ptz | Z-coordinate of a point belonging to the splitting plane |
| normalx | X-coordinate of the normal vector of the splitting plane |
| normaly | Y-coordinate of the normal vector of the splitting plane |
| normalz | Z-coordinate of the normal vector of the splitting plane |
| close_geometries | If true, ensures resulting geometries are closed. |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_straight_skeleton | ( | const sfcgal_geometry_t * | geom | ) |
Returns the straight skeleton of the given Geometry.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_straight_skeleton_distance_in_m | ( | const sfcgal_geometry_t * | geom | ) |
Returns the straight skeleton of the given Geometry with the distance to the border as M coordinate.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_straight_skeleton_partition | ( | const sfcgal_geometry_t * | geom, |
| bool | auto_orientation | ||
| ) |
Returns the straight skeleton partition for the given SFCGAL::Polygon.
| geom | the input geometry |
| auto_orientation | if 1 try to find the best orientation |
| SFCGAL_API void sfcgal_geometry_swap_xy | ( | sfcgal_geometry_t * | geom | ) |
Swaps the x and y coordinates of the geometry.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_tesselate | ( | const sfcgal_geometry_t * | geom | ) |
Returns a tessellation of the given Geometry.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_tessellate | ( | const sfcgal_geometry_t * | geom | ) |
Returns a tessellation of the given Geometry.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_transform | ( | const sfcgal_geometry_t * | geom, |
| const double * | matrix4x4 | ||
| ) |
Transform a geometry by a 3D matrix (4x4)
| geom | the geometry to transform |
| matrix4x4 | pointer onto 4x4 double matrix (column by column) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_translate_2d | ( | const sfcgal_geometry_t * | geom, |
| double | dx, | ||
| double | dy | ||
| ) |
Translate a geometry by a 2D vector.
| geom | the geometry to translate |
| dx | x component of the translation vector |
| dy | y component of the translation vector |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_translate_3d | ( | const sfcgal_geometry_t * | geom, |
| double | dx, | ||
| double | dy, | ||
| double | dz | ||
| ) |
Translate a geometry by a 3D vector.
| geom | the geometry to translate |
| dx | x component of the translation vector |
| dy | y component of the translation vector |
| dz | z component of the translation vector |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_triangulate_2dz | ( | const sfcgal_geometry_t * | geom | ) |
Returns a triangulation of the given Geometry.
| geom | the input geometry |
| SFCGAL_API void sfcgal_geometry_type | ( | const sfcgal_geometry_t * | geom, |
| char ** | type, | ||
| size_t * | type_len | ||
| ) |
Returns the type of a given geometry as a string.
| geom | the input geometry | |
| [out] | type | the output buffer |
| [out] | type_len | the size of the buffer |
| SFCGAL_API sfcgal_geometry_type_t sfcgal_geometry_type_id | ( | const sfcgal_geometry_t * | geom | ) |
Returns the type of a given geometry.
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_union | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Returns the union of geom1 and geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_union_3d | ( | const sfcgal_geometry_t * | geom1, |
| const sfcgal_geometry_t * | geom2 | ||
| ) |
Returns the 3D union of geom1 and geom2.
| geom1 | the first input geometry |
| geom2 | the second input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_visibility_point | ( | const sfcgal_geometry_t * | polygon, |
| const sfcgal_geometry_t * | point | ||
| ) |
Returns the visibility polygon of a SFCGAL::Point inside a SFCGAL::Polygon.
| polygon | input geometry |
| point | input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_geometry_visibility_segment | ( | const sfcgal_geometry_t * | polygon, |
| const sfcgal_geometry_t * | point_a, | ||
| const sfcgal_geometry_t * | point_b | ||
| ) |
build the visibility polygon of the segment [point_a ; point_b] on a SFCGAL::Polygon
| polygon | input geometry |
| point_a | input geometry |
| point_b | input geometry |
| SFCGAL_API double sfcgal_geometry_volume | ( | const sfcgal_geometry_t * | geom | ) |
Returns the volume of geom (must be a volume)
| geom | the input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_greene_approx_convex_partition_2 | ( | const sfcgal_geometry_t * | geom | ) |
Returns the greene approximal convex partition of a geometry (polygon without hole)
| geom | input geometry |
| SFCGAL_API void sfcgal_init | ( | void | ) |
This function must be called before all the other one.
| SFCGAL_API sfcgal_prepared_geometry_t* sfcgal_io_read_binary_prepared | ( | const char * | str, |
| size_t | len | ||
| ) |
Read a SFCGAL::PreparedGeometry from a binary representation.
| str | The string representing the geometry. |
| len | The size of str |
| SFCGAL_API sfcgal_prepared_geometry_t* sfcgal_io_read_ewkt | ( | const char * | str, |
| size_t | len | ||
| ) |
Parse an Extended Well-Known Text (EWKT) representation into a PreparedGeometry.
| str | The Well-Known Text (WKT) string representing the geometry. |
| len | The size of str |
| SFCGAL_API sfcgal_geometry_t* sfcgal_io_read_geojson | ( | const char * | str, |
| size_t | len | ||
| ) |
Parse a GeoJSON representation into a Geometry.
Supports Geometry, Feature, and FeatureCollection. For Feature/FeatureCollection, only the geometry part is extracted.
| str | The GeoJSON string representing the geometry. |
| len | The size of str |
| SFCGAL_API sfcgal_prepared_geometry_t* sfcgal_io_read_geojson_prepared | ( | const char * | str, |
| size_t | len | ||
| ) |
Parse a GeoJSON representation into a PreparedGeometry.
If CRS is specified in GeoJSON, extracts the EPSG code as SRID.
| str | The GeoJSON string representing the geometry. |
| len | The size of str |
| SFCGAL_API sfcgal_geometry_t* sfcgal_io_read_obj | ( | const char * | str, |
| size_t | len | ||
| ) |
Reads a geometry from an OBJ format string.
| [in] | str | The OBJ format string |
| [in] | len | The size of str |
| SFCGAL_API sfcgal_geometry_t* sfcgal_io_read_obj_file | ( | const char * | filename | ) |
Reads a geometry from an OBJ file.
| [in] | filename | The path to the OBJ file |
| SFCGAL_API sfcgal_geometry_t* sfcgal_io_read_wkb | ( | const char * | str, |
| size_t | len | ||
| ) |
io::readWKB
Parse a Well-Known Binary (WKB) representation into a Geometry.
| str | The Well-Known Text (WKB) string representing the geometry. |
| len | The size of str |
| SFCGAL_API sfcgal_geometry_t* sfcgal_io_read_wkt | ( | const char * | str, |
| size_t | len | ||
| ) |
io::readWKT
Parse a Well-Known Text (WKT) representation into a Geometry.
| str | The Well-Known Text (WKT) string representing the geometry. |
| len | The size of str |
| SFCGAL_API void sfcgal_io_write_binary_prepared | ( | const sfcgal_prepared_geometry_t * | geom, |
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Serialization.
Convert a Geometry to its binary representation.
| [in] | geom | the prepared geometry |
| [out] | buffer | The binary buffer |
| [out] | len | The size of buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API void sfcgal_linestring_add_point | ( | sfcgal_geometry_t * | linestring, |
| sfcgal_geometry_t * | point | ||
| ) |
Adds a point to a SFCGAL::LineString.
| linestring | is the SFCGAL::LineString where the SFCGAL::Point has to be added to |
| point | is the SFCGAL::Point to add to the given SFCGAL::LineString |
| SFCGAL_API void sfcgal_linestring_closes | ( | sfcgal_geometry_t * | linestring | ) |
Closes the SCGAL::LineString if it is not already closed.
| linestring | the input SFCGAL::LineString to close |
| SFCGAL_API sfcgal_geometry_t* sfcgal_linestring_create | ( | void | ) | -> sfcgal_geometry_t * |
Creates an empty SFCGAL::LineString.
Creates an empty SFCGAL::LineString.
| SFCGAL_API size_t sfcgal_linestring_num_points | ( | const sfcgal_geometry_t * | linestring | ) |
Returns the number of points of the given SFCGAL::LineString.
| linestring | the input geometry |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_linestring_point_n | ( | const sfcgal_geometry_t * | linestring, |
| size_t | index | ||
| ) |
Returns the ith point of a given SFCGAL::LineString.
| linestring | the input SFCGAL::LineString |
| index | is the point index in the SFCGAL::LineString |
| SFCGAL_API sfcgal_geometry_t* sfcgal_multi_linestring_create | ( | void | ) |
Creates an empty SFCGAL::MultiLineString.
| SFCGAL_API sfcgal_geometry_t* sfcgal_multi_point_create | ( | void | ) | -> sfcgal_geometry_t * |
Creates an empty SFCGAL::MultiPoint.
Creates an empty SFCGAL::MultiPoint.
| SFCGAL_API sfcgal_geometry_t* sfcgal_multi_polygon_create | ( | void | ) |
Creates an empty SFCGAL::MultiPolygon.
| SFCGAL_API sfcgal_geometry_t* sfcgal_multi_solid_create | ( | void | ) |
Creates an empty SFCGAL::MultiSolid.
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_approximate | ( | const sfcgal_geometry_t ** | points, |
| size_t | num_points, | ||
| unsigned int | degree, | ||
| double | tolerance, | ||
| size_t | max_control_points | ||
| ) |
Creates an approximating NURBS curve.
| points | Array of points to approximate |
| num_points | Number of points |
| degree | Target curve degree |
| tolerance | Maximum allowed deviation |
| max_control_points | Maximum control points to use |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_nurbs_curve_control_point_n | ( | const sfcgal_geometry_t * | curve, |
| size_t | index | ||
| ) |
Returns the ith control point of a NURBS curve.
| curve | the input NURBS curve |
| index | control point index |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_create | ( | void | ) |
Creates an empty NURBS curve.
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_create_bezier | ( | const sfcgal_geometry_t ** | points, |
| size_t | num_points | ||
| ) |
Creates a NURBS curve from Bezier control points.
| points | Array of Bezier control points |
| num_points | Number of control points |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_create_bspline | ( | const sfcgal_geometry_t ** | points, |
| size_t | num_points, | ||
| unsigned int | degree | ||
| ) |
Creates a uniform B-spline curve.
| points | Array of control points |
| num_points | Number of control points |
| degree | Spline degree |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_create_circular_arc | ( | const sfcgal_geometry_t * | center, |
| double | radius, | ||
| double | start_angle, | ||
| double | end_angle, | ||
| const sfcgal_geometry_t * | normal | ||
| ) |
Creates a circular arc as NURBS curve.
| center | Arc center point |
| radius | Arc radius (must be positive) |
| start_angle | Start angle in radians |
| end_angle | End angle in radians |
| normal | Normal vector for 3D arcs (can be NULL for Z-axis) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_create_from_full_data | ( | const sfcgal_geometry_t ** | points, |
| const double * | weights, | ||
| size_t | num_points, | ||
| unsigned int | degree, | ||
| const double * | knots, | ||
| size_t | num_knots | ||
| ) |
Creates a NURBS curve with full control over parameters.
| points | Array of control points |
| weights | Array of weights (can be NULL for uniform weights) |
| num_points | Number of control points |
| degree | Polynomial degree |
| knots | Array of knot values |
| num_knots | Number of knot values (must equal num_points + degree + 1) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_create_from_points | ( | const sfcgal_geometry_t ** | points, |
| size_t | num_points, | ||
| unsigned int | degree, | ||
| sfcgal_knot_method_t | knot_method | ||
| ) |
Creates a NURBS curve from control points with uniform weights.
| points | Array of control points |
| num_points | Number of control points |
| degree | Polynomial degree of curve |
| knot_method | Method for generating knot vector |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_create_from_points_and_weights | ( | const sfcgal_geometry_t ** | points, |
| const double * | weights, | ||
| size_t | num_points, | ||
| unsigned int | degree, | ||
| sfcgal_knot_method_t | knot_method | ||
| ) |
Creates a NURBS curve from control points and weights.
| points | Array of control points |
| weights | Array of weights (must match num_points) |
| num_points | Number of control points |
| degree | Polynomial degree of curve |
| knot_method | Method for generating knot vector |
| SFCGAL_API unsigned int sfcgal_nurbs_curve_degree | ( | const sfcgal_geometry_t * | curve | ) |
Returns the degree of a NURBS curve.
| curve | the input NURBS curve |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_derivative | ( | const sfcgal_geometry_t * | curve, |
| double | parameter, | ||
| unsigned int | order | ||
| ) |
Computes the derivative of a NURBS curve at given parameter.
| curve | the input NURBS curve |
| parameter | parameter value |
| order | derivative order (1 for first derivative, 2 for second, etc.) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_evaluate | ( | const sfcgal_geometry_t * | curve, |
| double | parameter | ||
| ) |
Evaluates a point on the NURBS curve at given parameter.
| curve | the input NURBS curve |
| parameter | parameter value (between curve bounds) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_fit | ( | const sfcgal_geometry_t ** | points, |
| size_t | num_points, | ||
| unsigned int | degree, | ||
| sfcgal_fit_method_t | fit_method, | ||
| sfcgal_knot_method_t | knot_method, | ||
| sfcgal_end_condition_t | end_condition, | ||
| double | tolerance, | ||
| size_t | max_control_points | ||
| ) |
Unified curve fitting interface.
| points | Array of points to fit |
| num_points | Number of points |
| degree | Target curve degree |
| fit_method | Whether to interpolate exactly or approximate |
| knot_method | Parameterization method |
| end_condition | Boundary conditions (for interpolation) |
| tolerance | Maximum deviation (for approximation, ignored otherwise) |
| max_control_points | Maximum control points (for approximation) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_interpolate | ( | const sfcgal_geometry_t ** | points, |
| size_t | num_points, | ||
| unsigned int | degree, | ||
| sfcgal_knot_method_t | knot_method, | ||
| sfcgal_end_condition_t | end_condition | ||
| ) |
Creates an interpolating NURBS curve through points.
| points | Array of points to interpolate through |
| num_points | Number of points |
| degree | Curve degree |
| knot_method | Parameterization method |
| end_condition | Boundary conditions |
| SFCGAL_API int sfcgal_nurbs_curve_is_bezier | ( | const sfcgal_geometry_t * | curve | ) |
Tests if a NURBS curve is in Bezier form.
| curve | the input NURBS curve |
| SFCGAL_API int sfcgal_nurbs_curve_is_bspline | ( | const sfcgal_geometry_t * | curve | ) |
Tests if a NURBS curve is a B-spline (uniform weights)
| curve | the input NURBS curve |
| SFCGAL_API int sfcgal_nurbs_curve_is_rational | ( | const sfcgal_geometry_t * | curve | ) |
Tests if a NURBS curve is rational (uses non-uniform weights)
| curve | the input NURBS curve |
| SFCGAL_API double sfcgal_nurbs_curve_knot_n | ( | const sfcgal_geometry_t * | curve, |
| size_t | index | ||
| ) |
Returns the knot value at index of a NURBS curve.
| curve | the input NURBS curve |
| index | knot index |
| SFCGAL_API size_t sfcgal_nurbs_curve_num_control_points | ( | const sfcgal_geometry_t * | curve | ) |
Returns the number of control points of a NURBS curve.
| curve | The NURBS curve geometry |
| SFCGAL_API size_t sfcgal_nurbs_curve_num_knots | ( | const sfcgal_geometry_t * | curve | ) |
Returns the number of knots in the knot vector of a NURBS curve.
| curve | the input NURBS curve |
| SFCGAL_API void sfcgal_nurbs_curve_set_control_point_n | ( | sfcgal_geometry_t * | curve, |
| size_t | index, | ||
| const sfcgal_geometry_t * | point | ||
| ) |
Sets the ith control point of a NURBS curve.
| curve | the NURBS curve to modify |
| index | control point index |
| point | new control point |
| SFCGAL_API void sfcgal_nurbs_curve_set_weight_n | ( | sfcgal_geometry_t * | curve, |
| size_t | index, | ||
| double | weight | ||
| ) |
Sets the weight at index of a NURBS curve.
| curve | the NURBS curve to modify |
| index | weight index |
| weight | new weight value (must be positive) |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_to_linestring | ( | const sfcgal_geometry_t * | curve, |
| unsigned int | num_segments | ||
| ) |
Converts a NURBS curve to a LineString with specified number of segments.
| curve | the input NURBS curve |
| num_segments | number of line segments |
| SFCGAL_API sfcgal_geometry_t* sfcgal_nurbs_curve_to_linestring_adaptive | ( | const sfcgal_geometry_t * | curve, |
| double | tolerance, | ||
| unsigned int | min_segments, | ||
| unsigned int | max_segments | ||
| ) |
Converts a NURBS curve to a LineString with adaptive tessellation.
| curve | the input NURBS curve |
| tolerance | maximum deviation tolerance |
| min_segments | minimum number of segments |
| max_segments | maximum number of segments |
| SFCGAL_API double sfcgal_nurbs_curve_weight_n | ( | const sfcgal_geometry_t * | curve, |
| size_t | index | ||
| ) |
Returns the weight at index of a NURBS curve.
| curve | the input NURBS curve |
| index | weight index |
| SFCGAL_API sfcgal_geometry_t* sfcgal_optimal_convex_partition_2 | ( | const sfcgal_geometry_t * | geom | ) |
Returns the optimal convex partition of a geometry (polygon without hole)
| geom | input geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_point_create | ( | void | ) | -> sfcgal_geometry_t * |
| SFCGAL_API sfcgal_geometry_t* sfcgal_point_create_from_xy | ( | double | x, |
| double | y | ||
| ) |
Creates a point from two X and Y coordinates.
| x | X coordinate |
| y | Y coordinate |
| SFCGAL_API sfcgal_geometry_t* sfcgal_point_create_from_xym | ( | double | x, |
| double | y, | ||
| double | m | ||
| ) |
Creates a point from three X, Y and M coordinates.
| x | X coordinate |
| y | Y coordinate |
| m | M coordinate |
| SFCGAL_API sfcgal_geometry_t* sfcgal_point_create_from_xyz | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Creates a point from three X, Y and Z coordinates.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| SFCGAL_API sfcgal_geometry_t* sfcgal_point_create_from_xyzm | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | m | ||
| ) |
Creates a point from four X, Y, Z and M coordinates.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| m | M coordinate |
| SFCGAL_API double sfcgal_point_m | ( | const sfcgal_geometry_t * | geom | ) |
Returns the M coordinate of the given SFCGAL::Point.
| geom | the input geometry |
| SFCGAL_API double sfcgal_point_x | ( | const sfcgal_geometry_t * | geom | ) |
Returns the X coordinate of the given SFCGAL::Point.
| geom | the input geometry |
| SFCGAL_API double sfcgal_point_y | ( | const sfcgal_geometry_t * | geom | ) |
Returns the Y coordinate of the given SFCGAL::Point.
| geom | the input geometry |
| SFCGAL_API double sfcgal_point_z | ( | const sfcgal_geometry_t * | geom | ) |
Returns the Z coordinate of the given SFCGAL::Point.
| geom | the input geometry |
| SFCGAL_API void sfcgal_polygon_add_interior_ring | ( | sfcgal_geometry_t * | polygon, |
| sfcgal_geometry_t * | ring | ||
| ) |
Adds an interior ring to a given SFCGAL::Polygon.
| polygon | the input geometry |
| ring | the new ring |
| SFCGAL_API sfcgal_geometry_t* sfcgal_polygon_create | ( | void | ) | -> sfcgal_geometry_t * |
| SFCGAL_API sfcgal_geometry_t* sfcgal_polygon_create_from_exterior_ring | ( | sfcgal_geometry_t * | ring | ) |
Creates an empty SFCGAL::Polygon from an exterior ring.
| ring | the input geometry |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_polygon_exterior_ring | ( | const sfcgal_geometry_t * | polygon | ) |
Returns the exterior ring of a given SFCGAL::Polygon.
| polygon | the input geometry |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_polygon_interior_ring_n | ( | const sfcgal_geometry_t * | polygon, |
| size_t | index | ||
| ) |
Returns the ith interior ring of a given SFCGAL::Polygon.
| polygon | the input geometry |
| index | index of the ring in the polygon |
| SFCGAL_API size_t sfcgal_polygon_num_interior_rings | ( | const sfcgal_geometry_t * | polygon | ) |
Returns the number of interior rings of a given SFCGAL::Polygon.
| polygon | the input geometry |
| SFCGAL_API void sfcgal_polygon_set_exterior_ring | ( | sfcgal_geometry_t * | polygon, |
| sfcgal_geometry_t * | ring | ||
| ) |
Sets the exterior ring of a given SFCGAL::Polygon.
| polygon | the input geometry |
| ring | the new exterior ring |
| SFCGAL_API void sfcgal_polyhedral_surface_add_patch | ( | sfcgal_geometry_t * | polyhedral, |
| sfcgal_geometry_t * | patch | ||
| ) |
Adds a patch to a given SFCGAL::PolyhedralSurface.
| polyhedral | the input geometry |
| patch | the new patch |
| SFCGAL_API void sfcgal_polyhedral_surface_add_polygon | ( | sfcgal_geometry_t * | polyhedral, |
| sfcgal_geometry_t * | polygon | ||
| ) |
Adds a SFCGAL::Polygon to a given SFCGAL::PolyhedralSurface.
| polyhedral | the input geometry |
| polygon | the new polygon |
| SFCGAL_API sfcgal_geometry_t* sfcgal_polyhedral_surface_create | ( | void | ) | -> sfcgal_geometry_t * |
Creates an empty SFCGAL::PolyhedralSurface.
Creates an empty SFCGAL::PolyhedralSurface.
| SFCGAL_API size_t sfcgal_polyhedral_surface_num_edges | ( | const sfcgal_geometry_t * | polyhedral | ) |
Get the number of edges into a PolyhedralSurface.
| polyhedral | the input geometry |
| SFCGAL_API size_t sfcgal_polyhedral_surface_num_patches | ( | const sfcgal_geometry_t * | polyhedral | ) |
Returns the number of patches of a given SFCGAL::PolyhedralSurface.
| polyhedral | the input geometry |
| SFCGAL_API size_t sfcgal_polyhedral_surface_num_polygons | ( | const sfcgal_geometry_t * | polyhedral | ) |
Returns the number of polygons of a given SFCGAL::PolyhedralSurface.
| polyhedral | the input geometry |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_polyhedral_surface_patch_n | ( | const sfcgal_geometry_t * | polyhedral, |
| size_t | index | ||
| ) |
Returns the ith patch of a given SFCGAL::PolyhedralSurface.
| polyhedral | the input geometry |
| index | index of the patch in the polyhedral |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_polyhedral_surface_polygon_n | ( | const sfcgal_geometry_t * | polyhedral, |
| size_t | index | ||
| ) |
Returns the ith polygon of a given SFCGAL::PolyhedralSurface.
| polyhedral | the input geometry |
| index | index of the patch in the polyhedral |
| SFCGAL_API void sfcgal_polyhedral_surface_set_patch_n | ( | sfcgal_geometry_t * | polyhedral, |
| sfcgal_geometry_t * | patch, | ||
| size_t | index | ||
| ) |
Set the ith patch of a given SFCGAL::PolyhedralSurface.
| polyhedral | the input geometry |
| patch | the new patch |
| index | index of the patch in the polyhedral |
| SFCGAL_API void sfcgal_prepared_geometry_as_ewkt | ( | const sfcgal_prepared_geometry_t * | prepared, |
| int | num_decimals, | ||
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Returns an EWKT representation of the given SFCGAL::PreparedGeometry.
| [in] | prepared | the input geometry |
| [in] | num_decimals | number of decimals. -2 for a variable number of decimals. |
| [out] | buffer | the output buffer |
| [out] | len | the size of the buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API void sfcgal_prepared_geometry_as_geojson | ( | const sfcgal_prepared_geometry_t * | prepared, |
| bool | strict, | ||
| int | precision, | ||
| bool | include_bbox, | ||
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Convert a PreparedGeometry to its GeoJSON representation.
If SRID is non-zero, includes a CRS member (non-standard but useful).
| [in] | prepared | the input prepared geometry |
| [in] | strict | If true, output strictly RFC 7946 compliant GeoJSON. Non-standard types (TIN, Solid, etc.) are converted to standard types. If false, use SFCGAL type names as extensions (allows round-trip). |
| [in] | precision | Number of decimal places for coordinates. -1 means full precision. |
| [in] | include_bbox | Include bounding box in output. |
| [out] | buffer | The output buffer |
| [out] | len | The size of buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API sfcgal_prepared_geometry_t* sfcgal_prepared_geometry_create | ( | void | ) |
Creates an empty SFCGAL::PreparedGeometry.
| SFCGAL_API sfcgal_prepared_geometry_t* sfcgal_prepared_geometry_create_from_geometry | ( | sfcgal_geometry_t * | geometry, |
| srid_t | srid | ||
| ) |
Creates a SFCGAL::PreparedGeometry from a Geometry and an SRID.
| geometry | the input geometry |
| srid | the srid of the geometry |
| SFCGAL_API void sfcgal_prepared_geometry_delete | ( | sfcgal_prepared_geometry_t * | prepared | ) |
Deletes a given SFCGAL::PreparedGeometry.
| prepared | the input geometry |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_prepared_geometry_geometry | ( | const sfcgal_prepared_geometry_t * | prepared | ) |
Returns the SFCGAL::Geometry associated with a given SFCGAL::PreparedGeometry.
| prepared | the input geometry |
| SFCGAL_API void sfcgal_prepared_geometry_set_geometry | ( | sfcgal_prepared_geometry_t * | prepared, |
| sfcgal_geometry_t * | geometry | ||
| ) |
Sets the Geometry associated with the given SFCGAL::PreparedGeometry.
| prepared | the input geometry |
| geometry | the geometry to set |
| SFCGAL_API void sfcgal_prepared_geometry_set_srid | ( | sfcgal_prepared_geometry_t * | prepared, |
| srid_t | srid | ||
| ) |
Sets SRID associated with a given SFCGAL::PreparedGeometry.
| prepared | the input geometry |
| srid | the srid of the geometry |
| SFCGAL_API srid_t sfcgal_prepared_geometry_srid | ( | const sfcgal_prepared_geometry_t * | prepared | ) |
Returns SRID associated with a given SFCGAL::PreparedGeometry.
| prepared | the input geometry |
| SFCGAL_API double sfcgal_primitive_area | ( | const sfcgal_primitive_t * | prim, |
| bool | with_discretization | ||
| ) |
Computes primitive area.
| prim | Pointer to the input primitive. |
| with_discretization | If true, the area is computed using the real discretization with radial segments. If false, the area is computed for a perfect primitive. |
| SFCGAL_API sfcgal_geometry_t* sfcgal_primitive_as_polyhedral_surface | ( | const sfcgal_primitive_t * | primitive | ) |
Generates a polyhedral surface representation of the primitive.
| primitive | Pointer to the primitive. |
| SFCGAL_API sfcgal_primitive_t* sfcgal_primitive_clone | ( | const sfcgal_primitive_t * | primitive | ) |
Returns a deep clone of the given primitive.
| primitive | Pointer to the primitive. |
| SFCGAL_API sfcgal_primitive_t* sfcgal_primitive_create | ( | sfcgal_primitive_type_t | primitive_type | ) |
Creates a new primitive of the specified type with default parameters.
| primitive_type | The type of primitive to create. |
| SFCGAL_API void sfcgal_primitive_delete | ( | sfcgal_primitive_t * | primitive | ) |
Deletes a previously allocated primitive.
| primitive | Pointer to the primitive to delete. |
primitive must be a valid pointer returned by a creation function ( e.g. sfcgal_primitive_create() ). | SFCGAL_API int sfcgal_primitive_is_almost_equals | ( | const sfcgal_primitive_t * | prim1, |
| const sfcgal_primitive_t * | prim2, | ||
| double | tolerance | ||
| ) |
Returns true if prim1 is equals to prim2.
Checks for primitive type and parameters equality.
| prim1 | Pointer to the first primitive. |
| prim2 | Pointer to the second primitive. |
| tolerance | the tolerance |
| SFCGAL_API void sfcgal_primitive_parameter | ( | const sfcgal_primitive_t * | primitive, |
| const char * | name, | ||
| char ** | buffer, | ||
| size_t * | len | ||
| ) |
Retrieves the primitive parameter name as JSON object { name, type, value }.
| primitive | Pointer to the primitive. | |
| name | parameter name to retrieve | |
| [out] | buffer | the output buffer |
| [out] | len | the size of the buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer() | SFCGAL_API double sfcgal_primitive_parameter_double | ( | const sfcgal_primitive_t * | primitive, |
| const char * | name | ||
| ) |
Retrieves the value of a primitive parameter as a double.
| primitive | Pointer to the primitive. |
| name | Name of the parameter to retrieve. |
name must exist and be of type double. | SFCGAL_API unsigned int sfcgal_primitive_parameter_int | ( | const sfcgal_primitive_t * | primitive, |
| const char * | name | ||
| ) |
Retrieves the value of a primitive parameter as an unsigned int.
| primitive | Pointer to the primitive. |
| name | Name of the parameter to retrieve. |
name must exist and be of type unsigned int. | SFCGAL_API void sfcgal_primitive_parameters | ( | const sfcgal_primitive_t * | primitive, |
| char ** | buffer, | ||
| size_t * | len | ||
| ) | -> void |
Retrieves the list of primitive parameters as JSON array of { name, type, value }.
| primitive | Pointer to the primitive. | |
| [out] | buffer | the output buffer |
| [out] | len | the size of the buffer |
buffer is returned allocated and must be freed by the caller with sfcgal_free_buffer()Retrieves the list of primitive parameters as JSON array of { name, type, value }.
| SFCGAL_API sfcgal_primitive_t* sfcgal_primitive_rotate | ( | const sfcgal_primitive_t * | primitive, |
| double | angle, | ||
| double | ax, | ||
| double | ay, | ||
| double | az, | ||
| double | cx, | ||
| double | cy, | ||
| double | cz | ||
| ) |
Rotates a primitive around a specified axis and center point by a given angle.
| primitive | The primitive to rotate |
| angle | Rotation angle in radians |
| ax | X-coordinate of the axis vector |
| ay | Y-coordinate of the axis vector |
| az | Z-coordinate of the axis vector |
| cx | X-coordinate of the center point |
| cy | Y-coordinate of the center point |
| cz | Z-coordinate of the center point |
| SFCGAL_API sfcgal_primitive_t* sfcgal_primitive_scale | ( | const sfcgal_primitive_t * | primitive, |
| double | sx, | ||
| double | sy, | ||
| double | sz, | ||
| double | cx, | ||
| double | cy, | ||
| double | cz | ||
| ) |
Scales a primitive by the given factor.
| primitive | The primitive to scale |
| sx | scale factor for x dimension |
| sy | scale factor for y dimension |
| sz | scale factor for z dimension |
| cx | X-coordinate of the center point |
| cy | Y-coordinate of the center point |
| cz | Z-coordinate of the center point |
| SFCGAL_API void sfcgal_primitive_set_parameter | ( | sfcgal_primitive_t * | primitive, |
| const char * | name, | ||
| const char * | json_value | ||
| ) |
Sets the value of a primitive parameter name as JSON object { name, type, value }.
| primitive | Pointer to the primitive. |
| name | Name of the parameter to set. |
| json_value | The new parameter value as JSON strong. |
name must exist. | SFCGAL_API void sfcgal_primitive_set_parameter_double | ( | sfcgal_primitive_t * | primitive, |
| const char * | name, | ||
| double | parameter | ||
| ) |
Sets the value of a primitive parameter as a double.
| primitive | Pointer to the primitive. |
| name | Name of the parameter to set. |
| parameter | The new parameter value. |
name must exist and accept values of type double. | SFCGAL_API void sfcgal_primitive_set_parameter_int | ( | sfcgal_primitive_t * | primitive, |
| const char * | name, | ||
| unsigned int | parameter | ||
| ) |
Sets the value of a primitive parameter as an unsigned int.
| primitive | Pointer to the primitive. |
| name | Name of the parameter to set. |
| parameter | The new parameter value. |
name must exist and accept values of type unsigned int. | SFCGAL_API double* sfcgal_primitive_transformation | ( | const sfcgal_primitive_t * | primitive | ) |
Retrieves the primitive's current transformation matrix as an array.
| primitive | Pointer to the primitive. |
| SFCGAL_API sfcgal_primitive_t* sfcgal_primitive_translate | ( | const sfcgal_primitive_t * | primitive, |
| double | dx, | ||
| double | dy, | ||
| double | dz | ||
| ) |
Translates a primitive by a 3D vector.
| primitive | the primitive to translate |
| dx | x component of the translation vector |
| dy | y component of the translation vector |
| dz | z component of the translation vector |
| SFCGAL_API sfcgal_primitive_type_t sfcgal_primitive_type_id | ( | const sfcgal_primitive_t * | primitive | ) |
Returns the type of a given primtive.
| primitive | the input primitive |
| SFCGAL_API double sfcgal_primitive_volume | ( | const sfcgal_primitive_t * | prim, |
| bool | with_discretization | ||
| ) |
Computes primitive volume.
| prim | Pointer to the input primitive. |
| with_discretization | If true, the area is computed using the real discretization with radial segments. If false, the area is computed for a perfect primitive. |
| SFCGAL_API void sfcgal_set_alloc_handlers | ( | sfcgal_alloc_handler_t | alloc_handler, |
| sfcgal_free_handler_t | free_handler | ||
| ) |
Sets the allocation handlers.
These functions are called on memory allocation and deallocation.
| alloc_handler | is the function to call for memory allocation. The default behaviour is to call malloc() |
| free_handler | is the function to call for memory deallocation. The default behaviour is to call free() |
| SFCGAL_API void sfcgal_set_error_handlers | ( | sfcgal_error_handler_t | warning_handler, |
| sfcgal_error_handler_t | error_handler | ||
| ) |
Sets the error handlers.
These callbacks are called on warning or error
| warning_handler | is the printf-styled callback function that will be called when a function raises a warning. The default behaviour is to call printf. |
| error_handler | is the printf-style callback function that will be called when a function generates an error. The default behaviour is to call printf. |
| SFCGAL_API void sfcgal_set_geometry_validation | ( | int | enabled | ) |
Set the geometry validation mode.
| enabled | 1 for enabled, 0 for disabled. |
| SFCGAL_API void sfcgal_solid_add_interior_shell | ( | sfcgal_geometry_t * | solid, |
| sfcgal_geometry_t * | shell | ||
| ) |
Adds a shell to a given SFCGAL::Solid.
| solid | the input geometry |
| shell | the new geometry |
| SFCGAL_API sfcgal_geometry_t* sfcgal_solid_create | ( | void | ) | -> sfcgal_geometry_t * |
| SFCGAL_API sfcgal_geometry_t* sfcgal_solid_create_from_exterior_shell | ( | sfcgal_geometry_t * | shell | ) |
Creates a SFCGAL::Solid from an exterior shell.
| shell | the input geometry |
| SFCGAL_API size_t sfcgal_solid_num_shells | ( | const sfcgal_geometry_t * | solid | ) |
Returns the number of shells of a given SFCGAL::Solid.
| solid | the input geometry |
| SFCGAL_API void sfcgal_solid_set_exterior_shell | ( | sfcgal_geometry_t * | solid, |
| sfcgal_geometry_t * | shell | ||
| ) |
Set the exterior shell of a given SFCGAL::Solid.
| solid | the input geometry |
| shell | the new geometry |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_solid_shell_n | ( | const sfcgal_geometry_t * | solid, |
| size_t | index | ||
| ) |
Returns the ith shell of a given SFCGAL::Solid.
| solid | the input geometry |
| index | index of the shell in the solid |
| SFCGAL_API sfcgal_geometry_t* sfcgal_triangle_create | ( | void | ) | -> sfcgal_geometry_t * |
Creates an empty SFCGAL::Triangle.
Creates an empty SFCGAL::Triangle.
| SFCGAL_API sfcgal_geometry_t* sfcgal_triangle_create_from_points | ( | const sfcgal_geometry_t * | pta, |
| const sfcgal_geometry_t * | ptb, | ||
| const sfcgal_geometry_t * | ptc | ||
| ) |
Creates a SFCGAL::Triangle from three given SFCGAL::Point.
| pta | first input point |
| ptb | second input point |
| ptc | third input point |
| SFCGAL_API void sfcgal_triangle_set_vertex | ( | sfcgal_geometry_t * | triangle, |
| int | index, | ||
| const sfcgal_geometry_t * | vertex | ||
| ) |
Sets one vertex of a SFCGAL::Triangle.
| triangle | the input geometry |
| index | index of the vertex in the triangle |
| vertex | new point |
| SFCGAL_API void sfcgal_triangle_set_vertex_from_xy | ( | sfcgal_geometry_t * | triangle, |
| int | index, | ||
| double | x, | ||
| double | y | ||
| ) |
Sets one vertex of a SFCGAL::Triangle from two coordinates.
| triangle | the input geometry |
| index | index of the vertex in the triangle |
| x | new point x |
| y | new point y |
| SFCGAL_API void sfcgal_triangle_set_vertex_from_xyz | ( | sfcgal_geometry_t * | triangle, |
| int | index, | ||
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
Sets one vertex of a SFCGAL::Triangle from three coordinates.
| triangle | the input geometry |
| index | index of the vertex in the triangle |
| x | new point x |
| y | new point y |
| z | new point z |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_triangle_vertex | ( | const sfcgal_geometry_t * | triangle, |
| int | index | ||
| ) |
Returns one the SFCGAL::Triangle's vertex as a SFCGAL::Point.
| triangle | the input geometry |
| index | index of the vertex in the triangle |
| SFCGAL_API void sfcgal_triangulated_surface_add_patch | ( | sfcgal_geometry_t * | tin, |
| sfcgal_geometry_t * | patch | ||
| ) |
Adds a patch to a given SFCGAL::TriangulatedSurface.
| tin | the input geometry |
| patch | the new patch |
| SFCGAL_API void sfcgal_triangulated_surface_add_triangle | ( | sfcgal_geometry_t * | tin, |
| sfcgal_geometry_t * | triangle | ||
| ) |
Adds a SFCGAL::Triangle to a given SFCGAL::TriangulatedSurface.
| tin | the input geometry |
| triangle | the new triangle |
| SFCGAL_API sfcgal_geometry_t* sfcgal_triangulated_surface_create | ( | void | ) | -> sfcgal_geometry_t * |
Creates an empty SFCGAL::TriangulatedSurface.
Creates an empty SFCGAL::TriangulatedSurface.
| SFCGAL_API size_t sfcgal_triangulated_surface_num_edges | ( | const sfcgal_geometry_t * | tin | ) |
Get the number of edges into a TriangulatedSurface.
| tin | the input geometry |
| SFCGAL_API size_t sfcgal_triangulated_surface_num_patches | ( | const sfcgal_geometry_t * | tin | ) |
Returns the number of patches of a given SFCGAL::TriangulatedSurface.
| tin | the input geometry |
| SFCGAL_API size_t sfcgal_triangulated_surface_num_triangles | ( | const sfcgal_geometry_t * | tin | ) |
Returns the number of triangles of a given SFCGAL::TriangulatedSurface.
| tin | the input geometry |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_triangulated_surface_patch_n | ( | const sfcgal_geometry_t * | tin, |
| size_t | index | ||
| ) |
Returns the ith patch of a given SFCGAL::TriangulatedSurface.
| tin | the input geometry |
| index | index of the patch in the tin |
| SFCGAL_API void sfcgal_triangulated_surface_set_patch_n | ( | sfcgal_geometry_t * | tin, |
| sfcgal_geometry_t * | patch, | ||
| size_t | index | ||
| ) |
Set the ith patch of a given SFCGAL::TriangulatedSurface.
| tin | the input geometry |
| patch | the new patch |
| index | index of the patch in the tin |
| SFCGAL_API const sfcgal_geometry_t* sfcgal_triangulated_surface_triangle_n | ( | const sfcgal_geometry_t * | tin, |
| size_t | index | ||
| ) |
Returns the ith SFCGAL::Triangle of a given SFCGAL::TriangulatedSurface.
| tin | the input geometry |
| index | index of the patch in the tin |
| SFCGAL_API const char* sfcgal_version | ( | void | ) |
Get version.
| SFCGAL_API sfcgal_geometry_t* sfcgal_y_monotone_partition_2 | ( | const sfcgal_geometry_t * | geom | ) |
Returns the y monotone partition of a geometry (polygon without hole)
| geom | input geometry |
1.8.10