85 WOEdge *woedge = *_edge_it;
107 vector<WEdge *>::const_iterator it;
109 if ((*it)->GetNumberOfOEdges() == 1) {
115 if (!(*it)->GetaOEdge()->GetaFace()) {
155 WOEdge **WVertex::incoming_edge_iterator::operator->()
157 WOEdge **ppaOEdge = (*_iter)->GetaOEdge();
158 if (aOEdge->GetbVertex() == _vertex) {
162 WOEdge *bOEdge = (*_iter)->GetbOEdge();
187 _vec = iBrother.
_vec;
199 return GetOwner()->GetOtherOEdge(
this);
204 return _pbFace->GetPrevOEdge(
this);
260 _Mark = iBrother.
_Mark;
274 return getShape()->frs_material(_FrsMaterialIndex);
280 vector<WEdge *> &v1Edges =
v1->GetEdges();
281 for (vector<WEdge *>::iterator it1 = v1Edges.begin(), end = v1Edges.end(); it1 != end; it1++) {
287 cerr <<
"Warning: edge " <<
v1->GetId() <<
" - " <<
v2->GetId()
288 <<
" appears twice, correcting" << endl;
291 (*it1)->setNumberOfOEdges((*it1)->GetNumberOfOEdges() + 1);
301 cerr <<
"Warning: edge " <<
v1->GetId() <<
" - " <<
v2->GetId()
302 <<
" appears twice, correcting" << endl;
305 (*it1)->setNumberOfOEdges((*it1)->GetNumberOfOEdges() + 1);
321 WOEdge *pInvertEdge =
nullptr;
322 vector<WEdge *> &v2Edges =
v2->GetEdges();
323 vector<WEdge *>::iterator it;
324 for (it = v2Edges.begin(); it != v2Edges.end(); it++) {
325 if ((*it)->GetbVertex() ==
v1) {
328 pInvertEdge = (*it)->GetaOEdge();
347 edge = instanciateEdge();
360 if (
v1->GetId() ==
v2->GetId()) {
361 cerr <<
"Warning: edge " <<
this <<
" null with vertex " <<
v1->GetId() << endl;
364 edge->AddOEdge(pOEdge);
378 if (_OEdgeList.size() != 3) {
382 vector<WOEdge *>::iterator it;
384 for (it = _OEdgeList.begin(); it != _OEdgeList.end(); it++) {
385 if ((*it)->GetaVertex() ==
v) {
393 for (it = _OEdgeList.begin(); it != _OEdgeList.end(); it++) {
394 if (((*it)->GetaVertex() !=
v) && ((*it)->GetbVertex() !=
v)) {
407 vector<WOEdge *>::iterator it;
408 Vec3f origin = (*(_OEdgeList.begin()))->GetaVertex()->GetVertex();
409 it = _OEdgeList.begin();
411 for (it = it++; it != _OEdgeList.end(); it++) {
412 Vec3f v1 =
Vec3f((*it)->GetaVertex()->GetVertex() - origin);
413 Vec3f v2 =
Vec3f((*it)->GetbVertex()->GetVertex() - origin);
421 vector<WOEdge *>::iterator woe, woend, woefirst;
422 woefirst = _OEdgeList.begin();
423 woend = _OEdgeList.end();
427 for (; woe != woend; woe++) {
428 if ((*woe) == iOEdge) {
434 if ((*woefirst) == iOEdge) {
465 _Name = iBrother.
_Name;
469 _meanEdgeSize = iBrother._meanEdgeSize;
470 iBrother.bbox(_min, _max);
473 vector<WVertex *>::iterator
v = vertexList.begin(), vend = vertexList.end();
474 for (;
v != vend; ++
v) {
479 AddVertex(newVertex);
482 vector<WEdge *> &edgeList = iBrother.
getEdgeList();
483 vector<WEdge *>::iterator
e = edgeList.begin(), eend = edgeList.end();
484 for (;
e != eend; ++
e) {
490 vector<WFace *> &faceList = iBrother.
GetFaceList();
491 vector<WFace *>::iterator f = faceList.begin(), fend = faceList.end();
492 for (; f != fend; ++f) {
499 vend = _VertexList.end();
500 for (
v = _VertexList.begin();
v != vend; ++
v) {
501 const vector<WEdge *> &vedgeList = (*v)->GetEdges();
502 vector<WEdge *> newvedgelist;
504 for (i = 0; i < vedgeList.size(); i++) {
505 WEdge *current = vedgeList[i];
507 newvedgelist.push_back(currentvedata->
_copy);
509 (*v)->setEdges(newvedgelist);
515 WOEdge *aoEdge = (*e)->GetaOEdge();
525 WOEdge *boEdge = (*e)->GetbOEdge();
537 fend = _FaceList.end();
538 for (f = _FaceList.begin(); f != fend; ++f) {
540 const vector<WOEdge *> &oedgeList = (*f)->getEdgeList();
541 vector<WOEdge *> newoedgelist;
543 unsigned int n = oedgeList.size();
544 for (i = 0; i < n; i++) {
545 WOEdge *current = oedgeList[i];
547 newoedgelist.push_back(currentoedata->
_copy);
551 (*f)->setEdgeList(newoedgelist);
559 (*v)->userdata =
nullptr;
565 delete (
edgedata *)((*e)->userdata);
566 (*e)->userdata =
nullptr;
568 delete (
oedgedata *)((*e)->GetaOEdge()->userdata);
569 (*e)->GetaOEdge()->userdata =
nullptr;
571 WOEdge *oedgeb = (*e)->GetbOEdge();
580 for (f = iBrother.
GetFaceList().begin(); f != fend; ++f) {
581 delete (
facedata *)((*f)->userdata);
582 (*f)->userdata =
nullptr;
591 WFace *face = instanciateFace();
593 WFace *
result = MakeFace(iVertexList, iFaceEdgeMarksList, iMaterial, face);
601 vector<Vec3f> &iNormalsList,
602 vector<Vec2f> &iTexCoordsList,
607 WFace *face = MakeFace(iVertexList, iFaceEdgeMarksList, iMaterial);
626 int id = _FaceList.size();
634 if (3 == iVertexList.size()) {
635 if ((iVertexList[0] == iVertexList[1]) || (iVertexList[0] == iVertexList[2]) ||
636 (iVertexList[2] == iVertexList[1])) {
637 cerr <<
"Warning: degenerated triangle detected, correcting" << endl;
642 vector<WVertex *>::iterator it;
647 it = iVertexList.begin();
648 v1 = (*it)->GetVertex();
650 v2 = (*it)->GetVertex();
652 v3 = (*it)->GetVertex();
661 vector<bool>::iterator mit = iFaceEdgeMarksList.begin();
666 vector<WVertex *>::iterator va, vb;
668 va = iVertexList.begin();
670 for (; va != iVertexList.end(); va = vb) {
676 if (*va == iVertexList.back()) {
677 oedge = face->
MakeEdge(*va, iVertexList.front());
688 if (1 == edge->GetNumberOfOEdges()) {
694 _meanEdgeSize += edge->GetaOEdge()->GetVec().norm();
711 real meanEdgeSize = 0.0;
715 meanEdgeSize += (*it)->GetaOEdge()->GetVec().norm();
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Classes to define a Winged Edge data structure.
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE btScalar norm() const
Return the norm (length) of the vector.
short GetNumberOfOEdges()
virtual WEdge * duplicate()
vector< Vec2f > _VerticesTexCoords
void setNormal(const Vec3f &iNormal)
void setFrsMaterialIndex(unsigned iMaterialIndex)
const FrsMaterial & frs_material()
unsigned _FrsMaterialIndex
WOEdge * GetPrevOEdge(WOEdge *iOEdge)
virtual WOEdge * MakeEdge(WVertex *v1, WVertex *v2)
virtual WFace * duplicate()
bool getOppositeEdge(const WVertex *v, WOEdge *&e)
void setNormalList(const vector< Vec3f > &iNormalsList)
void setTexCoordsList(const vector< Vec2f > &iTexCoordsList)
const vector< WOEdge * > & getEdgeList()
vector< Vec3f > _VerticesNormals
void setbVertex(WVertex *pv)
virtual WOEdge * duplicate()
void setaVertex(WVertex *pv)
vector< WEdge * > & getEdgeList()
real ComputeMeanEdgeSize() const
vector< FrsMaterial > _FrsMaterials
virtual WShape * duplicate()
static unsigned _SceneCurrentId
virtual WFace * MakeFace(vector< WVertex * > &iVertexList, vector< bool > &iFaceEdgeMarksList, unsigned iMaterialIndex)
vector< WVertex * > & getVertexList()
vector< WFace * > & GetFaceList()
virtual WFace * operator*()
virtual WOEdge * operator*()
virtual incoming_edge_iterator incoming_edges_begin()
vector< WEdge * > _EdgeList
virtual incoming_edge_iterator incoming_edges_end()
void setShape(WShape *iShape)
void AddEdge(WEdge *iEdge)
virtual WVertex * duplicate()
IconTextureDrawCall normal
SymEdge< T > * prev(const SymEdge< T > *se)