! calculates the type of the patch */
| 130 | |
| 131 | /*! calculates the type of the patch */ |
| 132 | __forceinline PatchType patchType() const |
| 133 | { |
| 134 | const HalfEdge* p = this; |
| 135 | PatchType ret = REGULAR_QUAD_PATCH; |
| 136 | bool bilinear = true; |
| 137 | |
| 138 | ret = max(ret,p->vertexType()); |
| 139 | bilinear &= p->bilinearVertex(); |
| 140 | if ((p = p->next()) == this) return COMPLEX_PATCH; |
| 141 | |
| 142 | ret = max(ret,p->vertexType()); |
| 143 | bilinear &= p->bilinearVertex(); |
| 144 | if ((p = p->next()) == this) return COMPLEX_PATCH; |
| 145 | |
| 146 | ret = max(ret,p->vertexType()); |
| 147 | bilinear &= p->bilinearVertex(); |
| 148 | if ((p = p->next()) == this) return COMPLEX_PATCH; |
| 149 | |
| 150 | ret = max(ret,p->vertexType()); |
| 151 | bilinear &= p->bilinearVertex(); |
| 152 | if ((p = p->next()) != this) return COMPLEX_PATCH; |
| 153 | |
| 154 | if (bilinear) return BILINEAR_PATCH; |
| 155 | return ret; |
| 156 | } |
| 157 | |
| 158 | /*! tests if the face is a regular b-spline face */ |
| 159 | __forceinline bool isRegularFace() const { |