This commit is contained in:
Jan Möbius
2019-05-28 14:04:58 +02:00
parent 87d2161c5d
commit f468efacd0
14 changed files with 27 additions and 25 deletions

View File

@@ -147,7 +147,7 @@ public:
bool write(const std::string& _filename,
BaseExporter& _be,
Options _opt=Options::Default,
std::streamsize _precision = 6);
std::streamsize _precision = 6);
/** Write a mesh to open std::ostream _os. The source data structure is specified
by the given BaseExporter. The \c save method consecutively queries all
@@ -159,7 +159,7 @@ public:
const std::string& _ext,
BaseExporter& _be,
Options _opt=Options::Default,
std::streamsize _precision = 6);
std::streamsize _precision = 6);
/// Returns true if the format is supported by one of the reader modules.

View File

@@ -135,13 +135,13 @@ read(const std::string& _filename, BaseImporter& _bi, Options& _opt)
{
#if defined(WIN32)
std::string::size_type dot = _filename.find_last_of("\\/");
std::string::size_type dot_pos = _filename.find_last_of("\\/");
#else
std::string::size_type dot = _filename.rfind("/");
std::string::size_type dot_pos = _filename.rfind("/");
#endif
path_ = (dot == std::string::npos)
path_ = (dot_pos == std::string::npos)
? "./"
: std::string(_filename.substr(0,dot+1));
: std::string(_filename.substr(0,dot_pos+1));
}
bool result = read(in, _bi, _opt);

View File

@@ -206,7 +206,7 @@ _OBJWriter_::
write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _precision) const
{
unsigned int idx;
size_t i, j,nV, nF;
size_t nV, nF;
Vec3f v, n;
Vec2f t;
VertexHandle vh;
@@ -273,7 +273,7 @@ write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _prec
std::vector<Vec2f> texCoords;
//add all texCoords to map
unsigned int num = _be.get_face_texcoords(texCoords);
for(unsigned int i = 0; i < num ; ++i)
for(size_t i = 0; i < num ; ++i)
{
texMap[texCoords[i]] = i;
}
@@ -303,7 +303,7 @@ write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _prec
}
// vertex data (point, normals, texcoords)
for (i=0, nV=_be.n_vertices(); i<nV; ++i)
for (size_t i=0, nV=_be.n_vertices(); i<nV; ++i)
{
vh = VertexHandle(int(i));
v = _be.point(vh);
@@ -324,7 +324,7 @@ write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _prec
&& !_opt.check(Options::FaceTexCoord);
// faces (indices starting at 1 not 0)
for (i=0, nF=_be.n_faces(); i<nF; ++i)
for (size_t i=0, nF=_be.n_faces(); i<nF; ++i)
{
if (useMatrial && _opt.check(Options::FaceColor) ){
@@ -351,7 +351,7 @@ write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _prec
_be.get_vhandles(FaceHandle(int(i)), vhandles);
for (j=0; j< vhandles.size(); ++j)
for (size_t j=0; j< vhandles.size(); ++j)
{
// Write vertex index

View File

@@ -97,7 +97,7 @@ class PolyMesh_ArrayKernelT
public:
PolyMesh_ArrayKernelT() {}
template<class OtherTraits>
PolyMesh_ArrayKernelT( const TriMesh_ArrayKernelT<OtherTraits> & t)
explicit PolyMesh_ArrayKernelT( const TriMesh_ArrayKernelT<OtherTraits> & t)
{
//assign the connectivity and standard properties
this->assign(t, true);

View File

@@ -97,7 +97,7 @@ class TriMesh_ArrayKernelT
public:
TriMesh_ArrayKernelT() {}
template<class OtherTraits>
TriMesh_ArrayKernelT( const PolyMesh_ArrayKernelT<OtherTraits> & t)
explicit TriMesh_ArrayKernelT( const PolyMesh_ArrayKernelT<OtherTraits> & t)
{
//assign the connectivity and standard properties
this->assign(t,true);