Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
vpBound.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See http://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Le fichier "bound.h" contient les macros et le types
32  * utilises par le modele geometrique surfacique polygonale 3D.
33  *
34  * Authors:
35  * Jean-Luc CORRE
36  *
37  *****************************************************************************/
38 
39 #ifndef vpBound_H
40 #define vpBound_H
41 
42 #include <visp3/core/vpConfig.h>
43 
44 #ifndef DOXYGEN_SHOULD_SKIP_THIS
45 
46 #include "vpMy.h"
47 #include "vpArit.h"
48 #include <visp3/robot/vpWireFrameSimulatorTypes.h>
49 
50 #define START_ARG 0
51 #define NEXT_ARG 1
52 
53 #define BND_NULL (-1)
54 
55 #define BND_BLOCK 0
56 #define BND_CARDIOIDE 1
57 #define BND_CONE 2
58 #define BND_CYLINDER 3
59 #define BND_SPHERE 4
60 #define BND_TORUS 5
61 #define BND_WEDGE 6
62 
63 #define BND_F3 7
64 #define BND_F4 8
65 
66 #define BND_GRID 9
67 #define BND_PIPE 10
68 #define BND_SECTION 11
69 
70 #define BND_NBR 12
71 
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