69 WOEdge *woea(
nullptr), *woeb(
nullptr);
71 vector<int> cuspEdgesIndices;
72 int indexStart, indexEnd;
83 if (cuspEdgesIndices.size() != 2) {
93 if (
_DotP[cuspEdgesIndices[0]] > 0.0f) {
94 woea =
_pWXFace->GetOEdge(cuspEdgesIndices[0]);
95 woeb =
_pWXFace->GetOEdge(cuspEdgesIndices[1]);
96 indexStart = cuspEdgesIndices[0];
97 indexEnd = cuspEdgesIndices[1];
100 woea =
_pWXFace->GetOEdge(cuspEdgesIndices[1]);
101 woeb =
_pWXFace->GetOEdge(cuspEdgesIndices[0]);
102 indexStart = cuspEdgesIndices[1];
103 indexEnd = cuspEdgesIndices[0];
107 ta =
_DotP[indexStart] / (
_DotP[indexStart] -
_DotP[(indexStart + 1) % nedges]);
108 tb =
_DotP[indexEnd] / (
_DotP[indexEnd] -
_DotP[(indexEnd + 1) % nedges]);
120 if (cuspEdgesIndices.size() != 1) {
122 cout <<
"Warning in BuildSmoothEdge: weird WXFace configuration" << endl;
129 if (
_DotP[cuspEdgesIndices[0]] > 0.0f) {
130 woea =
_pWXFace->GetOEdge(cuspEdgesIndices[0]);
132 indexStart = cuspEdgesIndices[0];
133 ta =
_DotP[indexStart] / (
_DotP[indexStart] -
_DotP[(indexStart + 1) % nedges]);
138 woeb =
_pWXFace->GetOEdge(cuspEdgesIndices[0]);
139 indexEnd = cuspEdgesIndices[0];
141 tb =
_DotP[indexEnd] / (
_DotP[indexEnd] -
_DotP[(indexEnd + 1) % nedges]);
150 woea =
_pWXFace->GetOEdge((index + 1) % nedges);
151 woeb =
_pWXFace->GetOEdge((index - 1) % nedges);
161 woea =
_pWXFace->GetOEdge((index - 1) % nedges);
162 woeb =
_pWXFace->GetOEdge((index + 1) % nedges);
188 for (
int i = 0;
i < numberOfEdges();
i++) {
189 WSFace *bface = (WSFace *)GetBordingFace(
i);
191 if ((front()) ^ (bface->front()))
196 if (((WSExactFace *)bface)->exactSilhouetteEdge()) {
198 return ((WSExactFace *)bface)->exactSilhouetteEdge();
205 woea = _OEdgeList[(
i + 1) % numberOfEdges()];
207 woeb = _OEdgeList[numberOfEdges() - 1];
210 woeb = _OEdgeList[(
i - 1)];
218 woea = _OEdgeList[numberOfEdges() - 1];
221 woea = _OEdgeList[(
i - 1)];
223 woeb = _OEdgeList[(
i + 1) % numberOfEdges()];
228 _pSmoothEdge =
new ExactSilhouetteEdge(ExactSilhouetteEdge::VERTEX_VERTEX);
266 vector<bool> &iFaceEdgeMarksList,
275 for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
279 center += (*wv)->GetVertex();
281 center /=
float(iVertexList.size());
282 ((
WXFace *)face)->setCenter(center);
288 vector<Vec3f> &iNormalsList,
289 vector<Vec2f> &iTexCoordsList,
290 vector<bool> &iFaceEdgeMarksList,
294 iVertexList, iNormalsList, iTexCoordsList, iFaceEdgeMarksList, iMaterialIndex);
298 for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
302 center += (*wv)->GetVertex();
304 center /=
float(iVertexList.size());
305 ((
WXFace *)face)->setCenter(center);