// ----------------------------------------------------------- static int DoTexRotateLeft(int value) { const auto uvcenter = compute_uv_side_center(Cursegp, Curside); // Create a rotation matrix const auto rotmat = create_2d_rotation_matrix(-F1_0/value); rotate_uv_points_on_side(Cursegp, Curside, rotmat, uvcenter); Update_flags |= UF_WORLD_CHANGED; return 1; }
// ----------------------------------------------------------- int TexRotate90Degrees() { const auto uvcenter = compute_uv_side_center(Cursegp, Curside); // Create a rotation matrix const auto rotmat = create_2d_rotation_matrix(F1_0/4); rotate_uv_points_on_side(Cursegp, Curside, rotmat, uvcenter); Update_flags |= UF_WORLD_CHANGED; return 1; }
// ----------------------------------------------------------- int TexRotate90Degrees() { uvl uvcenter; fix rotmat[4]; compute_uv_side_center(&uvcenter, Cursegp, Curside); // Create a rotation matrix create_2d_rotation_matrix(rotmat, F1_0/4); rotate_uv_points_on_side(Cursegp, Curside, rotmat, &uvcenter); Update_flags |= UF_WORLD_CHANGED; return 1; }
// ----------------------------------------------------------- int DoTexRotateLeft(int value) { uvl uvcenter; fix rotmat[4]; compute_uv_side_center(&uvcenter, Cursegp, Curside); // Create a rotation matrix create_2d_rotation_matrix(rotmat, -F1_0/value); rotate_uv_points_on_side(Cursegp, Curside, rotmat, &uvcenter); Update_flags |= UF_WORLD_CHANGED; return 1; }
// ----------------------------------------------------------- int TexFlipY() { const auto uvcenter = compute_uv_side_center(Cursegp, Curside); array<fix, 4> rotmat; // Create a rotation matrix rotmat[0] = 0xffff; rotmat[1] = 0; rotmat[2] = 0; rotmat[3] = -0xffff; rotate_uv_points_on_side(Cursegp, Curside, rotmat, uvcenter); Update_flags |= UF_WORLD_CHANGED; return 1; }
// ----------------------------------------------------------- int TexFlipY() { uvl uvcenter; fix rotmat[4]; compute_uv_side_center(&uvcenter, Cursegp, Curside); // Create a rotation matrix rotmat[0] = 0xffff; rotmat[1] = 0; rotmat[2] = 0; rotmat[3] = -0xffff; rotate_uv_points_on_side(Cursegp, Curside, rotmat, &uvcenter); Update_flags |= UF_WORLD_CHANGED; return 1; }