25 for (i = 0; i < nEdges; ++i) {
26 if (
_DotP[i] == 0.0f) {
36 for (i = 0; i < nEdges; ++i) {
37 if ((
_DotP[i] == 0.0f) && (
_DotP[(i + 1) % nEdges] == 0.0f)) {
48 for (i = 0; i < nEdges; ++i) {
49 if (
_DotP[i] *
_DotP[(i + 1) % nEdges] < 0.0f) {
51 oCuspEdges.push_back(i);
63 WOEdge *woea(
nullptr), *woeb(
nullptr);
66 int indexStart, indexEnd;
77 if (cuspEdgesIndices.size() != 2) {
87 if (
_DotP[cuspEdgesIndices[0]] > 0.0f) {
90 indexStart = cuspEdgesIndices[0];
91 indexEnd = cuspEdgesIndices[1];
96 indexStart = cuspEdgesIndices[1];
97 indexEnd = cuspEdgesIndices[0];
101 ta =
_DotP[indexStart] / (
_DotP[indexStart] -
_DotP[(indexStart + 1) % nedges]);
102 tb =
_DotP[indexEnd] / (
_DotP[indexEnd] -
_DotP[(indexEnd + 1) % nedges]);
114 if (cuspEdgesIndices.size() != 1) {
116 cout <<
"Warning in BuildSmoothEdge: weird WXFace configuration" << endl;
123 if (
_DotP[cuspEdgesIndices[0]] > 0.0f) {
126 indexStart = cuspEdgesIndices[0];
127 ta =
_DotP[indexStart] / (
_DotP[indexStart] -
_DotP[(indexStart + 1) % nedges]);
133 indexEnd = cuspEdgesIndices[0];
135 tb =
_DotP[indexEnd] / (
_DotP[indexEnd] -
_DotP[(indexEnd + 1) % nedges]);
182 for (
int i = 0; i < numberOfEdges(); i++) {
183 WSFace *bface = (WSFace *)GetBordingFace(i);
190 if (((WSExactFace *)bface)->exactSilhouetteEdge()) {
192 return ((WSExactFace *)bface)->exactSilhouetteEdge();
199 woea = _OEdgeList[(i + 1) % numberOfEdges()];
201 woeb = _OEdgeList[numberOfEdges() - 1];
204 woeb = _OEdgeList[(i - 1)];
212 woea = _OEdgeList[numberOfEdges() - 1];
215 woea = _OEdgeList[(i - 1)];
217 woeb = _OEdgeList[(i + 1) % numberOfEdges()];
222 _pSmoothEdge =
new ExactSilhouetteEdge(ExactSilhouetteEdge::VERTEX_VERTEX);
238 vector<WVertex *> iVertexList;
241 for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
244 center += (*wv)->GetVertex();
260 unsigned iMaterialIndex)
268 for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
271 center += (*wv)->GetVertex();
280 vector<Vec3f> &iNormalsList,
281 vector<Vec2f> &iTexCoordsList,
283 unsigned iMaterialIndex)
286 iVertexList, iNormalsList, iTexCoordsList, iFaceEdgeMarksList, iMaterialIndex);
290 for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
293 center += (*wv)->GetVertex();
typedef float(TangentPoint)[2]
NSNotificationCenter * center
Classes to define an Extended Winged Edge data structure.
int numberOfEdges() const
void RetrieveVertexList(vector< WVertex * > &oVertices)
virtual WFace * MakeFace(vector< WVertex * > &iVertexList, vector< bool > &iFaceEdgeMarksList, unsigned iMaterialIndex)
unsigned int Get0VertexIndex() const
unsigned _ClosestPointIndex
void RetrieveCuspEdgesIndices(vector< int > &oCuspEdges)
unsigned int GetSmoothEdgeIndex() const
WXSmoothEdge * BuildSmoothEdge()
WXSmoothEdge * _pSmoothEdge
void setCenter(const Vec3f &iCenter)
virtual WFace * MakeFace(vector< WVertex * > &iVertexList, vector< bool > &iFaceEdgeMarksList, unsigned iMaterialIndex)
void setWOeA(WOEdge *iwoea)
void setWOeB(WOEdge *iwoeb)
void setFront(bool iFront)
static const EdgeNature SILHOUETTE