Skip to content

Commit

Permalink
arrows are drawn now if normalization is off #144
Browse files Browse the repository at this point in the history
  • Loading branch information
LemurPwned committed Jun 21, 2018
1 parent e0e051f commit 059bd3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ColorPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@ def standard_procedure(outline, color, iterations, averaging, xc, yc, zc,
if not decimate:
assert dotted_color.shape == (iterations, zc*yc*xc, 3)
assert outline.shape == (zc*yc*xc, 4)
return dotted_color, outline, decimate
return dotted_color, outline, decimate, np.array(color)
2 changes: 1 addition & 1 deletion Widgets/openGL_widgets/AbstractGLContext.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def prerendering_calculation(self):
yc = int(self.file_header['ynodes'])
zc = int(self.file_header['znodes'])
# change drawing function
self.color_vectors, self.vectors_list, decimate = \
self.color_vectors, self.vectors_list, decimate, self.colorX = \
ColorPolicy.standard_procedure(self.vectors_list,
self.color_vectors,
self.iterations,
Expand Down
5 changes: 3 additions & 2 deletions Widgets/openGL_widgets/ArrowGLContext.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ def __init__(self, data_dict, parent):

def prerendering_calculation(self):
super().prerendering_calculation()
ArrowGLContext.normalize_specification(self.colorX, vbo=True)
if self.normalize:
ArrowGLContext.normalize_specification(self.color_vectors, vbo=True)
self.structure_vbo = self.regenerate_structure(self.color_vectors)
ArrowGLContext.normalize_specification(self.color_vectors, vbo=True)
self.structure_vbo = self.regenerate_structure(self.colorX)
self.index_required = self.SIDES*2
self.indices = self.generate_index()
self.color_vectors = ColorPolicy.apply_vbo_format(self.color_vectors,
Expand Down

0 comments on commit 059bd3b

Please sign in to comment.