Skip to content
GitLab
Menu
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
cda08333
Commit
cda08333
authored
Dec 13, 2015
by
Christopher Tenter
Browse files
assign edge colors to the correct provoking vertex
parent
14197aad
Pipeline
#339
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ObjectTypes/PolyLine/PolyLineNodeT.cc
View file @
cda08333
...
...
@@ -712,7 +712,16 @@ writeVertexColor(unsigned int _vertex, bool _colorSourceVertex, void* _dst) cons
unsigned
int
byteOffset
=
declToUse
->
findElementByUsage
(
VERTEX_USAGE_COLOR
)
->
getByteOffset
();
unsigned
char
*
ucdata
=
((
unsigned
char
*
)
_dst
)
+
byteOffset
;
Point
col
=
_colorSourceVertex
?
polyline_
.
vertex_color
(
_vertex
)
:
polyline_
.
edge_color
(
_vertex
%
polyline_
.
n_edges
());
Point
col
;
if
(
_colorSourceVertex
)
col
=
polyline_
.
vertex_color
(
_vertex
);
// per vertex
else
{
// edge colors
// use the 2nd vertex of each edge as the provoking vertex
int
edgeID
=
(
_vertex
+
polyline_
.
n_edges
()
-
1
)
%
polyline_
.
n_edges
();
col
=
polyline_
.
edge_color
(
edgeID
);
}
// rgb
for
(
int
i
=
0
;
i
<
3
;
++
i
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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