@@ -31,18 +31,20 @@ pub struct Aabb {
3131}
3232
3333impl Aabb {
34- /// The vertex indices of each edge of this Aabb.
34+ /// The vertex indices of each edge of this ` Aabb` .
3535 ///
36- /// This gives, for each edge of this Aabb, the indices of its
36+ /// This gives, for each edge of this ` Aabb` , the indices of its
3737 /// vertices when taken from the `self.vertices()` array.
3838 /// Here is how the faces are numbered, assuming
3939 /// a right-handed coordinate system:
4040 ///
41+ /// ```text
4142 /// y 3 - 2
4243 /// | 7 − 6 |
43- /// ___ x | | 1 (the zero is bellow 3 and on the left of 1, hidden by the 4-5-6-7 face.)
44- /// / 4 - 5
44+ /// ___ x | | 1 (the zero is below 3 and on the left of 1,
45+ /// / 4 - 5 hidden by the 4-5-6-7 face.)
4546 /// z
47+ /// ```
4648 #[ cfg( feature = "dim3" ) ]
4749 pub const EDGES_VERTEX_IDS : [ ( usize , usize ) ; 12 ] = [
4850 ( 0 , 1 ) ,
@@ -59,18 +61,20 @@ impl Aabb {
5961 ( 3 , 7 ) ,
6062 ] ;
6163
62- /// The vertex indices of each face of this Aabb.
64+ /// The vertex indices of each face of this ` Aabb` .
6365 ///
64- /// This gives, for each face of this Aabb, the indices of its
66+ /// This gives, for each face of this ` Aabb` , the indices of its
6567 /// vertices when taken from the `self.vertices()` array.
6668 /// Here is how the faces are numbered, assuming
6769 /// a right-handed coordinate system:
6870 ///
71+ /// ```text
6972 /// y 3 - 2
7073 /// | 7 − 6 |
71- /// ___ x | | 1 (the zero is bellow 3 and on the left of 1, hidden by the 4-5-6-7 face.)
72- /// / 4 - 5
74+ /// ___ x | | 1 (the zero is below 3 and on the left of 1,
75+ /// / 4 - 5 hidden by the 4-5-6-7 face.)
7376 /// z
77+ /// ```
7478 #[ cfg( feature = "dim3" ) ]
7579 pub const FACES_VERTEX_IDS : [ ( usize , usize , usize , usize ) ; 6 ] = [
7680 ( 1 , 2 , 6 , 5 ) ,
@@ -92,9 +96,9 @@ impl Aabb {
9296 Aabb { mins, maxs }
9397 }
9498
95- /// Creates an invalid Aabb with `mins` components set to `Real::max_values` and `maxs`components set to `-Real::max_values`.
99+ /// Creates an invalid ` Aabb` with `mins` components set to `Real::max_values` and `maxs`components set to `-Real::max_values`.
96100 ///
97- /// This is often used as the initial values of some Aabb merging algorithms.
101+ /// This is often used as the initial values of some ` Aabb` merging algorithms.
98102 #[ inline]
99103 pub fn new_invalid ( ) -> Self {
100104 Self :: new (
@@ -103,34 +107,34 @@ impl Aabb {
103107 )
104108 }
105109
106- /// Creates a new Aabb from its center and its half-extents.
110+ /// Creates a new ` Aabb` from its center and its half-extents.
107111 #[ inline]
108112 pub fn from_half_extents ( center : Point < Real > , half_extents : Vector < Real > ) -> Self {
109113 Self :: new ( center - half_extents, center + half_extents)
110114 }
111115
112- /// Creates a new Aabb from a set of points.
116+ /// Creates a new ` Aabb` from a set of points.
113117 pub fn from_points < ' a , I > ( pts : I ) -> Self
114118 where
115119 I : IntoIterator < Item = & ' a Point < Real > > ,
116120 {
117121 super :: aabb_utils:: local_point_cloud_aabb ( pts)
118122 }
119123
120- /// The center of this Aabb.
124+ /// The center of this ` Aabb` .
121125 #[ inline]
122126 pub fn center ( & self ) -> Point < Real > {
123127 na:: center ( & self . mins , & self . maxs )
124128 }
125129
126- /// The half extents of this Aabb.
130+ /// The half extents of this ` Aabb` .
127131 #[ inline]
128132 pub fn half_extents ( & self ) -> Vector < Real > {
129133 let half: Real = na:: convert :: < f64 , Real > ( 0.5 ) ;
130134 ( self . maxs - self . mins ) * half
131135 }
132136
133- /// The volume of this Aabb.
137+ /// The volume of this ` Aabb` .
134138 #[ inline]
135139 pub fn volume ( & self ) -> Real {
136140 let extents = self . extents ( ) ;
@@ -140,19 +144,19 @@ impl Aabb {
140144 return extents. x * extents. y * extents. z ;
141145 }
142146
143- /// The extents of this Aabb.
147+ /// The extents of this ` Aabb` .
144148 #[ inline]
145149 pub fn extents ( & self ) -> Vector < Real > {
146150 self . maxs - self . mins
147151 }
148152
149- /// Enlarges this Aabb so it also contains the point `pt`.
153+ /// Enlarges this ` Aabb` so it also contains the point `pt`.
150154 pub fn take_point ( & mut self , pt : Point < Real > ) {
151155 self . mins = self . mins . coords . inf ( & pt. coords ) . into ( ) ;
152156 self . maxs = self . maxs . coords . sup ( & pt. coords ) . into ( ) ;
153157 }
154158
155- /// Computes the Aabb bounding `self` transformed by `m`.
159+ /// Computes the ` Aabb` bounding `self` transformed by `m`.
156160 #[ inline]
157161 pub fn transform_by ( & self , m : & Isometry < Real > ) -> Self {
158162 let ls_center = self . center ( ) ;
@@ -172,7 +176,7 @@ impl Aabb {
172176 }
173177 }
174178
175- /// The smallest bounding sphere containing this Aabb.
179+ /// The smallest bounding sphere containing this ` Aabb` .
176180 #[ inline]
177181 pub fn bounding_sphere ( & self ) -> BoundingSphere {
178182 let center = self . center ( ) ;
@@ -191,7 +195,7 @@ impl Aabb {
191195 true
192196 }
193197
194- /// Computes the intersection of this Aabb and another one.
198+ /// Computes the intersection of this ` Aabb` and another one.
195199 pub fn intersection ( & self , other : & Aabb ) -> Option < Aabb > {
196200 let result = Aabb {
197201 mins : Point :: from ( self . mins . coords . sup ( & other. mins . coords ) ) ,
@@ -207,17 +211,17 @@ impl Aabb {
207211 Some ( result)
208212 }
209213
210- /// Returns the difference between this Aabb and `rhs`.
214+ /// Returns the difference between this ` Aabb` and `rhs`.
211215 ///
212- /// Removing another Aabb from `self` will result in zero, one, or up to 4 (in 2D) or 8 (in 3D)
216+ /// Removing another ` Aabb` from `self` will result in zero, one, or up to 4 (in 2D) or 8 (in 3D)
213217 /// new smaller Aabbs.
214218 pub fn difference ( & self , rhs : & Aabb ) -> ArrayVec < Self , TWO_DIM > {
215219 self . difference_with_cut_sequence ( rhs) . 0
216220 }
217221
218- /// Returns the difference between this Aabb and `rhs`.
222+ /// Returns the difference between this ` Aabb` and `rhs`.
219223 ///
220- /// Removing another Aabb from `self` will result in zero, one, or up to 4 (in 2D) or 8 (in 3D)
224+ /// Removing another ` Aabb` from `self` will result in zero, one, or up to 4 (in 2D) or 8 (in 3D)
221225 /// new smaller Aabbs.
222226 ///
223227 /// # Return
@@ -272,7 +276,7 @@ impl Aabb {
272276 ( result, cut_sequence)
273277 }
274278
275- /// Computes the vertices of this Aabb.
279+ /// Computes the vertices of this ` Aabb` .
276280 #[ inline]
277281 #[ cfg( feature = "dim2" ) ]
278282 pub fn vertices ( & self ) -> [ Point < Real > ; 4 ] {
@@ -284,7 +288,7 @@ impl Aabb {
284288 ]
285289 }
286290
287- /// Computes the vertices of this Aabb.
291+ /// Computes the vertices of this ` Aabb` .
288292 #[ inline]
289293 #[ cfg( feature = "dim3" ) ]
290294 pub fn vertices ( & self ) -> [ Point < Real > ; 8 ] {
@@ -300,7 +304,7 @@ impl Aabb {
300304 ]
301305 }
302306
303- /// Splits this Aabb at its center, into four parts (as in a quad-tree).
307+ /// Splits this ` Aabb` at its center, into four parts (as in a quad-tree).
304308 #[ inline]
305309 #[ cfg( feature = "dim2" ) ]
306310 pub fn split_at_center ( & self ) -> [ Aabb ; 4 ] {
@@ -320,7 +324,7 @@ impl Aabb {
320324 ]
321325 }
322326
323- /// Splits this Aabb at its center, into height parts (as in an octree).
327+ /// Splits this ` Aabb` at its center, into eight parts (as in an octree).
324328 #[ inline]
325329 #[ cfg( feature = "dim3" ) ]
326330 pub fn split_at_center ( & self ) -> [ Aabb ; 8 ] {
@@ -362,7 +366,7 @@ impl Aabb {
362366 ]
363367 }
364368
365- /// Projects every point of Aabb on an arbitrary axis.
369+ /// Projects every point of ` Aabb` on an arbitrary axis.
366370 pub fn project_on_axis ( & self , axis : & UnitVector < Real > ) -> ( Real , Real ) {
367371 let cuboid = Cuboid :: new ( self . half_extents ( ) ) ;
368372 let shift = cuboid
0 commit comments