star-geometry-3d

Clean and decorate 3D geometries
git clone git://git.meso-star.fr/star-geometry-3d.git
Log | Files | Refs | README | LICENSE

sgX3d.h (2259B)


      1 /* Copyright (C) 2019, 2020, 2023, 2024 |Méso|Star> (contact@meso-star.com)
      2  *
      3  * This program is free software: you can redistribute it and/or modify
      4  * it under the terms of the GNU General Public License as published by
      5  * the Free Software Foundation, either version 3 of the License, or
      6  * (at your option) any later version.
      7  *
      8  * This program is distributed in the hope that it will be useful,
      9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     11  * GNU General Public License for more details.
     12  *
     13  * You should have received a copy of the GNU General Public License
     14  * along with this program. If not, see <http://www.gnu.org/licenses/>. */
     15 
     16 #ifndef STAR_GEOMETRY3D_X_H__
     17 #define STAR_GEOMETRY3D_X_H__
     18 
     19 #if !defined(SGXD_DIM) || (SGXD_DIM != 2 && SGXD_DIM != 3)
     20 #error "SGXD_DIM must be defined; admissible values are 2 and 3"
     21 #endif
     22 
     23 #include <star/sg3d.h>
     24 
     25 /* Star-geometry-XD macros generic to the SGXD_DIM */
     26 #ifndef SGXD
     27 #define SGXD CONCAT(CONCAT(SGX, SGXD_DIM), D)
     28 #endif
     29 #ifndef sgXd
     30 #define sgXd(Name) CONCAT(CONCAT(CONCAT(sg, SGXD_DIM), d_), Name)
     31 #endif
     32 #ifndef SGXD_
     33 #define SGXD_(Name) CONCAT(CONCAT(CONCAT(SGX, SGXD_DIM), D_), Name)
     34 #endif
     35 
     36 /* Function names that require additional dedicated macros */
     37 #define sgXd_geometry_get_added_primitives_count \
     38   sg3d_geometry_get_added_triangles_count
     39 #define sgXd_geometry_get_unique_primitives_count \
     40   sg3d_geometry_get_unique_triangles_count
     41 #define sgXd_geometry_get_unique_primitive_vertices \
     42   sg3d_geometry_get_unique_triangle_vertices
     43 #define sgXd_geometry_get_unique_primitive_properties \
     44   sg3d_geometry_get_unique_triangle_properties
     45 #define sgXd_geometry_get_unique_primitive_user_id \
     46   sg3d_geometry_get_unique_triangle_user_id
     47 #define sgXd_geometry_get_unique_primitives_with_unspecified_side_count \
     48   sg3d_geometry_get_unique_triangles_with_unspecified_side_count
     49 #define sgXd_geometry_get_unique_primitives_with_unspecified_interface_count \
     50   sg3d_geometry_get_unique_triangles_with_unspecified_interface_count
     51 #define sgXd_geometry_get_unique_primitives_with_properties_conflict_count \
     52   sg3d_geometry_get_unique_triangles_with_properties_conflict_count
     53 
     54 #endif /* STAR_GEOMETRY3D_X_H__ */