Visual Servoing Platform
version 3.0.1
Main Page
Related Pages
Modules
Namespaces
Classes
Examples
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
vpView.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 module "view.h" contient les Macros et les types
32
* des parametres de visualisation et de transformation 3D.
33
*
34
* Authors:
35
* Jean-Luc CORRE
36
*
37
*****************************************************************************/
38
39
#ifndef vpView_H
40
#define vpView_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
49
/*
50
* Macros de numerotation des 6 plans de decoupage :
51
* - Les 6 plans de clipping definissent le volume canonique
52
* de la pyramide de vision dans lequel la scene est visible.
53
* - les 6 plans ont pour equations :
54
* Plan dessus : W = Y
55
* Plan dessous : -W = Y
56
* Plan droit : W = X
57
* Plan gauche : -W = X
58
* Plan arriere : W = Z
59
* Plan avant : W = 0
60
*/
61
#define PLANE_ABOVE 0
62
#define PLANE_BELOW 1
63
#define PLANE_RIGHT 2
64
#define PLANE_LEFT 3
65
#define PLANE_BACK 4
66
#define PLANE_FRONT 5
67
#define PLANE_NBR 6
68
69
/*
70
* Macros de positionnement des points 4D :
71
* Le positionnement d'un point 4D dans l'espace de l'observateur virtuel
72
* se fait par rapport aux 6 plans de decoupage.
73
* A chaque point 4D on associe 6 bits, un par plan de decoupage.
74
*/
75
#define IS_INSIDE 0x00
76
#define IS_ABOVE 0x01
77
#define IS_BELOW 0x02
78
#define IS_RIGHT 0x04
79
#define IS_LEFT 0x08
80
#define IS_BACK 0x10
81
#define IS_FRONT 0x20
82
83
#define vpDEFAULT_REMOVE IS_INSIDE
84
85
#define PARALLEL 0
86
#define PERSPECTIVE 1
87
88
#define vpDEFAULT_EYE { 0.0, 0.0, 1.0 }
89
#define vpDEFAULT_TARGET { 0.0, 0.0, 0.0 }
90
#define vpDEFAULT_FOCAL 1.0
91
#define vpDEFAULT_ANGLE 45.0
92
#define vpDEFAULT_TWIST 0.0
93
#define vpDEFAULT_SPEED 0.0
94
#define vpDEFAULT_CAMERA { vpDEFAULT_EYE, vpDEFAULT_TARGET,\
95
vpDEFAULT_FOCAL,vpDEFAULT_ANGLE, vpDEFAULT_TWIST,\
96
vpDEFAULT_SPEED }
97
98
#define vpDEFAULT_COP { 0.0, 0.0, 1.0 }
99
#define vpDEFAULT_VRP { 0.0, 0.0, 0.0 }
100
#define vpDEFAULT_VPN { 0.0, 0.0,-1.0 }
101
#define vpDEFAULT_VUP { 0.0, 1.0, 0.0 }
102
#define vpDEFAULT_VWD {-1.0, 1.0,-1.0, 1.0 }
103
#define vpDEFAULT_DEPTH { 0.0, 1.0 }
104
#define vpDEFAULT_TYPE PERSPECTIVE
105
106
#define vpDEFAULT_VIEW { vpDEFAULT_TYPE,\
107
vpDEFAULT_COP, vpDEFAULT_VRP,\
108
vpDEFAULT_VPN, vpDEFAULT_VUP,\
109
vpDEFAULT_VWD, vpDEFAULT_DEPTH }
110
111
#define vpDEFAULT_WC { 1.0, 0.0, 0.0, 0.0,\
112
0.0, 1.0, 0.0, 0.0,\
113
0.0, 0.0, 1.0, 0.0,\
114
0.0, 0.0, 0.0, 1.0 }
115
116
117
/*
118
* CAMERA PARAMETERS
119
* _________________
120
*
121
* La structure "Camera_parameters" definit les parametres de la camera.
122
* eye Position de l'oeil ou de la camera.
123
* target Position de la cible ou du point visee dans la scene.
124
* focal Distance eye-target
125
* angle Angle d'ouverture en degres.
126
* twist Angle de rotation sur l'axe de visee (eye,target) en degres.
127
* speed Vitesse sur l'axe de visee (eye,target).
128
*/
129
typedef
struct
{
130
Point3f eye;
/* position de l'observateur */
131
Point3f target;
/* point vise */
132
float
focal;
/* focale de la camera */
133
float
angle;
/* angle d'ouverture */
134
float
twist;
/* rotation sur l'axe de visee */
135
float
speed;
/* vitesse sur l'axe de visee */
136
} Camera_parameters;
137
138
typedef
struct
{
139
float
umin,umax;
/* bords gauche et droit */
140
float
vmin,vmax;
/* bords inferieur et superieur */
141
} View_window;
142
143
typedef
struct
{
144
float
front;
/* plan avant ("hither") */
145
float
back;
/* plan arriere ("yon") */
146
} View_depth;
147
148
typedef
struct
{
149
Type type;
/* type de la projection */
150
Point3f cop;
/* centre de projection */
151
Point3f vrp;
/* point de reference de visee */
152
Vector vpn;
/* vecteur nomal au plan */
153
Vector vup;
/* vecteur indiquant le "haut" */
154
View_window vwd;
/* fenetre de projection */
155
View_depth depth;
/* profondeurs de decoupages */
156
} View_parameters;
157
158
#endif
159
#endif
160
local
soft
ViSP
ViSP-web-script
visp
modules
robot
src
wireframe-simulator
vpView.h
Generated by
1.8.6