(face)
| 115 | |
| 116 | # Returns the rough aspect ratio of a face. Always >= 1. |
| 117 | def get_aspect_ratio(face): |
| 118 | if not face.is_valid: |
| 119 | return 1.0 |
| 120 | face_aspect_ratio = max(0.01, face.edges[0].calc_length() / face.edges[1].calc_length()) |
| 121 | if face_aspect_ratio < 1.0: |
| 122 | face_aspect_ratio = 1.0 / face_aspect_ratio |
| 123 | return face_aspect_ratio |
| 124 | |
| 125 | # Returns true if this face is pointing behind the ship |
| 126 | def is_rear_face(face): |
no outgoing calls
no test coverage detected