Merge branch 'master' of https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh into fixMissingProperties
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
<li>OBJ Loader: range check for vertex colors and normals in OBJ loader</li>
|
<li>OBJ Loader: range check for vertex colors and normals in OBJ loader</li>
|
||||||
<li>OBJ Loader: fixed handling of negative indices in OBJ loader</li>
|
<li>OBJ Loader: fixed handling of negative indices in OBJ loader</li>
|
||||||
<li>OM Writer: Fixed OMWriter when no faces are available (Thanks to Jamie Kydd for the patch)</li>
|
<li>OM Writer: Fixed OMWriter when no faces are available (Thanks to Jamie Kydd for the patch)</li>
|
||||||
|
<li>OM Writer: Added Mark to the format header to identify end of stream correctly (Thanks to Jamie Kydd for the patch)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<b>Unittests</b>
|
<b>Unittests</b>
|
||||||
|
|||||||
@@ -180,6 +180,12 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QuadricT<Scalar> operator+(const QuadricT<Scalar>& _other ) const
|
||||||
|
{
|
||||||
|
QuadricT<Scalar> result = *this;
|
||||||
|
return result += _other;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// multiply by scalar
|
/// multiply by scalar
|
||||||
QuadricT<Scalar>& operator*=( Scalar _s)
|
QuadricT<Scalar>& operator*=( Scalar _s)
|
||||||
@@ -191,6 +197,11 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QuadricT<Scalar> operator*(Scalar _s) const
|
||||||
|
{
|
||||||
|
QuadricT<Scalar> result = *this;
|
||||||
|
return result *= _s;
|
||||||
|
}
|
||||||
|
|
||||||
/// multiply 4D vector from right: Q*v
|
/// multiply 4D vector from right: Q*v
|
||||||
template <class _Vec4>
|
template <class _Vec4>
|
||||||
|
|||||||
@@ -179,7 +179,8 @@ namespace OMFormat {
|
|||||||
Entity_Mesh = 0x01,
|
Entity_Mesh = 0x01,
|
||||||
Entity_Face = 0x02,
|
Entity_Face = 0x02,
|
||||||
Entity_Edge = 0x04,
|
Entity_Edge = 0x04,
|
||||||
Entity_Halfedge = 0x06
|
Entity_Halfedge = 0x06,
|
||||||
|
Entity_Sentinel = 0x07
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Dim {
|
enum Dim {
|
||||||
|
|||||||
@@ -211,6 +211,8 @@ bool _OMReader_::read_binary(std::istream& _is, BaseImporter& _bi, Options& _opt
|
|||||||
if (!read_binary_mesh_chunk(_is, _bi, _opt, swap))
|
if (!read_binary_mesh_chunk(_is, _bi, _opt, swap))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
case OMFormat::Chunk::Entity_Sentinel:
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -430,6 +430,11 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
|
|||||||
OMFormat::Chunk::Entity_Mesh, swap );
|
OMFormat::Chunk::Entity_Mesh, swap );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(&chunk_header, 0, sizeof(chunk_header));
|
||||||
|
chunk_header.name_ = false;
|
||||||
|
chunk_header.entity_ = OMFormat::Chunk::Entity_Sentinel;
|
||||||
|
bytes += store(_os, chunk_header, swap);
|
||||||
|
|
||||||
std::clog << "#bytes written: " << bytes << std::endl;
|
std::clog << "#bytes written: " << bytes << std::endl;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user