Trying to solve int / size_t issues. Added a error guard to avoid inclusion of append.
This commit is contained in:
parent
30a9c6c2fb
commit
65336cfe7b
|
@ -20,14 +20,12 @@
|
|||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#ifndef __VCG_MESH
|
||||
#error "This file should not be included alone. It is automatically included by complex.h"
|
||||
#endif
|
||||
|
||||
#ifndef __VCGLIB_TRIALLOCATOR
|
||||
#define __VCGLIB_TRIALLOCATOR
|
||||
|
||||
#include<climits>
|
||||
#ifndef __VCG_MESH
|
||||
#error "This file should not be included alone. It is automatically included by complex.h"
|
||||
#endif
|
||||
|
||||
namespace vcg {
|
||||
namespace tri {
|
||||
|
|
|
@ -20,10 +20,13 @@
|
|||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __VCGLIB_APPEND
|
||||
#define __VCGLIB_APPEND
|
||||
|
||||
#ifndef __VCG_MESH
|
||||
#error "This file should not be included alone. It is automatically included by complex.h"
|
||||
#endif
|
||||
|
||||
namespace vcg {
|
||||
namespace tri {
|
||||
/** \ingroup trimesh */
|
||||
|
@ -64,7 +67,7 @@ public:
|
|||
typedef typename ConstMeshRight::FacePointer FacePointerRight;
|
||||
|
||||
struct Remap{
|
||||
std::vector<size_t> vert,face,edge, hedge;
|
||||
std::vector<int> vert,face,edge, hedge;
|
||||
};
|
||||
|
||||
static void ImportVertexAdj(MeshLeft &ml, ConstMeshRight &mr, VertexLeft &vl, VertexRight &vr, Remap &remap ){
|
||||
|
@ -119,7 +122,7 @@ public:
|
|||
if(HasFEAdjacency(ml) && HasFEAdjacency(mr)){
|
||||
assert(fl.VN() == fr.VN());
|
||||
for( int vi = 0; vi < fl.VN(); ++vi ){
|
||||
size_t idx = remap.edge[Index(mr,fr.cFEp(vi))];
|
||||
int idx = remap.edge[Index(mr,fr.cFEp(vi))];
|
||||
if(idx>=0)
|
||||
fl.FEp(vi) = &ml.edge[idx];
|
||||
}
|
||||
|
@ -129,7 +132,7 @@ public:
|
|||
if(HasFFAdjacency(ml) && HasFFAdjacency(mr)){
|
||||
assert(fl.VN() == fr.VN());
|
||||
for( int vi = 0; vi < fl.VN(); ++vi ){
|
||||
size_t idx = remap.face[Index(mr,fr.cFFp(vi))];
|
||||
int idx = remap.face[Index(mr,fr.cFFp(vi))];
|
||||
if(idx>=0){
|
||||
fl.FFp(vi) = &ml.face[idx];
|
||||
fl.FFi(vi) = fr.cFFi(vi);
|
||||
|
|
Loading…
Reference in New Issue