@@ -18,7 +18,7 @@ use crate::mesh::Vertex;
1818#[ cfg( feature = "parallel" ) ]
1919use crate :: math_ndsp:: consts:: EPSILON ;
2020
21- impl < S : Clone + Send + Sync + Debug > Node < S > {
21+ impl < S : Clone + Send + Sync + Debug , T > Node < S , T > {
2222 /// Invert all polygons in the BSP tree using iterative approach to avoid stack overflow
2323 #[ cfg( feature = "parallel" ) ]
2424 pub fn invert ( & mut self ) {
@@ -47,7 +47,7 @@ impl<S: Clone + Send + Sync + Debug> Node<S> {
4747
4848 /// Parallel version of clip Polygons
4949 #[ cfg( feature = "parallel" ) ]
50- pub fn clip_polygons ( & self , polygons : & [ Polygon < S > ] ) -> Vec < Polygon < S > > {
50+ pub fn clip_polygons ( & self , polygons : & [ Polygon < S , T > ] ) -> Vec < Polygon < S , T > > {
5151 // If this node has no plane, just return the original set
5252 if self . plane . is_none ( ) {
5353 return polygons. to_vec ( ) ;
@@ -102,7 +102,7 @@ impl<S: Clone + Send + Sync + Debug> Node<S> {
102102
103103 /// Parallel version of `clip_to` using iterative approach to avoid stack overflow
104104 #[ cfg( feature = "parallel" ) ]
105- pub fn clip_to ( & mut self , bsp : & Node < S > ) {
105+ pub fn clip_to ( & mut self , bsp : & Node < S , T > ) {
106106 // Use iterative approach with a stack to avoid recursive stack overflow
107107 let mut stack = vec ! [ self ] ;
108108
@@ -122,7 +122,7 @@ impl<S: Clone + Send + Sync + Debug> Node<S> {
122122
123123 /// Parallel version of `build`.
124124 #[ cfg( feature = "parallel" ) ]
125- pub fn build ( & mut self , polygons : & [ Polygon < S > ] ) {
125+ pub fn build ( & mut self , polygons : & [ Polygon < S , T > ] ) {
126126 if polygons. is_empty ( ) {
127127 return ;
128128 }
@@ -167,7 +167,7 @@ impl<S: Clone + Send + Sync + Debug> Node<S> {
167167
168168 // Parallel slice
169169 #[ cfg( feature = "parallel" ) ]
170- pub fn slice ( & self , slicing_plane : & Plane ) -> ( Vec < Polygon < S > > , Vec < [ Vertex ; 2 ] > ) {
170+ pub fn slice ( & self , slicing_plane : & Plane < T > ) -> ( Vec < Polygon < S , T > > , Vec < [ Vertex ; 2 ] > ) {
171171 // Collect all polygons (this can be expensive, but let's do it).
172172 let all_polys = self . all_polygons ( ) ;
173173
0 commit comments