Copies the contents of one face to another. Sets the portal num in the new face to -1. Parameters: dfp - pointer to the destination face. This face should be uninitialized. sfp - pointer to the source face
| 1171 | // Parameters: dfp - pointer to the destination face. This face should be uninitialized. |
| 1172 | // sfp - pointer to the source face |
| 1173 | void CopyFace(face *dfp, face *sfp) { |
| 1174 | InitRoomFace(dfp, sfp->num_verts); |
| 1175 | |
| 1176 | dfp->flags = sfp->flags; |
| 1177 | dfp->portal_num = -1; |
| 1178 | dfp->normal = sfp->normal; |
| 1179 | dfp->tmap = sfp->tmap; |
| 1180 | dfp->light_multiple = sfp->light_multiple; |
| 1181 | |
| 1182 | // Clear the flags that we don't want transferred over |
| 1183 | dfp->flags &= ~FF_LIGHTMAP; |
| 1184 | dfp->flags &= ~FF_HAS_TRIGGER; |
| 1185 | |
| 1186 | // Copy vertices and uvls |
| 1187 | for (int i = 0; i < sfp->num_verts; i++) { |
| 1188 | dfp->face_verts[i] = sfp->face_verts[i]; |
| 1189 | dfp->face_uvls[i] = sfp->face_uvls[i]; |
| 1190 | } |
| 1191 | } |
| 1192 | |
| 1193 | // Checks to see if a face is planar. |
| 1194 | // See if all the points are within a certain distance of an average point |
no test coverage detected