39 for (i = 0; i < nEdges; ++i) {
40 if (
_DotP[i] == 0.0f) {
50 for (i = 0; i < nEdges; ++i) {
51 if ((
_DotP[i] == 0.0f) && (
_DotP[(i + 1) % nEdges] == 0.0f)) {
62 for (i = 0; i < nEdges; ++i) {
63 if (
_DotP[i] *
_DotP[(i + 1) % nEdges] < 0.0f) {
65 oCuspEdges.push_back(i);
77 WOEdge *woea(
nullptr), *woeb(
nullptr);
80 int indexStart, indexEnd;
91 if (cuspEdgesIndices.size() != 2) {
101 if (
_DotP[cuspEdgesIndices[0]] > 0.0f) {
104 indexStart = cuspEdgesIndices[0];
105 indexEnd = cuspEdgesIndices[1];
110 indexStart = cuspEdgesIndices[1];
111 indexEnd = cuspEdgesIndices[0];
115 ta =
_DotP[indexStart] / (
_DotP[indexStart] -
_DotP[(indexStart + 1) % nedges]);
116 tb =
_DotP[indexEnd] / (
_DotP[indexEnd] -
_DotP[(indexEnd + 1) % nedges]);
128 if (cuspEdgesIndices.size() != 1) {
130 cout <<
"Warning in BuildSmoothEdge: weird WXFace configuration" << endl;
137 if (
_DotP[cuspEdgesIndices[0]] > 0.0f) {
140 indexStart = cuspEdgesIndices[0];
141 ta =
_DotP[indexStart] / (
_DotP[indexStart] -
_DotP[(indexStart + 1) % nedges]);
147 indexEnd = cuspEdgesIndices[0];
149 tb =
_DotP[indexEnd] / (
_DotP[indexEnd] -
_DotP[(indexEnd + 1) % nedges]);
196 for (
int i = 0; i < numberOfEdges(); i++) {
197 WSFace *bface = (WSFace *)GetBordingFace(i);
204 if (((WSExactFace *)bface)->exactSilhouetteEdge()) {
206 return ((WSExactFace *)bface)->exactSilhouetteEdge();
213 woea = _OEdgeList[(i + 1) % numberOfEdges()];
215 woeb = _OEdgeList[numberOfEdges() - 1];
218 woeb = _OEdgeList[(i - 1)];
226 woea = _OEdgeList[numberOfEdges() - 1];
229 woea = _OEdgeList[(i - 1)];
231 woeb = _OEdgeList[(i + 1) % numberOfEdges()];
236 _pSmoothEdge =
new ExactSilhouetteEdge(ExactSilhouetteEdge::VERTEX_VERTEX);
252 vector<WVertex *> iVertexList;
255 for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
258 center += (*wv)->GetVertex();
274 unsigned iMaterialIndex)
282 for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
285 center += (*wv)->GetVertex();
294 vector<Vec3f> &iNormalsList,
295 vector<Vec2f> &iTexCoordsList,
297 unsigned iMaterialIndex)
300 iVertexList, iNormalsList, iTexCoordsList, iFaceEdgeMarksList, iMaterialIndex);
304 for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
307 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