Posticipate depth sorting after BackFace culling so we have less faces to
process
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
self._doConvertGeometricObjToMesh(workScene)
self._doConvertGeometricObjToMesh(workScene)
- self._doSceneClipping(workScene)
+ #self._doSceneClipping(workScene)
if config.output['JOIN_OBJECTS']:
self._joinMeshObjectsInScene(workScene)
if config.output['JOIN_OBJECTS']:
self._joinMeshObjectsInScene(workScene)
Objects = workScene.getChildren()
for obj in Objects:
Objects = workScene.getChildren()
for obj in Objects:
if obj.getType() != 'Mesh':
print "Only Mesh supported! - Skipping type:", obj.getType()
if obj.getType() != 'Mesh':
print "Only Mesh supported! - Skipping type:", obj.getType()
self._doModelToWorldCoordinates(mesh, obj.matrix)
self._doModelToWorldCoordinates(mesh, obj.matrix)
- self._doObjectDepthSorting(mesh)
-
self._doBackFaceCulling(mesh)
self._doBackFaceCulling(mesh)
+ self._doObjectDepthSorting(mesh)
+
self._doColorAndLighting(mesh)
self._doEdgesStyle(mesh, edgeStyles[config.edges['STYLE']])
self._doColorAndLighting(mesh)
self._doEdgesStyle(mesh, edgeStyles[config.edges['STYLE']])
nmesh.faces.sort(by_max_vert_dist)
nmesh.faces.reverse()
nmesh.faces.sort(by_max_vert_dist)
nmesh.faces.reverse()
+ # Get visible faces
+ #vf = nmesh.faces
+ #while len(vf)>1:
+ # p1 = vf[0]
+ # insideList =
+
+
mesh.faces.delete(1, range(0, len(mesh.faces)))
for i,f in enumerate(nmesh.faces):
fv = [v.index for v in f.v]
mesh.faces.extend(fv)
mesh.faces[i].mat = f.mat
mesh.faces.delete(1, range(0, len(mesh.faces)))
for i,f in enumerate(nmesh.faces):
fv = [v.index for v in f.v]
mesh.faces.extend(fv)
mesh.faces[i].mat = f.mat
+ mesh.faces[i].sel = f.sel
def _doBackFaceCulling(self, mesh):
def _doBackFaceCulling(self, mesh):