Skip to content

Commit fa74559

Browse files
Merge pull request #2049 from alicevision/fix/landmarkSwig
Upgrade landmark code for swig compatibility
2 parents 52bd09d + af17064 commit fa74559

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/aliceVision/sfmData/Landmark.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ class Landmark
107107
* @brief Get the 3D position of the landmark (non-const version)
108108
* @return Reference to the 3D position vector
109109
*/
110+
#ifndef SWIG
110111
Vec3& getX() { return _X; }
112+
#endif
111113

112114
/**
113115
* @brief Set the 3D position of the landmark
@@ -161,7 +163,9 @@ class Landmark
161163
* @brief Get the RGB color of the landmark (non-const version)
162164
* @return Reference to the RGB color associated with the landmark
163165
*/
166+
#ifndef SWIG
164167
image::RGBColor& getRgb() { return _rgb; }
168+
#endif
165169

166170
/**
167171
* @brief Set the RGB color of the landmark

src/aliceVision/sfmData/Landmark.i

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
%ignore aliceVision::sfmData::Landmark::_observations;
2121
%ignore aliceVision::sfmData::Landmark::_parallaxRobust;
2222
%ignore aliceVision::sfmData::Landmark::_isPrecise;
23+
%ignore aliceVision::sfmData::Landmark::_X;
2324

2425
//Add new swig only C++ code
2526
%extend aliceVision::sfmData::Landmark {
@@ -51,6 +52,7 @@
5152
rgb = property(getRgbVec3, setRgbVec3)
5253
state = property(getState, setState)
5354
descType = property(getDescType, setDescType)
55+
X = property(getX, setX)
5456
%}
5557
}
5658

0 commit comments

Comments
 (0)