@@ -11,7 +11,7 @@ use retrofire_core::math::{
1111 Angle , Lerp , Parametric , Point3 , Vary , Vec3 , polar, pt2, pt3, rotate2,
1212 turns, vec2, vec3,
1313} ;
14- use retrofire_core:: render:: { TexCoord , uv} ;
14+ use retrofire_core:: render:: { Model , TexCoord , uv} ;
1515
1616use super :: Build ;
1717
@@ -96,7 +96,7 @@ impl<P: Parametric<Vertex2<Normal2, ()>>> Lathe<P> {
9696 /// Builds the lathe mesh.
9797 pub fn build_with < A , F > ( self , mut f : F ) -> Mesh < A >
9898 where
99- F : FnMut ( Point3 , Normal3 , TexCoord ) -> Vertex3 < A > ,
99+ F : FnMut ( Point3 , Normal3 < Model > , TexCoord ) -> Vertex3 < A > ,
100100 {
101101 let secs = self . sectors as usize ;
102102 let segs = self . segments as usize ;
@@ -155,7 +155,7 @@ fn create_faces(secs: usize, verts_per_sec: usize, out: &mut Vec<Tri<usize>>) {
155155
156156#[ inline( never) ]
157157fn create_verts < A > (
158- f : & mut dyn FnMut ( Point3 , Normal3 , TexCoord ) -> Vertex3 < A > ,
158+ f : & mut dyn FnMut ( Point3 , Normal3 < Model > , TexCoord ) -> Vertex3 < A > ,
159159 pts : & dyn Parametric < Vertex2 < Normal2 , ( ) > > ,
160160 secs : usize ,
161161 verts_per_sec : usize ,
@@ -188,9 +188,9 @@ fn create_verts<A>(
188188
189189fn make_cap < A > (
190190 m : & mut Mesh < A > ,
191- f : & mut dyn FnMut ( Point3 , Normal3 , TexCoord ) -> Vertex3 < A > ,
191+ f : & mut dyn FnMut ( Point3 , Normal3 < Model > , TexCoord ) -> Vertex3 < A > ,
192192 rg : Range < usize > ,
193- n : Normal3 ,
193+ n : Normal3 < Model > ,
194194) {
195195 let verts = & mut m. verts ;
196196 let secs = rg. len ( ) ;
@@ -214,8 +214,8 @@ fn make_cap<A>(
214214// Local trait impls
215215//
216216
217- impl < P : Parametric < Vertex2 < Normal2 , ( ) > > > Build < Normal3 > for Lathe < P > {
218- fn build ( self ) -> Mesh < Normal3 > {
217+ impl < P : Parametric < Vertex2 < Normal2 , ( ) > > > Build < Normal3 < Model > > for Lathe < P > {
218+ fn build ( self ) -> Mesh < Normal3 < Model > > {
219219 self . build_with ( |p, n, _| vertex ( p. to ( ) , n) )
220220 }
221221}
@@ -224,10 +224,10 @@ impl<P: Parametric<Vertex2<Normal2, ()>>> Build<TexCoord> for Lathe<P> {
224224 self . build_with ( |p, _, tc| vertex ( p. to ( ) , tc) )
225225 }
226226}
227- impl < P : Parametric < Vertex2 < Normal2 , ( ) > > > Build < ( Normal3 , TexCoord ) >
227+ impl < P : Parametric < Vertex2 < Normal2 , ( ) > > > Build < ( Normal3 < Model > , TexCoord ) >
228228 for Lathe < P >
229229{
230- fn build ( self ) -> Mesh < ( Normal3 , TexCoord ) > {
230+ fn build ( self ) -> Mesh < ( Normal3 < Model > , TexCoord ) > {
231231 self . build_with ( |p, n, tc| vertex ( p. to ( ) , ( n, tc) ) )
232232 }
233233}
@@ -244,9 +244,9 @@ impl Sphere {
244244 }
245245}
246246
247- impl Build < Normal3 > for Sphere {
247+ impl Build < Normal3 < Model > > for Sphere {
248248 /// Builds a spherical mesh with normals.
249- fn build ( self ) -> Mesh < Normal3 > {
249+ fn build ( self ) -> Mesh < Normal3 < Model > > {
250250 self . lathe ( ) . build ( )
251251 }
252252}
@@ -267,9 +267,9 @@ impl Torus {
267267 Lathe :: new ( pts, self . major_sectors , self . minor_sectors )
268268 }
269269}
270- impl Build < Normal3 > for Torus {
270+ impl Build < Normal3 < Model > > for Torus {
271271 /// Builds the toroidal mesh.
272- fn build ( self ) -> Mesh < Normal3 > {
272+ fn build ( self ) -> Mesh < Normal3 < Model > > {
273273 self . lathe ( ) . build ( )
274274 }
275275}
@@ -280,9 +280,9 @@ impl Build<TexCoord> for Torus {
280280 }
281281}
282282
283- impl Build < Normal3 > for Cylinder {
283+ impl Build < Normal3 < Model > > for Cylinder {
284284 /// Builds the cylindrical mesh.
285- fn build ( self ) -> Mesh < Normal3 > {
285+ fn build ( self ) -> Mesh < Normal3 < Model > > {
286286 #[ rustfmt:: skip]
287287 let Self { sectors, segments, capped, radius } = self ;
288288 Cone {
@@ -326,9 +326,9 @@ impl Cone {
326326 Lathe :: new ( pts, self . sectors , self . segments ) . capped ( self . capped )
327327 }
328328}
329- impl Build < Normal3 > for Cone {
329+ impl Build < Normal3 < Model > > for Cone {
330330 /// Builds the conical mesh.
331- fn build ( self ) -> Mesh < Normal3 > {
331+ fn build ( self ) -> Mesh < Normal3 < Model > > {
332332 self . lathe ( ) . build ( )
333333 }
334334}
@@ -377,9 +377,9 @@ impl Capsule {
377377 }
378378}
379379
380- impl Build < Normal3 > for Capsule {
380+ impl Build < Normal3 < Model > > for Capsule {
381381 /// Builds the capsule mesh.
382- fn build ( self ) -> Mesh < Normal3 > {
382+ fn build ( self ) -> Mesh < Normal3 < Model > > {
383383 self . lathe ( ) . build ( )
384384 }
385385}
@@ -394,7 +394,7 @@ impl Build<TexCoord> for Capsule {
394394mod tests {
395395 use super :: * ;
396396
397- type Mesh = super :: Mesh < Normal3 > ;
397+ type Mesh = super :: Mesh < Normal3 < Model > > ;
398398
399399 #[ test]
400400 fn sphere_verts_faces ( ) {
0 commit comments