star-enclosures-3d

Extract enclosures from 3D geometry
git clone git://git.meso-star.fr/star-enclosures-3d.git
Log | Files | Refs | README | LICENSE

sencX3d.h (1780B)


      1 /* Copyright (C) 2018-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 SENC_X_3D_H
     17 #define SENC_X_3D_H
     18 
     19 #if !defined(SENCXD_DIM) || (SENCXD_DIM != 2 && SENCXD_DIM != 3)
     20 #error "SENCXD_DIM must be defined; admissible values are 2 and 3"
     21 #endif
     22 
     23 #include <star/senc3d.h>
     24 
     25 /* Star-enclosures-XD macros generic to the SENCXD_DIM */
     26 #ifndef SENCXD
     27 #define SENCXD CONCAT(CONCAT(SENC, SENCXD_DIM), D)
     28 #endif
     29 #ifndef sencXd
     30 #define sencXd(Name) CONCAT(CONCAT(CONCAT(senc, SENCXD_DIM), d_), Name)
     31 #endif
     32 #ifndef SENCXD_
     33 #define SENCXD_(Name) CONCAT(CONCAT(CONCAT(SENC, SENCXD_DIM), D_), Name)
     34 #endif
     35 
     36 /* Function names that require additional dedicated macros */
     37 #define senc3d_scene_get_primitives_count senc3d_scene_get_triangles_count
     38 #define senc3d_scene_get_primitive senc3d_scene_get_triangle
     39 #define senc3d_scene_get_primitive_media senc3d_scene_get_triangle_media
     40 #define senc3d_scene_get_primitive_enclosures senc3d_scene_get_triangle_enclosures
     41 #define senc3d_enclosure_get_primitive senc3d_enclosure_get_triangle
     42 #define senc3d_enclosure_get_primitive_id senc3d_enclosure_get_triangle_id
     43 
     44 #endif /* SENC_X_3D_H */