Visual Servoing Platform  version 3.4.0
vpBound.h
1 /****************************************************************************
2  *
3  * ViSP, open source Visual Servoing Platform software.
4  * Copyright (C) 2005 - 2019 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * See the file LICENSE.txt at the root directory of this source
11  * distribution for additional information about the GNU GPL.
12  *
13  * For using ViSP with software that can not be combined with the GNU
14  * GPL, please contact Inria about acquiring a ViSP Professional
15  * Edition License.
16  *
17  * See http://visp.inria.fr for more information.
18  *
19  * This software was developed at:
20  * Inria Rennes - Bretagne Atlantique
21  * Campus Universitaire de Beaulieu
22  * 35042 Rennes Cedex
23  * France
24  *
25  * If you have questions regarding the use of this file, please contact
26  * Inria at visp@inria.fr
27  *
28  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30  *
31  * Description:
32  * Le fichier "bound.h" contient les macros et le types
33  * utilises par le modele geometrique surfacique polygonale 3D.
34  *
35  * Authors:
36  * Jean-Luc CORRE
37  *
38  *****************************************************************************/
39 
40 #ifndef vpBound_H
41 #define vpBound_H
42 
43 #include <visp3/core/vpConfig.h>
44 
45 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46 
47 #include "vpArit.h"
48 #include "vpMy.h"
49 #include <visp3/robot/vpWireFrameSimulatorTypes.h>
50 
51 #define START_ARG 0
52 #define NEXT_ARG 1
53 
54 #define BND_NULL (-1)
55 
56 #define BND_BLOCK 0
57 #define BND_CARDIOIDE 1
58 #define BND_CONE 2
59 #define BND_CYLINDER 3
60 #define BND_SPHERE 4
61 #define BND_TORUS 5
62 #define BND_WEDGE 6
63 
64 #define BND_F3 7
65 #define BND_F4 8
66 
67 #define BND_GRID 9
68 #define BND_PIPE 10
69 #define BND_SECTION 11
70 
71 #define BND_NBR 12
72 
73 #define BOUND_NBR 1024
74 #define FACE_NBR 6144 /* Tailles de tableaux */
75 #define VERTEX_NBR 16
76 #define POINT_NBR 6144
77 #ifdef face_normal
78 #define VECTOR_NBR 6144
79 #endif // face_normal
80 
81 #ifdef face_edge
82 typedef struct {
83  Index v0, v1; /* extremites */
84  Index f0, f1; /* faces */
85 } Edge;
86 #endif // face_edge
87 
88 #ifdef face_edge
89 typedef struct {
90  Index nbr; /* nombre d'aretes */
91  Edge *ptr; /* liste dynamique */
92 } Edge_list;
93 #endif // face_edge
94 
95 #ifdef face_normal
96 typedef struct {
97  Index nbr; /* nombre de vecteurs */
98  Vector *ptr; /* liste dynamique */
99 } Vector_list;
100 #endif // face_normal
101 
102 typedef struct {
103  float xmin, xmax; /* bornes sur l'axe x */
104  float ymin, ymax; /* bornes sur l'axe y */
105  float zmin, zmax; /* bornes sur l'axe z */
106 } Bounding_box;
107 
108 typedef struct {
109  Index nbr; /* nombre de scenes */
110  Bound_scene *ptr; /* liste dynamique */
111 } Bound_scene_list;
112 
113 void free_Bound(Bound *bp);
114 void free_huge_Bound(Bound *bp);
115 void free_Bound_scene(Bound_scene *bsp);
116 void malloc_Bound(Bound *bp, Type type, int polygonal, Index fn, Index pn);
117 void malloc_huge_Bound(Bound *bp);
118 void malloc_Bound_scene(Bound_scene *bsp, const char *name, Index bn);
119 
120 #endif
121 #endif