| 239 | |
| 240 | template<typename Allocator> |
| 241 | __noinline static Ref create(const Allocator& alloc, const HalfEdge* edge, const char* vertices, size_t stride) |
| 242 | { |
| 243 | if (PATCH_MAX_CACHE_DEPTH == 0) |
| 244 | return nullptr; |
| 245 | |
| 246 | Ref child(0); |
| 247 | switch (edge->patch_type) { |
| 248 | case HalfEdge::BILINEAR_PATCH: child = BilinearPatch::create(alloc,edge,vertices,stride); break; |
| 249 | case HalfEdge::REGULAR_QUAD_PATCH: child = RegularPatch::create(alloc,edge,vertices,stride); break; |
| 250 | #if PATCH_USE_GREGORY == 2 |
| 251 | case HalfEdge::IRREGULAR_QUAD_PATCH: child = GregoryPatch::create(alloc,edge,vertices,stride); break; |
| 252 | #endif |
| 253 | default: { |
| 254 | GeneralCatmullClarkPatch patch(edge,vertices,stride); |
| 255 | child = PatchT::create(alloc,patch,edge,vertices,stride,0); |
| 256 | } |
| 257 | } |
| 258 | return child; |
| 259 | } |
| 260 | |
| 261 | template<typename Allocator> |
| 262 | __noinline static Ref create(const Allocator& alloc, GeneralCatmullClarkPatch& patch, const HalfEdge* edge, const char* vertices, size_t stride, size_t depth) |
no test coverage detected