Improved tri to quad converting.

added include to poseobject.c
This commit is contained in:
Campbell Barton 2006-08-29 09:43:38 +00:00
parent 0648d0d13a
commit 24a2e90f82
2 changed files with 7 additions and 5 deletions

@ -110,10 +110,11 @@ def isfaceCoLin(imagQuag):
# Work out how different from 90 each edge is. # Work out how different from 90 each edge is.
diff = 0 diff = 0
try: try:
diff = abs(vecAngle(edgeVec1, edgeVec2) - 90) diff = (\
diff = max(diff, abs(vecAngle(edgeVec2, edgeVec3) - 90)) abs(vecAngle(edgeVec1, edgeVec2) - 90)+\
diff = max(diff, abs(vecAngle(edgeVec3, edgeVec4) - 90)) abs(vecAngle(edgeVec2, edgeVec3) - 90)+\
diff = max(diff, abs(vecAngle(edgeVec4, edgeVec1) - 90)) abs(vecAngle(edgeVec3, edgeVec4) - 90)+\
abs(vecAngle(edgeVec4, edgeVec1) - 90)) / 360
except: except:
return 1.0 return 1.0
@ -121,7 +122,7 @@ def isfaceCoLin(imagQuag):
if not diff: if not diff:
return 0.0 return 0.0
return min(diff/90, 1.0) return diff
# Meause the areas of the 2 possible ways of subdividing the imagined quad. # Meause the areas of the 2 possible ways of subdividing the imagined quad.

@ -47,6 +47,7 @@
#include "BKE_action.h" #include "BKE_action.h"
#include "BKE_armature.h" #include "BKE_armature.h"
#include "BKE_blender.h"
#include "BKE_constraint.h" #include "BKE_constraint.h"
#include "BKE_deform.h" #include "BKE_deform.h"
#include "BKE_depsgraph.h" #include "BKE_depsgraph.h"