mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Added measuring sandbox for neighbors index creation
This commit is contained in:
		
							parent
							
								
									c542e6e14b
								
							
						
					
					
						commit
						c8be2cdceb
					
				
					 11 changed files with 988 additions and 266 deletions
				
			
		|  | @ -21,6 +21,12 @@ class MultiPoint; | |||
| class Point; | ||||
| using Vector = Point; | ||||
| 
 | ||||
| // Base template for eigen derived vectors
 | ||||
| template<int N, int M, class T> | ||||
| using Mat = Eigen::Matrix<T, N, M, Eigen::DontAlign, N, M>; | ||||
| 
 | ||||
| template<int N, class T> using Vec = Mat<N, 1, T>; | ||||
| 
 | ||||
| // Eigen types, to replace the Slic3r's own types in the future.
 | ||||
| // Vector types with a fixed point coordinate base type.
 | ||||
| using Vec2crd = Eigen::Matrix<coord_t,  2, 1, Eigen::DontAlign>; | ||||
|  | @ -488,4 +494,18 @@ namespace cereal { | |||
| 	template<class Archive> void save(Archive& archive, Slic3r::Matrix2f &m) { archive.saveBinary((char*)m.data(), sizeof(float) * 4); } | ||||
| } | ||||
| 
 | ||||
| namespace Eigen { | ||||
| template<class T, int N, int M> | ||||
| T* begin(Slic3r::Mat<N, M, T> &mat) { return mat.data(); } | ||||
| 
 | ||||
| template<class T, int N, int M> | ||||
| T* end(Slic3r::Mat<N, M, T> &mat) { return mat.data() + N * M; } | ||||
| 
 | ||||
| template<class T, int N, int M> | ||||
| const T* begin(const Slic3r::Mat<N, M, T> &mat) { return mat.data(); } | ||||
| 
 | ||||
| template<class T, int N, int M> | ||||
| const T* end(const Slic3r::Mat<N, M, T> &mat) { return mat.data() + N * M; } | ||||
| } // namespace Eigen
 | ||||
| 
 | ||||
| #endif | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tamasmeszaros
						tamasmeszaros