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
Plugin-PropertyVis
Commits
8e4c1b62
Commit
8e4c1b62
authored
Aug 07, 2018
by
Martin Heistermann
Browse files
Feature: Allow setting line width for vector vis.
parent
c778c304
Changes
6
Hide whitespace changes
Inline
Side-by-side
OpenMesh/OMPropertyVisualizerVector2T.cc
View file @
8e4c1b62
...
...
@@ -71,6 +71,8 @@ OMPropertyVisualizerVector2<MeshT, VectorType>::OMPropertyVisualizerVector2(Mesh
{
w
->
vectors_edges_rb
->
hide
();
}
this
->
connect
(
w
->
lineWidth
,
QOverload
<
double
>::
of
(
&
QDoubleSpinBox
::
valueChanged
),
[
this
](
double
value
)
{
lineNode
->
set_line_width
(
value
);});
}
template
<
typename
MeshT
,
typename
VectorType
>
...
...
OpenMesh/OMPropertyVisualizerVectorT.cc
View file @
8e4c1b62
...
...
@@ -70,7 +70,8 @@ OMPropertyVisualizerVector<MeshT>::OMPropertyVisualizerVector(MeshT* _mesh, int
{
w
->
vectors_edges_rb
->
hide
();
}
this
->
connect
(
w
->
lineWidth
,
QOverload
<
double
>::
of
(
&
QDoubleSpinBox
::
valueChanged
),
[
this
](
double
value
)
{
lineNode
->
set_line_width
(
value
);});
}
template
<
typename
MeshT
>
...
...
OpenVolumeMesh/OVMPropertyVisualizerVectorT.cc
View file @
8e4c1b62
...
...
@@ -66,8 +66,9 @@ OVMPropertyVisualizerVector<MeshT>::OVMPropertyVisualizerVector(MeshT* _mesh, in
BaseObjectData
*
bod
;
PluginFunctions
::
getObject
(
objectID
,
bod
);
lineNode
=
new
ACG
::
SceneGraph
::
LineNode
(
ACG
::
SceneGraph
::
LineNode
::
LineSegmentsMode
,
bod
->
baseNode
());
w
->
vectors_edges_rb
->
hide
();
this
->
connect
(
w
->
lineWidth
,
QOverload
<
double
>::
of
(
&
QDoubleSpinBox
::
valueChanged
),
[
this
](
double
value
)
{
lineNode
->
set_line_width
(
value
);});
}
template
<
typename
MeshT
>
...
...
ScriptObjects/ScriptSettingsVector.cc
View file @
8e4c1b62
...
...
@@ -94,7 +94,17 @@ Vector4 ScriptSettingsVector::lineColor() const
return
ACG
::
to_Vec4d
(
widget_
->
lineColor
->
color
());
}
void
ScriptSettingsVector
::
setLineColor
(
Vector4
lineColor
)
void
ScriptSettingsVector
::
setLineColor
(
const
Vector4
&
lineColor
)
{
widget_
->
lineColor
->
setColor
(
ACG
::
to_QColor
(
lineColor
));
}
double
ScriptSettingsVector
::
lineWidth
()
{
return
widget_
->
lineWidth
->
value
();
}
void
ScriptSettingsVector
::
setLineWidth
(
double
width
)
{
widget_
->
lineWidth
->
setValue
(
width
);
}
ScriptObjects/ScriptSettingsVector.hh
View file @
8e4c1b62
...
...
@@ -17,6 +17,7 @@ class ScriptSettingsVector : public ScriptSettings
Q_PROPERTY
(
bool
doScale
READ
doScale
WRITE
setDoScale
)
Q_PROPERTY
(
double
scaleFactor
READ
scaleFactor
WRITE
setScaleFactor
)
Q_PROPERTY
(
Vector4
lineColor
READ
lineColor
WRITE
setLineColor
)
Q_PROPERTY
(
double
lineWidth
READ
lineWidth
WRITE
setLineWidth
)
public:
enum
class
Type
{
Strokes
,
Rgb
,
Edges
,
LengthColor
};
...
...
@@ -32,13 +33,15 @@ public:
bool
doScale
()
const
;
double
scaleFactor
()
const
;
Vector4
lineColor
()
const
;
double
lineWidth
();
public
slots
:
void
setType
(
Type
type
);
void
setNormalize
(
bool
normalize
);
void
setDoScale
(
bool
doScale
);
void
setScaleFactor
(
double
scaleFactor
);
void
setLineColor
(
Vector4
lineColor
);
void
setLineColor
(
const
Vector4
&
lineColor
);
void
setLineWidth
(
double
width
);
private:
VectorWidget
*
widget_
;
...
...
Widgets/VectorWidget.ui
View file @
8e4c1b62
...
...
@@ -184,18 +184,8 @@
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QCheckBox"
name=
"scale"
>
<property
name=
"text"
>
<string>
Scale with factor
</string>
</property>
<property
name=
"checked"
>
<bool>
false
</bool>
</property>
</widget>
</item>
<item>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"scaleBox"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
...
...
@@ -211,6 +201,36 @@
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"lineWidth"
>
<property
name=
"minimum"
>
<double>
0.100000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
50.000000000000000
</double>
</property>
<property
name=
"value"
>
<double>
1.000000000000000
</double>
</property>
</widget>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"scale"
>
<property
name=
"text"
>
<string>
Scale with factor
</string>
</property>
<property
name=
"checked"
>
<bool>
false
</bool>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"lineWidthLabel"
>
<property
name=
"text"
>
<string>
Line width
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
...
...
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