PLYExporter: forbit copying + add empty destructor.

pull/756/head
Kim Kulling 2016-01-14 20:44:09 +01:00
parent 8f70830103
commit 8c13c8a558
2 changed files with 20 additions and 15 deletions

View File

@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "qnan.h" #include "qnan.h"
using namespace Assimp; //using namespace Assimp;
namespace Assimp { namespace Assimp {
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -86,8 +86,6 @@ void ExportScenePlyBinary(const char* pFile, IOSystem* pIOSystem, const aiScene*
outfile->Write(exporter.mOutput.str().c_str(), static_cast<size_t>(exporter.mOutput.tellp()), 1); outfile->Write(exporter.mOutput.str().c_str(), static_cast<size_t>(exporter.mOutput.tellp()), 1);
} }
} // end of namespace Assimp
#define PLY_EXPORT_HAS_NORMALS 0x1 #define PLY_EXPORT_HAS_NORMALS 0x1
#define PLY_EXPORT_HAS_TANGENTS_BITANGENTS 0x2 #define PLY_EXPORT_HAS_TANGENTS_BITANGENTS 0x2
#define PLY_EXPORT_HAS_TEXCOORDS 0x4 #define PLY_EXPORT_HAS_TEXCOORDS 0x4
@ -216,6 +214,11 @@ PlyExporter::PlyExporter(const char* _filename, const aiScene* pScene, bool bina
} }
} }
// ------------------------------------------------------------------------------------------------
PlyExporter::~PlyExporter() {
// empty
}
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
void PlyExporter::WriteMeshVerts(const aiMesh* m, unsigned int components) void PlyExporter::WriteMeshVerts(const aiMesh* m, unsigned int components)
{ {
@ -367,4 +370,6 @@ void PlyExporter::WriteMeshIndicesBinary(const aiMesh* m, unsigned int offset)
WriteMeshIndicesBinary_Generic<unsigned char, int>(m, offset, mOutput); WriteMeshIndicesBinary_Generic<unsigned char, int>(m, offset, mOutput);
} }
#endif } // end of namespace Assimp
#endif // !defined(ASSIMP_BUILD_NO_EXPORT) && !defined(ASSIMP_BUILD_NO_PLY_EXPORTER)

View File

@ -59,30 +59,30 @@ namespace Assimp
class PlyExporter class PlyExporter
{ {
public: public:
/// Constructor for a specific scene to export /// The class constructor for a specific scene to export
PlyExporter(const char* filename, const aiScene* pScene, bool binary = false); PlyExporter(const char* filename, const aiScene* pScene, bool binary = false);
/// The class destructor, empty.
~PlyExporter();
public: public:
/// public string-streams to write all output into:
/// public stringstreams to write all output into
std::ostringstream mOutput; std::ostringstream mOutput;
private: private:
void WriteMeshVerts(const aiMesh* m, unsigned int components); void WriteMeshVerts(const aiMesh* m, unsigned int components);
void WriteMeshIndices(const aiMesh* m, unsigned int ofs); void WriteMeshIndices(const aiMesh* m, unsigned int ofs);
void WriteMeshVertsBinary(const aiMesh* m, unsigned int components); void WriteMeshVertsBinary(const aiMesh* m, unsigned int components);
void WriteMeshIndicesBinary(const aiMesh* m, unsigned int offset); void WriteMeshIndicesBinary(const aiMesh* m, unsigned int offset);
private: private:
const std::string filename; // tHE FILENAME
const std::string endl; // obviously, this endl() doesn't flush() the stream
const std::string filename; private:
PlyExporter( const PlyExporter & );
// obviously, this endl() doesn't flush() the stream PlyExporter &operator = ( const PlyExporter & );
const std::string endl;
}; };
} } // Namespace Assimp
#endif #endif // AI_PLYEXPORTER_H_INC