summaryrefslogtreecommitdiff
path: root/src/mesh/assimp-master/port/swig/interface/assimp.i
blob: a1b1404a0fc69150e4e0935dd5de7da67f42399a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
%{
#include "assimp.hpp"
%}


namespace Assimp {

// See docs in assimp.hpp.
%ignore Importer::ReadFile(const std::string& pFile, unsigned int pFlags);
%ignore Importer::GetExtensionList(std::string& szOut);
%ignore Importer::IsExtensionSupported(const std::string& szExtension);

// These are only necessary for extending Assimp with custom importers or post
// processing steps, which would require wrapping the internal BaseImporter and
// BaseProcess classes.
%ignore Importer::RegisterLoader(BaseImporter* pImp);
%ignore Importer::UnregisterLoader(BaseImporter* pImp);
%ignore Importer::RegisterPPStep(BaseProcess* pImp);
%ignore Importer::UnregisterPPStep(BaseProcess* pImp);
%ignore Importer::FindLoader(const char* szExtension);

}


// Each aiScene has to keep a reference to the Importer to prevent it from
// being garbage collected, whose destructor would release the underlying
// C++ memory the scene is stored in.
%typemap(dcode) aiScene "package Object m_importer;"
%typemap(dout)
    aiScene* GetScene,
    aiScene* ReadFile,
    aiScene* ApplyPostProcessing,
    aiScene* ReadFileFromMemory {
  void* cPtr = $wcall;
  $dclassname ret = (cPtr is null) ? null : new $dclassname(cPtr, $owner);$excode
  ret.m_importer = this;
  return ret;
}

%include <typemaps.i>
%apply bool *OUTPUT { bool *bWasExisting };

%include "assimp.hpp"

%clear bool *bWasExisting;