review findings.

pull/3196/head
Kim Kulling 2020-04-29 20:33:37 +02:00
parent 2273160f2c
commit fd555a1349
3 changed files with 48 additions and 50 deletions

View File

@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2020, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,

View File

@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2020, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,

View File

@ -52,23 +52,24 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_EXPORT
// Public ASSIMP data structures
#include <assimp/types.h>
#ifdef __cplusplus
extern "C" {
#endif
struct aiScene; // aiScene.h
struct aiFileIO; // aiFileIO.h
struct aiScene;
struct aiFileIO;
// --------------------------------------------------------------------------------
/** Describes an file format which Assimp can export to. Use #aiGetExportFormatCount() to
* learn how many export formats the current Assimp build supports and #aiGetExportFormatDescription()
* to retrieve a description of an export format option.
/**
* @brief Describes an file format which Assimp can export to.
*
* Use #aiGetExportFormatCount() to learn how many export-formats are supported by
* the current Assimp-build and #aiGetExportFormatDescription() to retrieve the
* description of the export format option.
*/
struct aiExportFormatDesc
{
struct aiExportFormatDesc {
/// a short string ID to uniquely identify the export format. Use this ID string to
/// specify which file format you want to export to when calling #aiExportScene().
/// Example: "dae" or "obj"
@ -82,7 +83,6 @@ struct aiExportFormatDesc
const char *fileExtension;
};
// --------------------------------------------------------------------------------
/** Returns the number of export file formats available in the current Assimp build.
* Use aiGetExportFormatDescription() to retrieve infos of a specific export format.
@ -118,7 +118,6 @@ ASSIMP_API void aiReleaseExportFormatDescription( const C_STRUCT aiExportFormatD
ASSIMP_API void aiCopyScene(const C_STRUCT aiScene *pIn,
C_STRUCT aiScene **pOut);
// --------------------------------------------------------------------------------
/** Frees a scene copy created using aiCopyScene() */
ASSIMP_API void aiFreeScene(const C_STRUCT aiScene *pIn);
@ -154,9 +153,9 @@ ASSIMP_API void aiFreeScene(const C_STRUCT aiScene* pIn);
* triangulate data so they would run the step anyway.
*
* If assimp detects that the input scene was directly taken from the importer side of
* the library (i.e. not copied using aiCopyScene and potetially modified afterwards),
* any postprocessing steps already applied to the scene will not be applied again, unless
* they show non-idempotent behaviour (#aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and
* the library (i.e. not copied using aiCopyScene and potentially modified afterwards),
* any post-processing steps already applied to the scene will not be applied again, unless
* they show non-idempotent behavior (#aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and
* #aiProcess_FlipWindingOrder).
* @return a status code indicating the result of the export
* @note Use aiCopyScene() to get a modifiable copy of a previously
@ -167,7 +166,6 @@ ASSIMP_API aiReturn aiExportScene( const C_STRUCT aiScene* pScene,
const char *pFileName,
unsigned int pPreprocessing);
// --------------------------------------------------------------------------------
/** Exports the given scene to a chosen file format using custom IO logic supplied by you.
* @param pScene The scene to export. Stays in possession of the caller, is not changed by the function.
@ -199,8 +197,7 @@ ASSIMP_API aiReturn aiExportSceneEx( const C_STRUCT aiScene* pScene,
* This is used when exporters write more than one output file for a given #aiScene. See the remarks for
* #aiExportDataBlob::name for more information.
*/
struct aiExportDataBlob
{
struct aiExportDataBlob {
/// Size of the data in bytes
size_t size;
@ -226,14 +223,19 @@ struct aiExportDataBlob
#ifdef __cplusplus
/// Default constructor
aiExportDataBlob() { size = 0; data = next = NULL; }
aiExportDataBlob() {
size = 0;
data = next = nullptr;
}
/// Releases the data
~aiExportDataBlob() { delete [] static_cast<unsigned char*>( data ); delete next; }
~aiExportDataBlob() {
delete[] static_cast<unsigned char *>(data);
delete next;
}
aiExportDataBlob(const aiExportDataBlob &) = delete;
aiExportDataBlob &operator=(const aiExportDataBlob &) = delete;
private:
// no copying
aiExportDataBlob(const aiExportDataBlob& );
aiExportDataBlob& operator= (const aiExportDataBlob& );
#endif // __cplusplus
};