| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010, Google Inc. | 2 * Copyright 2010, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 // Determines whether the 2D point defined by (px, py) is inside the | 90 // Determines whether the 2D point defined by (px, py) is inside the |
| 91 // 2D triangle defined by vertices (ax, ay), (bx, by), and (cx, cy). | 91 // 2D triangle defined by vertices (ax, ay), (bx, by), and (cx, cy). |
| 92 // This test defines that points exactly on an edge are not considered | 92 // This test defines that points exactly on an edge are not considered |
| 93 // to be inside the triangle. | 93 // to be inside the triangle. |
| 94 bool PointInTriangle(float px, float py, | 94 bool PointInTriangle(float px, float py, |
| 95 float ax, float ay, | 95 float ax, float ay, |
| 96 float bx, float by, | 96 float bx, float by, |
| 97 float cx, float cy); | 97 float cx, float cy); |
| 98 | 98 |
| 99 // Determines whether the triangles defined by the points (a1, b1, c1) |
| 100 // and (a2, b2, c2) overlap. The definition of this function is that |
| 101 // if the two triangles only share an adjacent edge or vertex, they |
| 102 // are not considered to overlap. |
| 103 bool TrianglesOverlap(float a1x, float a1y, |
| 104 float b1x, float b1y, |
| 105 float c1x, float c1y, |
| 106 float a2x, float a2y, |
| 107 float b2x, float b2y, |
| 108 float c2x, float c2y); |
| 109 |
| 99 } // namespace cubic | 110 } // namespace cubic |
| 100 } // namespace gpu2d | 111 } // namespace gpu2d |
| 101 } // namespace o3d | 112 } // namespace o3d |
| 102 | 113 |
| 103 #endif // O3D_CORE_CROSS_GPU2D_CUBIC_MATH_UTILS_H_ | 114 #endif // O3D_CORE_CROSS_GPU2D_CUBIC_MATH_UTILS_H_ |
| 104 | 115 |
| OLD | NEW |