99 WOEdge *woedge = *_edge_it;
121 vector<WEdge *>::const_iterator it;
123 if ((*it)->GetNumberOfOEdges() == 1) {
129 if (!(*it)->GetaOEdge()->GetaFace()) {
169 WOEdge **WVertex::incoming_edge_iterator::operator->()
171 WOEdge **ppaOEdge = (*_iter)->GetaOEdge();
172 if (aOEdge->GetbVertex() == _vertex) {
176 WOEdge *bOEdge = (*_iter)->GetbOEdge();
201 _vec = iBrother.
_vec;
213 return GetOwner()->GetOtherOEdge(
this);
218 return _pbFace->GetPrevOEdge(
this);
274 _Mark = iBrother.
_Mark;
288 return getShape()->frs_material(_FrsMaterialIndex);
294 vector<WEdge *> &v1Edges =
v1->GetEdges();
295 for (vector<WEdge *>::iterator it1 = v1Edges.begin(), end = v1Edges.end(); it1 != end; it1++) {
301 cerr <<
"Warning: edge " <<
v1->GetId() <<
" - " <<
v2->GetId()
302 <<
" appears twice, correcting" << endl;
305 (*it1)->setNumberOfOEdges((*it1)->GetNumberOfOEdges() + 1);
315 cerr <<
"Warning: edge " <<
v1->GetId() <<
" - " <<
v2->GetId()
316 <<
" appears twice, correcting" << endl;
319 (*it1)->setNumberOfOEdges((*it1)->GetNumberOfOEdges() + 1);
335 WOEdge *pInvertEdge =
nullptr;
336 vector<WEdge *> &v2Edges =
v2->GetEdges();
337 vector<WEdge *>::iterator it;
338 for (it = v2Edges.begin(); it != v2Edges.end(); it++) {
339 if ((*it)->GetbVertex() ==
v1) {
342 pInvertEdge = (*it)->GetaOEdge();
361 edge = instanciateEdge();
374 if (
v1->GetId() ==
v2->GetId()) {
375 cerr <<
"Warning: edge " <<
this <<
" null with vertex " <<
v1->GetId() << endl;
392 if (_OEdgeList.size() != 3) {
396 vector<WOEdge *>::iterator it;
398 for (it = _OEdgeList.begin(); it != _OEdgeList.end(); it++) {
399 if ((*it)->GetaVertex() ==
v) {
407 for (it = _OEdgeList.begin(); it != _OEdgeList.end(); it++) {
408 if (((*it)->GetaVertex() !=
v) && ((*it)->GetbVertex() !=
v)) {
421 vector<WOEdge *>::iterator it;
422 Vec3f origin = (*(_OEdgeList.begin()))->GetaVertex()->GetVertex();
423 it = _OEdgeList.begin();
425 for (it = it++; it != _OEdgeList.end(); it++) {
426 Vec3f v1 =
Vec3f((*it)->GetaVertex()->GetVertex() - origin);
427 Vec3f v2 =
Vec3f((*it)->GetbVertex()->GetVertex() - origin);
435 vector<WOEdge *>::iterator woe, woend, woefirst;
436 woefirst = _OEdgeList.begin();
437 woend = _OEdgeList.end();
441 for (; woe != woend; woe++) {
442 if ((*woe) == iOEdge) {
448 if ((*woefirst) == iOEdge) {
479 _Name = iBrother.
_Name;
483 _meanEdgeSize = iBrother._meanEdgeSize;
484 iBrother.bbox(_min, _max);
487 vector<WVertex *>::iterator
v = vertexList.begin(), vend = vertexList.end();
488 for (;
v != vend; ++
v) {
493 AddVertex(newVertex);
496 vector<WEdge *> &edgeList = iBrother.
getEdgeList();
497 vector<WEdge *>::iterator
e = edgeList.begin(), eend = edgeList.end();
498 for (;
e != eend; ++
e) {
504 vector<WFace *> &faceList = iBrother.
GetFaceList();
505 vector<WFace *>::iterator f = faceList.begin(), fend = faceList.end();
506 for (; f != fend; ++f) {
513 vend = _VertexList.end();
514 for (
v = _VertexList.begin();
v != vend; ++
v) {
515 const vector<WEdge *> &vedgeList = (*v)->GetEdges();
516 vector<WEdge *> newvedgelist;
518 for (i = 0; i < vedgeList.size(); i++) {
519 WEdge *current = vedgeList[i];
521 newvedgelist.push_back(currentvedata->
_copy);
523 (*v)->setEdges(newvedgelist);
529 WOEdge *aoEdge = (*e)->GetaOEdge();
539 WOEdge *boEdge = (*e)->GetbOEdge();
551 fend = _FaceList.end();
552 for (f = _FaceList.begin(); f != fend; ++f) {
554 const vector<WOEdge *> &oedgeList = (*f)->getEdgeList();
555 vector<WOEdge *> newoedgelist;
557 unsigned int n = oedgeList.size();
558 for (i = 0; i < n; i++) {
559 WOEdge *current = oedgeList[i];
561 newoedgelist.push_back(currentoedata->
_copy);
565 (*f)->setEdgeList(newoedgelist);
573 (*v)->userdata =
nullptr;
579 delete (
edgedata *)((*e)->userdata);
580 (*e)->userdata =
nullptr;
582 delete (
oedgedata *)((*e)->GetaOEdge()->userdata);
583 (*e)->GetaOEdge()->userdata =
nullptr;
585 WOEdge *oedgeb = (*e)->GetbOEdge();
594 for (f = iBrother.
GetFaceList().begin(); f != fend; ++f) {
595 delete (
facedata *)((*f)->userdata);
596 (*f)->userdata =
nullptr;
605 WFace *face = instanciateFace();
607 WFace *
result = MakeFace(iVertexList, iFaceEdgeMarksList, iMaterial, face);
615 vector<Vec3f> &iNormalsList,
616 vector<Vec2f> &iTexCoordsList,
621 WFace *face = MakeFace(iVertexList, iFaceEdgeMarksList, iMaterial);
640 int id = _FaceList.size();
648 if (3 == iVertexList.size()) {
649 if ((iVertexList[0] == iVertexList[1]) || (iVertexList[0] == iVertexList[2]) ||
650 (iVertexList[2] == iVertexList[1])) {
651 cerr <<
"Warning: degenerated triangle detected, correcting" << endl;
656 vector<WVertex *>::iterator it;
661 it = iVertexList.begin();
662 v1 = (*it)->GetVertex();
664 v2 = (*it)->GetVertex();
666 v3 = (*it)->GetVertex();
675 vector<bool>::iterator mit = iFaceEdgeMarksList.begin();
680 vector<WVertex *>::iterator va, vb;
682 va = iVertexList.begin();
684 for (; va != iVertexList.end(); va = vb) {
690 if (*va == iVertexList.back()) {
691 oedge = face->
MakeEdge(*va, iVertexList.front());
725 real meanEdgeSize = 0.0;
729 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()
void AddOEdge(WOEdge *iEdge)
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