compilation with gcc
This commit is contained in:
parent
a5d00b1c71
commit
743e4f7a9e
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.13 2007/03/12 15:38:03 tarini
|
||||||
|
Texture coord name change! "TCoord" and "Texture" are BAD. "TexCoord" is GOOD.
|
||||||
|
|
||||||
Revision 1.12 2005/12/12 11:10:35 ganovelli
|
Revision 1.12 2005/12/12 11:10:35 ganovelli
|
||||||
modifications to compile with gcc
|
modifications to compile with gcc
|
||||||
|
|
||||||
|
@ -69,12 +72,10 @@ Revision 1.1 2004/04/15 08:54:20 pietroni
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#pragma warning( disable : 4804 )
|
|
||||||
|
|
||||||
#ifndef __VCG_TETRAMESH
|
#ifndef __VCG_TETRAMESH
|
||||||
#define __VCG_TETRAMESH
|
#define __VCG_TETRAMESH
|
||||||
#include <vcg\space\box3.h>
|
#include <vcg/space/box3.h>
|
||||||
#include <vcg\space\Color4.h>
|
#include <vcg/space/color4.h>
|
||||||
|
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
|
|
|
@ -26,6 +26,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.4 2005/02/08 14:36:20 turini
|
||||||
|
Warnings Correction
|
||||||
|
|
||||||
Revision 1.3 2004/05/17 08:22:45 turini
|
Revision 1.3 2004/05/17 08:22:45 turini
|
||||||
Minor Changes and Now Use STLContainer of Tetrahedron Pointers.
|
Minor Changes and Now Use STLContainer of Tetrahedron Pointers.
|
||||||
|
|
||||||
|
@ -92,13 +95,13 @@ template <class S_TETRAMESH_TYPE, class STL_CONT >
|
||||||
void SubSet(S_TETRAMESH_TYPE & m, STL_CONT & subSet)
|
void SubSet(S_TETRAMESH_TYPE & m, STL_CONT & subSet)
|
||||||
{
|
{
|
||||||
std::vector< InsertedVT<S_TETRAMESH_TYPE> > newVertices;
|
std::vector< InsertedVT<S_TETRAMESH_TYPE> > newVertices;
|
||||||
STL_CONT::iterator pfi;
|
typename STL_CONT::iterator pfi;
|
||||||
newVertices.clear();
|
newVertices.clear();
|
||||||
|
|
||||||
for(pfi=subSet.begin(); pfi!=subSet.end(); ++pfi)
|
for(pfi=subSet.begin(); pfi!=subSet.end(); ++pfi)
|
||||||
m.tetra.push_back(*(*pfi));
|
m.tetra.push_back(*(*pfi));
|
||||||
|
|
||||||
S_TETRAMESH_TYPE::TetraIterator fi;
|
typename S_TETRAMESH_TYPE::TetraIterator fi;
|
||||||
for(fi=m.tetra.begin(); fi!=m.tetra.end(); ++fi)
|
for(fi=m.tetra.begin(); fi!=m.tetra.end(); ++fi)
|
||||||
{
|
{
|
||||||
newVertices.push_back(InsertedVT<S_TETRAMESH_TYPE>((*fi).V(0), &(*fi), 0));
|
newVertices.push_back(InsertedVT<S_TETRAMESH_TYPE>((*fi).V(0), &(*fi), 0));
|
||||||
|
@ -109,19 +112,19 @@ void SubSet(S_TETRAMESH_TYPE & m, STL_CONT & subSet)
|
||||||
|
|
||||||
std::sort(newVertices.begin(), newVertices.end());
|
std::sort(newVertices.begin(), newVertices.end());
|
||||||
|
|
||||||
std::vector< InsertedVT<S_TETRAMESH_TYPE> >::iterator curr,next;
|
typename std::vector< InsertedVT<S_TETRAMESH_TYPE> >::iterator curr,next;
|
||||||
int pos=0;
|
int pos=0;
|
||||||
curr=next=newVertices.begin();
|
curr=next=newVertices.begin();
|
||||||
while(next!=newVertices.end())
|
while(next!=newVertices.end())
|
||||||
{
|
{
|
||||||
if((*curr)!=(*next))
|
if((*curr)!=(*next))
|
||||||
pos++;
|
pos++;
|
||||||
(*next).t->V((*next).z)=(S_TETRAMESH_TYPE::VertexPointer)pos;
|
(*next).t->V((*next).z)=(typename S_TETRAMESH_TYPE::VertexPointer)pos;
|
||||||
curr=next;
|
curr=next;
|
||||||
next++;
|
next++;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector< InsertedVT<S_TETRAMESH_TYPE> >::iterator newE=std::unique(newVertices.begin(), newVertices.end());
|
typename std::vector< InsertedVT<S_TETRAMESH_TYPE> >::iterator newE=std::unique(newVertices.begin(), newVertices.end());
|
||||||
|
|
||||||
for(curr=newVertices.begin(); curr!=newE; ++curr)
|
for(curr=newVertices.begin(); curr!=newE; ++curr)
|
||||||
m.vert.push_back(*((*curr).v));
|
m.vert.push_back(*((*curr).v));
|
||||||
|
|
Loading…
Reference in New Issue