Fix error when wrapping a library using Rot3 to matlab: "type stored... is N5gtsam4Rot3E but requested type was N5gtsam4Rot3E", because gtsam is linked 2 times: one with the library, one with the mex, and somehow Rot3 is not virtual and exists in both. Moving print implementation to cpp seems to fix this problem.
							parent
							
								
									8cf7b6723f
								
							
						
					
					
						commit
						6959ad5e6f
					
				|  | @ -181,7 +181,7 @@ namespace gtsam { | ||||||
|     /// @{
 |     /// @{
 | ||||||
| 
 | 
 | ||||||
|     /** print */ |     /** print */ | ||||||
|     void print(const std::string& s="R") const { gtsam::print((Matrix)matrix(), s);} |     void print(const std::string& s="R") const; | ||||||
| 
 | 
 | ||||||
|     /** equals with an tolerance */ |     /** equals with an tolerance */ | ||||||
|     bool equals(const Rot3& p, double tol = 1e-9) const; |     bool equals(const Rot3& p, double tol = 1e-9) const; | ||||||
|  |  | ||||||
|  | @ -69,6 +69,11 @@ Rot3::Rot3(const Matrix& R) { | ||||||
| /* ************************************************************************* */ | /* ************************************************************************* */ | ||||||
| Rot3::Rot3(const Quaternion& q) : rot_(q.toRotationMatrix()) {} | Rot3::Rot3(const Quaternion& q) : rot_(q.toRotationMatrix()) {} | ||||||
| 
 | 
 | ||||||
|  | /* ************************************************************************* */ | ||||||
|  | void Rot3::print(const std::string& s) const { | ||||||
|  |   gtsam::print((Matrix)matrix(), s); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| /* ************************************************************************* */ | /* ************************************************************************* */ | ||||||
| Rot3 Rot3::Rx(double t) { | Rot3 Rot3::Rx(double t) { | ||||||
|   double st = sin(t), ct = cos(t); |   double st = sin(t), ct = cos(t); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue