Skip to content

Commit c07e178

Browse files
Fabien Servantcbentejac
authored andcommitted
add swig support for intrinsics
1 parent 3ae1b80 commit c07e178

File tree

6 files changed

+26
-6
lines changed

6 files changed

+26
-6
lines changed

src/aliceVision/aliceVision.i

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,12 @@
1919

2020
%{
2121
#include <aliceVision/version.hpp>
22+
23+
//For unknown reason, we need to declare cameras here too
24+
#include <aliceVision/camera/IntrinsicBase.hpp>
25+
#include <aliceVision/camera/Pinhole.hpp>
26+
#include <aliceVision/camera/Equidistant.hpp>
27+
2228
using namespace aliceVision;
29+
2330
%}

src/aliceVision/camera/Equidistant.i

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// v. 2.0. If a copy of the MPL was not distributed with this file,
55
// You can obtain one at https://mozilla.org/MPL/2.0/.
66

7+
%include <std_shared_ptr.i>
8+
%shared_ptr(aliceVision::camera::Equidistant)
9+
710
%include <aliceVision/camera/IntrinsicScaleOffsetDisto.i>
811
%include <aliceVision/camera/Equidistant.hpp>
912

src/aliceVision/camera/IntrinsicBase.i

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
// v. 2.0. If a copy of the MPL was not distributed with this file,
55
// You can obtain one at https://mozilla.org/MPL/2.0/.
66

7-
8-
%include <aliceVision/camera/IntrinsicBase.hpp>
7+
%include <std_shared_ptr.i>
8+
%shared_ptr(aliceVision::camera::IntrinsicBase)
99

1010
%{
1111
#include <aliceVision/camera/IntrinsicBase.hpp>
12-
using namespace aliceVision;
13-
using namespace aliceVision::camera;
1412
%}
13+
14+
%include <aliceVision/camera/IntrinsicBase.hpp>

src/aliceVision/camera/IntrinsicScaleOffset.i

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// v. 2.0. If a copy of the MPL was not distributed with this file,
55
// You can obtain one at https://mozilla.org/MPL/2.0/.
66

7+
%include <std_shared_ptr.i>
8+
%shared_ptr(aliceVision::camera::IntrinsicScaleOffset)
9+
710
%include <aliceVision/camera/IntrinsicBase.i>
811
%include <aliceVision/camera/IntrinsicScaleOffset.hpp>
912

src/aliceVision/camera/IntrinsicScaleOffsetDisto.i

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// v. 2.0. If a copy of the MPL was not distributed with this file,
55
// You can obtain one at https://mozilla.org/MPL/2.0/.
66

7+
%include <std_shared_ptr.i>
8+
%shared_ptr(aliceVision::camera::IntrinsicScaleOffsetDisto)
9+
710
%include <aliceVision/camera/IntrinsicScaleOffset.i>
811
%include <aliceVision/camera/IntrinsicScaleOffsetDisto.hpp>
912

src/aliceVision/camera/Pinhole.i

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
// v. 2.0. If a copy of the MPL was not distributed with this file,
55
// You can obtain one at https://mozilla.org/MPL/2.0/.
66

7-
%include <aliceVision/camera/IntrinsicScaleOffsetDisto.i>
8-
%include <aliceVision/camera/Pinhole.hpp>
7+
%include <std_shared_ptr.i>
8+
%shared_ptr(aliceVision::camera::Pinhole)
9+
910

1011
%{
1112
#include <aliceVision/camera/Pinhole.hpp>
1213
using namespace aliceVision;
1314
using namespace aliceVision::camera;
1415
%}
16+
17+
%include <aliceVision/camera/IntrinsicScaleOffsetDisto.i>
18+
%include <aliceVision/camera/Pinhole.hpp>

0 commit comments

Comments
 (0)