Added line thickness to layer view

This commit is contained in:
Jack Ha 2016-12-28 11:30:59 +01:00
parent c12e6da3ac
commit 9904dad07b
5 changed files with 24 additions and 15 deletions

View file

@ -49,12 +49,13 @@ class Layer:
return result
def build(self, vertex_offset, index_offset, vertices, colors, indices):
def build(self, vertex_offset, index_offset, vertices, colors, line_dimensions, indices):
result_vertex_offset = vertex_offset
result_index_offset = index_offset
self._element_count = 0
thickness = self._thickness / 1000 # micrometer to millimeter
for polygon in self._polygons:
polygon.build(result_vertex_offset, result_index_offset, vertices, colors, indices)
polygon.build(result_vertex_offset, result_index_offset, vertices, colors, line_dimensions, indices, thickness)
#polygon_normals = polygon.getNormals() # [numpy.where(numpy.logical_not(polygon.jumpMask))]
#normals[result_vertex_offset:result_vertex_offset+polygon.lineMeshVertexCount()] = polygon_normals[:polygon.lineMeshVertexCount()]
result_vertex_offset += polygon.lineMeshVertexCount()