MCPcopy Create free account
hub / github.com/RenderKit/embree / patchType

Function patchType

kernels/subdiv/half_edge.h:132–156  ·  view source on GitHub ↗

! calculates the type of the patch */

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 2

maxFunction · 0.70
nextMethod · 0.45

Tested by

no test coverage detected