Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
IVT
src
Structs
ObjectDefinitions.h
Go to the documentation of this file.
1
// ****************************************************************************
2
// This file is part of the Integrating Vision Toolkit (IVT).
3
//
4
// The IVT is maintained by the Karlsruhe Institute of Technology (KIT)
5
// (www.kit.edu) in cooperation with the company Keyetech (www.keyetech.de).
6
//
7
// Copyright (C) 2014 Karlsruhe Institute of Technology (KIT).
8
// All rights reserved.
9
//
10
// Redistribution and use in source and binary forms, with or without
11
// modification, are permitted provided that the following conditions are met:
12
//
13
// 1. Redistributions of source code must retain the above copyright
14
// notice, this list of conditions and the following disclaimer.
15
//
16
// 2. Redistributions in binary form must reproduce the above copyright
17
// notice, this list of conditions and the following disclaimer in the
18
// documentation and/or other materials provided with the distribution.
19
//
20
// 3. Neither the name of the KIT nor the names of its contributors may be
21
// used to endorse or promote products derived from this software
22
// without specific prior written permission.
23
//
24
// THIS SOFTWARE IS PROVIDED BY THE KIT AND CONTRIBUTORS “AS IS” AND ANY
25
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
// DISCLAIMED. IN NO EVENT SHALL THE KIT OR CONTRIBUTORS BE LIABLE FOR ANY
28
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
// ****************************************************************************
35
// ****************************************************************************
36
// Filename: ObjectDefinitions.h
37
// Author: Pedram Azad
38
// Date: 2005
39
// ****************************************************************************
40
41
42
#ifndef _OBJECT_DEFINITIONS_H_
43
#define _OBJECT_DEFINITIONS_H_
44
45
46
// ****************************************************************************
47
// Necessary includes
48
// ****************************************************************************
49
50
#include "
DataStructures/DynamicArrayTemplate.h
"
51
#include "
Structs/Structs.h
"
52
#include "
Math/Math3d.h
"
53
54
#include <string>
55
56
57
58
// ****************************************************************************
59
// Enums
60
// ****************************************************************************
61
62
enum
ObjectColor
63
{
64
eNone
,
65
eBlue
,
66
eBlue2
,
67
eBlue3
,
68
eColored
,
69
eGreen
,
70
eGreen2
,
71
eGreen3
,
72
eOrange
,
73
eOrange2
,
74
eOrange3
,
75
eRed
,
76
eRed2
,
77
eRed3
,
78
eSkin
,
79
eWhite
,
80
eYellow
,
81
eYellow2
,
82
eYellow3
,
83
eNumberOfColors
84
};
85
86
enum
ObjectType
87
{
88
eCompactObject
,
89
eTexturedObject
,
90
eHead
,
91
eLeftHand
,
92
eRightHand
,
93
eUnknownObject
94
};
95
96
97
// ****************************************************************************
98
// Structs
99
// ****************************************************************************
100
101
struct
Object2DEntry
102
{
103
Object2DEntry
()
104
{
105
id
= -1;
106
type
=
eUnknownObject
;
107
color
=
eNone
;
108
data
= 0;
109
reserved
= 0;
110
}
111
112
Object2DEntry
(
const
Object2DEntry
&entry)
113
{
114
id
= entry.
id
;
115
region
= entry.
region
;
116
type
= entry.
type
;
117
color
= entry.
color
;
118
sName
=
""
;
119
sName
+= entry.
sName
;
120
data
= entry.
data
;
121
reserved
= entry.
reserved
;
122
}
123
124
int
id
;
// unique id
125
MyRegion
region
;
126
ObjectType
type
;
127
ObjectColor
color
;
128
std::string
sName
;
129
void
*
data
;
130
int
reserved
;
131
};
132
133
struct
Object3DEntry
134
{
135
Object3DEntry
()
136
{
137
region_id_left = -1;
138
region_id_right = -1;
139
type
=
eUnknownObject
;
140
color
=
eNone
;
141
data
= 0;
142
class_id = -1;
143
quality = 0.0f;
144
quality2 = 0.0f;
145
localizationValid =
false
;
146
147
Math3d::SetVec
(world_point,
Math3d::zero_vec
);
148
Math3d::SetVec
(orientation,
Math3d::zero_vec
);
149
Math3d::SetVec
(pose.translation,
Math3d::zero_vec
);
150
Math3d::SetMat
(pose.rotation,
Math3d::unit_mat
);
151
}
152
153
Object3DEntry
(
const
Object3DEntry
&entry)
154
{
155
region_left = entry.
region_left
;
156
region_right = entry.
region_right
;
157
region_id_left = entry.
region_id_left
;
158
region_id_right = entry.
region_id_right
;
159
type
= entry.
type
;
160
color
= entry.
color
;
161
Math3d::SetTransformation
(pose, entry.
pose
);
162
Math3d::SetVec
(world_point, entry.
world_point
);
163
Math3d::SetVec
(orientation, entry.
orientation
);
164
sName
=
""
;
165
sName
+= entry.
sName
;
166
sOivFilePath =
""
;
167
sOivFilePath += entry.
sOivFilePath
;
168
data
= entry.
data
;
169
class_id = entry.
class_id
;
170
quality = entry.
quality
;
171
quality2 = entry.
quality2
;
172
localizationValid = entry.
localizationValid
;
173
}
174
175
MyRegion
region_left,
region_right
;
176
int
region_id_left,
region_id_right
;
177
ObjectType
type
;
178
ObjectColor
color
;
179
Transformation3d
pose
;
180
Vec3d
world_point
;
181
Vec3d
orientation
;
182
std::string
sName
;
183
std::string
sOivFilePath
;
184
void
*
data
;
185
int
class_id
;
186
float
quality,
quality2
;
187
bool
localizationValid
;
188
};
189
190
// ****************************************************************************
191
// Typedefs
192
// ****************************************************************************
193
194
typedef
std::vector<Object2DEntry>
Object2DList
;
195
typedef
std::vector<Object3DEntry>
Object3DList
;
196
typedef
CDynamicArrayTemplate<Object2DEntry>
CObject2DArray
;
197
typedef
CDynamicArrayTemplate<Object3DEntry>
CObject3DArray
;
198
199
200
201
#endif
/* _OBJECT_DEFINITIONS_H_ */
Object3DEntry::orientation
Vec3d orientation
Definition:
ObjectDefinitions.h:181
Object3DEntry::class_id
int class_id
Definition:
ObjectDefinitions.h:185
DynamicArrayTemplate.h
Math3d::SetTransformation
void SetTransformation(Transformation3d &transformation, const Vec3d &rotation, const Vec3d &translation)
Definition:
Math3d.cpp:732
eOrange2
Definition:
ObjectDefinitions.h:73
CObject3DArray
CDynamicArrayTemplate< Object3DEntry > CObject3DArray
Definition:
ObjectDefinitions.h:197
eWhite
Definition:
ObjectDefinitions.h:79
eOrange3
Definition:
ObjectDefinitions.h:74
eGreen3
Definition:
ObjectDefinitions.h:71
eNone
Definition:
ObjectDefinitions.h:64
Object3DEntry::color
ObjectColor color
Definition:
ObjectDefinitions.h:178
eYellow2
Definition:
ObjectDefinitions.h:81
eSkin
Definition:
ObjectDefinitions.h:78
eBlue
Definition:
ObjectDefinitions.h:65
Object2DEntry::Object2DEntry
Object2DEntry(const Object2DEntry &entry)
Definition:
ObjectDefinitions.h:112
Object2DEntry
Definition:
ObjectDefinitions.h:101
Object2DEntry::id
int id
Definition:
ObjectDefinitions.h:124
Structs.h
Object3DEntry::world_point
Vec3d world_point
Definition:
ObjectDefinitions.h:180
Vec3d
Data structure for the representation of a 3D vector.
Definition:
Math3d.h:73
CDynamicArrayTemplate
Definition:
DynamicArrayTemplate.h:58
eGreen2
Definition:
ObjectDefinitions.h:70
Object2DEntry::color
ObjectColor color
Definition:
ObjectDefinitions.h:127
eRed2
Definition:
ObjectDefinitions.h:76
eYellow
Definition:
ObjectDefinitions.h:80
type
GLuint GLuint GLsizei GLenum type
Definition:
glext.h:3121
Object3DEntry::localizationValid
bool localizationValid
Definition:
ObjectDefinitions.h:187
Object3DEntry::quality
float quality
Definition:
ObjectDefinitions.h:186
Object3DEntry::pose
Transformation3d pose
Definition:
ObjectDefinitions.h:179
Object3DEntry::sName
std::string sName
Definition:
ObjectDefinitions.h:182
Object3DEntry::Object3DEntry
Object3DEntry()
Definition:
ObjectDefinitions.h:135
Object3DEntry
Definition:
ObjectDefinitions.h:133
Math3d::zero_vec
const Vec3d zero_vec
Definition:
Math3d.cpp:59
Math3d::SetVec
void SetVec(Vec3d &vec, float x, float y, float z)
Definition:
Math3d.cpp:243
eLeftHand
Definition:
ObjectDefinitions.h:91
data
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition:
glext.h:3129
string
GLsizei const GLchar ** string
Definition:
glext.h:3528
Object2DList
std::vector< Object2DEntry > Object2DList
Definition:
ObjectDefinitions.h:194
eRed3
Definition:
ObjectDefinitions.h:77
eRed
Definition:
ObjectDefinitions.h:75
Object2DEntry::reserved
int reserved
Definition:
ObjectDefinitions.h:130
Object2DEntry::Object2DEntry
Object2DEntry()
Definition:
ObjectDefinitions.h:103
Object3DEntry::region_right
MyRegion region_right
Definition:
ObjectDefinitions.h:175
Object3DEntry::Object3DEntry
Object3DEntry(const Object3DEntry &entry)
Definition:
ObjectDefinitions.h:153
Object3DEntry::data
void * data
Definition:
ObjectDefinitions.h:184
eBlue2
Definition:
ObjectDefinitions.h:66
Object3DEntry::type
ObjectType type
Definition:
ObjectDefinitions.h:177
eOrange
Definition:
ObjectDefinitions.h:72
eGreen
Definition:
ObjectDefinitions.h:69
Object3DEntry::region_left
MyRegion region_left
Definition:
ObjectDefinitions.h:175
eNumberOfColors
Definition:
ObjectDefinitions.h:83
Object2DEntry::data
void * data
Definition:
ObjectDefinitions.h:129
eColored
Definition:
ObjectDefinitions.h:68
eRightHand
Definition:
ObjectDefinitions.h:92
MyRegion
Definition:
Structs.h:255
Object3DEntry::quality2
float quality2
Definition:
ObjectDefinitions.h:186
Math3d::unit_mat
const Mat3d unit_mat
Definition:
Math3d.cpp:60
Object2DEntry::region
MyRegion region
Definition:
ObjectDefinitions.h:125
eYellow3
Definition:
ObjectDefinitions.h:82
CObject2DArray
CDynamicArrayTemplate< Object2DEntry > CObject2DArray
Definition:
ObjectDefinitions.h:196
Object3DEntry::region_id_right
int region_id_right
Definition:
ObjectDefinitions.h:176
Object3DEntry::sOivFilePath
std::string sOivFilePath
Definition:
ObjectDefinitions.h:183
eUnknownObject
Definition:
ObjectDefinitions.h:93
eHead
Definition:
ObjectDefinitions.h:90
Math3d::SetMat
void SetMat(Mat3d &matrix, float r1, float r2, float r3, float r4, float r5, float r6, float r7, float r8, float r9)
Definition:
Math3d.cpp:257
ObjectType
ObjectType
Definition:
ObjectDefinitions.h:86
Math3d.h
eCompactObject
Definition:
ObjectDefinitions.h:88
Object2DEntry::type
ObjectType type
Definition:
ObjectDefinitions.h:126
eTexturedObject
Definition:
ObjectDefinitions.h:89
Object3DEntry::region_id_left
int region_id_left
Definition:
ObjectDefinitions.h:176
Object3DList
std::vector< Object3DEntry > Object3DList
Definition:
ObjectDefinitions.h:195
Transformation3d
Data structure for the representation of a 3D rigid body transformation.
Definition:
Math3d.h:105
ObjectColor
ObjectColor
Definition:
ObjectDefinitions.h:62
eBlue3
Definition:
ObjectDefinitions.h:67
Object2DEntry::sName
std::string sName
Definition:
ObjectDefinitions.h:128
asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Dec 2 2019 03:47:28