1515//! - [`IntoVtkUnstructuredGridPiece`] to convert basic meshes and meshes with attached attributes to the
1616//! - [`IntoVtkDataSet`] for all meshes implementing [`IntoVtkUnstructuredGridPiece`] to directly save a mesh as a VTK file
1717
18- use crate :: { Aabb3d , MapType , Real , RealConvert , new_map, profile} ;
18+ use crate :: { Aabb3d , MapType , Real , RealConvert , Scalar , new_map, profile} ;
1919use bytemuck_derive:: { Pod , Zeroable } ;
2020use nalgebra:: { Unit , Vector3 } ;
2121use rayon:: prelude:: * ;
@@ -159,7 +159,7 @@ impl<R: Real> TriMesh3dExt<R> for TriMesh3d<R> {
159159///
160160/// The attribute data can be owned or borrowed.
161161#[ derive( Clone , Debug ) ]
162- pub struct MeshAttribute < ' a , R : Real > {
162+ pub struct MeshAttribute < ' a , R : Scalar > {
163163 /// Name of the attribute
164164 pub name : String ,
165165 /// Data of the attribute
@@ -174,7 +174,7 @@ pub type OwnedMeshAttribute<R> = MeshAttribute<'static, R>;
174174/// Each value in the data-set is associated to a point or cell of the mesh.
175175/// Data can be owned or borrowed.
176176#[ derive( Clone , Debug ) ]
177- pub enum AttributeData < ' a , R : Real > {
177+ pub enum AttributeData < ' a , R : Scalar > {
178178 ScalarU64 ( Cow < ' a , [ u64 ] > ) ,
179179 ScalarReal ( Cow < ' a , [ R ] > ) ,
180180 Vector3Real ( Cow < ' a , [ Vector3 < R > ] > ) ,
@@ -185,7 +185,7 @@ pub type OwnedAttributeData<R> = AttributeData<'static, R>;
185185
186186/// A triangle (surface) mesh in 3D
187187#[ derive( Clone , Debug , Default ) ]
188- pub struct TriMesh3d < R : Real > {
188+ pub struct TriMesh3d < R : Scalar > {
189189 /// Coordinates of all vertices of the mesh
190190 pub vertices : Vec < Vector3 < R > > ,
191191 /// The triangles of the mesh identified by their vertex indices
@@ -229,7 +229,7 @@ impl TriangleOrQuadCell {
229229
230230/// A surface mesh in 3D containing cells representing either triangles or quadrilaterals
231231#[ derive( Clone , Debug , Default ) ]
232- pub struct MixedTriQuadMesh3d < R : Real > {
232+ pub struct MixedTriQuadMesh3d < R : Scalar > {
233233 /// Coordinates of all vertices of the mesh
234234 pub vertices : Vec < Vector3 < R > > ,
235235 /// All triangle and quad cells of the mesh
@@ -238,7 +238,7 @@ pub struct MixedTriQuadMesh3d<R: Real> {
238238
239239/// A hexahedral (volumetric) mesh in 3D
240240#[ derive( Clone , Debug , Default ) ]
241- pub struct HexMesh3d < R : Real > {
241+ pub struct HexMesh3d < R : Scalar > {
242242 /// Coordinates of all vertices of the mesh
243243 pub vertices : Vec < Vector3 < R > > ,
244244 /// The hexahedral cells of the mesh identified by their vertex indices
@@ -247,7 +247,7 @@ pub struct HexMesh3d<R: Real> {
247247
248248/// A point cloud in 3D
249249#[ derive( Clone , Debug , Default ) ]
250- pub struct PointCloud3d < R : Real > {
250+ pub struct PointCloud3d < R : Scalar > {
251251 /// Coordinates of all points in the point cloud
252252 points : Vec < Vector3 < R > > ,
253253 /// Indices of the points (for `CellConnectivity`)
@@ -330,7 +330,7 @@ where
330330 }
331331 }
332332
333- /// Removes all cells from the mesh that are completely outside of the given AABB and clamps the remaining cells to the boundary
333+ /// Removes all cells from the mesh that are completely outside the given AABB and clamps the remaining cells to the boundary
334334 fn par_clamp_with_aabb (
335335 & self ,
336336 aabb : & Aabb3d < R > ,
0 commit comments