Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper-Free
Commits
46229f39
Commit
46229f39
authored
Jan 09, 2016
by
Jan Möbius
Browse files
Merge branch 'propviz' into 'master'
Propviz Enable viz of uint8_t. See merge request
!57
parents
8cbfefd0
94f89c61
Pipeline
#701
passed with stage
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Plugin-PropertyVis/OpenMesh/OMPropertyModel.hh
View file @
46229f39
...
...
@@ -168,6 +168,7 @@ public:
static
const
TypeInfoWrapper
proptype_bool
;
static
const
TypeInfoWrapper
proptype_int
;
static
const
TypeInfoWrapper
proptype_uint
;
static
const
TypeInfoWrapper
proptype_uint8_t
;
static
const
TypeInfoWrapper
proptype_double
;
static
const
TypeInfoWrapper
proptype_Vec3d
;
static
const
TypeInfoWrapper
proptype_Vec3f
;
...
...
@@ -205,6 +206,8 @@ template <typename T> const TypeInfoWrapper OMPropertyModel<T>::proptype_int
=
TypeInfoWrapper
(
typeid
(
OpenMesh
::
PropertyT
<
int
>
),
"int"
);
template
<
typename
T
>
const
TypeInfoWrapper
OMPropertyModel
<
T
>::
proptype_uint
=
TypeInfoWrapper
(
typeid
(
OpenMesh
::
PropertyT
<
unsigned
int
>
),
"unsigned int"
);
template
<
typename
T
>
const
TypeInfoWrapper
OMPropertyModel
<
T
>::
proptype_uint8_t
=
TypeInfoWrapper
(
typeid
(
OpenMesh
::
PropertyT
<
uint8_t
>
),
"uint8_t"
);
template
<
typename
T
>
const
TypeInfoWrapper
OMPropertyModel
<
T
>::
proptype_double
=
TypeInfoWrapper
(
typeid
(
OpenMesh
::
PropertyT
<
double
>
),
"double"
);
template
<
typename
T
>
const
TypeInfoWrapper
OMPropertyModel
<
T
>::
proptype_Vec3d
...
...
Plugin-PropertyVis/OpenMesh/OMPropertyModelT.cc
View file @
46229f39
...
...
@@ -547,6 +547,8 @@ void OMPropertyModel<MeshT>::addPropertyVisualizer(OpenMesh::BaseProperty* const
propertyVisualizers
.
push_back
(
new
OMPropertyVisualizerInteger
<
MeshT
,
int
>
(
mesh
,
propInfo
,
false
));
else
if
(
propInfo
.
typeinfo
()
==
proptype_uint
)
propertyVisualizers
.
push_back
(
new
OMPropertyVisualizerInteger
<
MeshT
,
unsigned
int
>
(
mesh
,
propInfo
,
true
));
else
if
(
propInfo
.
typeinfo
()
==
proptype_uint8_t
)
propertyVisualizers
.
push_back
(
new
OMPropertyVisualizerInteger
<
MeshT
,
uint8_t
>
(
mesh
,
propInfo
,
true
));
else
if
(
propInfo
.
typeinfo
()
==
proptype_double
)
propertyVisualizers
.
push_back
(
new
OMPropertyVisualizerDouble
<
MeshT
>
(
mesh
,
propInfo
));
else
if
((
propInfo
.
typeinfo
()
==
proptype_Vec3d
)
||
(
propInfo
.
typeinfo
()
==
proptype_Vec3f
))
...
...
@@ -608,6 +610,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType
OpenMesh
::
VPropHandleT
<
unsigned
int
>
prop
;
mesh
->
add_property
(
prop
,
pname
.
toStdString
());
}
else
if
(
dtype
==
tr
(
"uint8_t"
)
)
{
OpenMesh
::
VPropHandleT
<
uint8_t
>
prop
;
mesh
->
add_property
(
prop
,
pname
.
toStdString
());
}
else
if
(
dtype
==
tr
(
"int"
)
)
{
OpenMesh
::
VPropHandleT
<
int
>
prop
;
...
...
@@ -655,6 +662,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType
OpenMesh
::
EPropHandleT
<
unsigned
int
>
prop
;
mesh
->
add_property
(
prop
,
pname
.
toStdString
());
}
else
if
(
dtype
==
tr
(
"uint8_t"
)
)
{
OpenMesh
::
EPropHandleT
<
uint8_t
>
prop
;
mesh
->
add_property
(
prop
,
pname
.
toStdString
());
}
else
if
(
dtype
==
tr
(
"int"
)
)
{
OpenMesh
::
EPropHandleT
<
int
>
prop
;
...
...
@@ -693,6 +705,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType
OpenMesh
::
FPropHandleT
<
unsigned
int
>
prop
;
mesh
->
add_property
(
prop
,
pname
.
toStdString
());
}
else
if
(
dtype
==
tr
(
"uint8_t"
)
)
{
OpenMesh
::
FPropHandleT
<
uint8_t
>
prop
;
mesh
->
add_property
(
prop
,
pname
.
toStdString
());
}
else
if
(
dtype
==
tr
(
"int"
)
)
{
OpenMesh
::
FPropHandleT
<
int
>
prop
;
...
...
@@ -721,6 +738,11 @@ void OMPropertyModel<MeshT>:: addProperty(QString propName, QString friendlyType
OpenMesh
::
HPropHandleT
<
unsigned
int
>
prop
;
mesh
->
add_property
(
prop
,
pname
.
toStdString
());
}
else
if
(
dtype
==
tr
(
"uint8_t"
)
)
{
OpenMesh
::
HPropHandleT
<
uint8_t
>
prop
;
mesh
->
add_property
(
prop
,
pname
.
toStdString
());
}
else
if
(
dtype
==
tr
(
"int"
)
)
{
OpenMesh
::
HPropHandleT
<
int
>
prop
;
...
...
@@ -744,6 +766,7 @@ void OMPropertyModel<MeshT>::initializeSupportedPropertyTypes()
supportedPropertyTypes
.
insert
(
proptype_bool
);
supportedPropertyTypes
.
insert
(
proptype_int
);
supportedPropertyTypes
.
insert
(
proptype_uint
);
supportedPropertyTypes
.
insert
(
proptype_uint8_t
);
supportedPropertyTypes
.
insert
(
proptype_double
);
supportedPropertyTypes
.
insert
(
proptype_Vec3d
);
supportedPropertyTypes
.
insert
(
proptype_Vec3f
);
...
...
Plugin-PropertyVis/OpenMesh/OMPropertyVisualizerIntegerT.cc
View file @
46229f39
...
...
@@ -70,7 +70,7 @@ OMPropertyVisualizerInteger<MeshT, T>::OMPropertyVisualizerInteger(MeshT* _mesh,
template
<
typename
MeshT
,
typename
T
>
QString
OMPropertyVisualizerInteger
<
MeshT
,
T
>::
getPropertyText
(
unsigned
int
index
)
{
return
OMPropertyVisualizer
<
MeshT
>::
template
getPropertyText_
<
int
>(
index
);
return
OMPropertyVisualizer
<
MeshT
>::
template
getPropertyText_
<
T
>(
index
);
}
template
<
typename
MeshT
,
typename
T
>
...
...
Plugin-PropertyVis/PropertyVisualizer.hh
View file @
46229f39
...
...
@@ -160,6 +160,7 @@ public:
static
inline
QString
toStr
(
bool
b
)
{
return
b
?
QObject
::
tr
(
"True"
)
:
QObject
::
tr
(
"False"
);
}
static
inline
QString
toStr
(
double
d
)
{
return
QObject
::
tr
(
"%1"
).
arg
(
d
);
}
static
inline
QString
toStr
(
int
i
)
{
return
QObject
::
tr
(
"%1"
).
arg
(
i
);
}
static
inline
QString
toStr
(
uint8_t
i
)
{
return
QObject
::
tr
(
"%1"
).
arg
(
i
);
}
static
inline
QString
toStr
(
unsigned
int
i
)
{
return
QObject
::
tr
(
"%1"
).
arg
(
i
);
}
static
QString
toStr
(
OpenMesh
::
Vec3d
v
);
static
QString
toStr
(
OpenMesh
::
Vec2d
v
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment