68 WOEdge *woea(
nullptr), *woeb(
nullptr);
70 vector<int> cuspEdgesIndices;
71 int indexStart, indexEnd;
82 if (cuspEdgesIndices.size() != 2) {
92 if (
_DotP[cuspEdgesIndices[0]] > 0.0f) {
95 indexStart = cuspEdgesIndices[0];
96 indexEnd = cuspEdgesIndices[1];
101 indexStart = cuspEdgesIndices[1];
102 indexEnd = cuspEdgesIndices[0];
106 ta =
_DotP[indexStart] / (
_DotP[indexStart] -
_DotP[(indexStart + 1) % nedges]);
107 tb =
_DotP[indexEnd] / (
_DotP[indexEnd] -
_DotP[(indexEnd + 1) % nedges]);
119 if (cuspEdgesIndices.size() != 1) {
121 cout <<
"Warning in BuildSmoothEdge: weird WXFace configuration" << endl;
128 if (
_DotP[cuspEdgesIndices[0]] > 0.0f) {
131 indexStart = cuspEdgesIndices[0];
132 ta =
_DotP[indexStart] / (
_DotP[indexStart] -
_DotP[(indexStart + 1) % nedges]);
138 indexEnd = cuspEdgesIndices[0];
140 tb =
_DotP[indexEnd] / (
_DotP[indexEnd] -
_DotP[(indexEnd + 1) % nedges]);
187 for (
int i = 0; i < numberOfEdges(); i++) {
188 WSFace *bface = (WSFace *)GetBordingFace(i);
190 if ((front()) ^ (bface->front()))
195 if (((WSExactFace *)bface)->exactSilhouetteEdge()) {
197 return ((WSExactFace *)bface)->exactSilhouetteEdge();
204 woea = _OEdgeList[(i + 1) % numberOfEdges()];
206 woeb = _OEdgeList[numberOfEdges() - 1];
209 woeb = _OEdgeList[(i - 1)];
217 woea = _OEdgeList[numberOfEdges() - 1];
220 woea = _OEdgeList[(i - 1)];
222 woeb = _OEdgeList[(i + 1) % numberOfEdges()];
227 _pSmoothEdge =
new ExactSilhouetteEdge(ExactSilhouetteEdge::VERTEX_VERTEX);
265 vector<bool> &iFaceEdgeMarksList,
274 for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
278 center += (*wv)->GetVertex();
280 center /=
float(iVertexList.size());
281 ((
WXFace *)face)->setCenter(center);
287 vector<Vec3f> &iNormalsList,
288 vector<Vec2f> &iTexCoordsList,
289 vector<bool> &iFaceEdgeMarksList,
293 iVertexList, iNormalsList, iTexCoordsList, iFaceEdgeMarksList, iMaterialIndex);
297 for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
301 center += (*wv)->GetVertex();
303 center /=
float(iVertexList.size());
304 ((
WXFace *)face)->setCenter(center);