@@ -81,7 +81,7 @@ impl Transform3D {
8181 /// the projection matrix.
8282 ///
8383 /// _Godot equivalent: `Transform3D(Projection from)`_
84- pub fn from_projection ( proj : Projection ) -> Self {
84+ pub fn from_projection ( proj : & Projection ) -> Self {
8585 let a = Vector3 :: new ( proj. cols [ 0 ] . x , proj. cols [ 0 ] . y , proj. cols [ 0 ] . z ) ;
8686 let b = Vector3 :: new ( proj. cols [ 1 ] . x , proj. cols [ 1 ] . y , proj. cols [ 1 ] . z ) ;
8787 let c = Vector3 :: new ( proj. cols [ 2 ] . x , proj. cols [ 2 ] . y , proj. cols [ 2 ] . z ) ;
@@ -114,14 +114,14 @@ impl Transform3D {
114114 /// Returns the inverse of the transform, under the assumption that the
115115 /// transformation is composed of rotation, scaling and translation.
116116 #[ must_use]
117- pub fn affine_inverse ( self ) -> Self {
117+ pub fn affine_inverse ( & self ) -> Self {
118118 self . glam ( |aff| aff. inverse ( ) )
119119 }
120120
121121 /// Returns a transform interpolated between this transform and another by
122122 /// a given weight (on the range of 0.0 to 1.0).
123123 #[ must_use]
124- pub fn interpolate_with ( self , other : Self , weight : real ) -> Self {
124+ pub fn interpolate_with ( & self , other : & Self , weight : real ) -> Self {
125125 let src_scale = self . basis . scale ( ) ;
126126 let src_rot = self . basis . to_quat ( ) . normalized ( ) ;
127127 let src_loc = self . origin ;
@@ -151,7 +151,7 @@ impl Transform3D {
151151 /// See [`Basis::new_looking_at()`] for more information.
152152 #[ cfg( before_api = "4.1" ) ]
153153 #[ must_use]
154- pub fn looking_at ( self , target : Vector3 , up : Vector3 ) -> Self {
154+ pub fn looking_at ( & self , target : Vector3 , up : Vector3 ) -> Self {
155155 Self {
156156 basis : Basis :: new_looking_at ( target - self . origin , up) ,
157157 origin : self . origin ,
@@ -160,7 +160,7 @@ impl Transform3D {
160160
161161 #[ cfg( since_api = "4.1" ) ]
162162 #[ must_use]
163- pub fn looking_at ( self , target : Vector3 , up : Vector3 , use_model_front : bool ) -> Self {
163+ pub fn looking_at ( & self , target : Vector3 , up : Vector3 , use_model_front : bool ) -> Self {
164164 Self {
165165 basis : Basis :: new_looking_at ( target - self . origin , up, use_model_front) ,
166166 origin : self . origin ,
@@ -172,7 +172,7 @@ impl Transform3D {
172172 ///
173173 /// _Godot equivalent: Transform3D.orthonormalized()_
174174 #[ must_use]
175- pub fn orthonormalized ( self ) -> Self {
175+ pub fn orthonormalized ( & self ) -> Self {
176176 Self {
177177 basis : self . basis . orthonormalized ( ) ,
178178 origin : self . origin ,
@@ -186,7 +186,7 @@ impl Transform3D {
186186 ///
187187 /// _Godot equivalent: `Transform2D.rotated()`_
188188 #[ must_use]
189- pub fn rotated ( self , axis : Vector3 , angle : real ) -> Self {
189+ pub fn rotated ( & self , axis : Vector3 , angle : real ) -> Self {
190190 let rotation = Basis :: from_axis_angle ( axis, angle) ;
191191 Self {
192192 basis : rotation * self . basis ,
@@ -200,7 +200,7 @@ impl Transform3D {
200200 ///
201201 /// _Godot equivalent: `Transform2D.rotated_local()`_
202202 #[ must_use]
203- pub fn rotated_local ( self , axis : Vector3 , angle : real ) -> Self {
203+ pub fn rotated_local ( & self , axis : Vector3 , angle : real ) -> Self {
204204 Self {
205205 basis : self . basis * Basis :: from_axis_angle ( axis, angle) ,
206206 origin : self . origin ,
@@ -214,7 +214,7 @@ impl Transform3D {
214214 ///
215215 /// _Godot equivalent: `Transform2D.scaled()`_
216216 #[ must_use]
217- pub fn scaled ( self , scale : Vector3 ) -> Self {
217+ pub fn scaled ( & self , scale : Vector3 ) -> Self {
218218 Self {
219219 basis : Basis :: from_scale ( scale) * self . basis ,
220220 origin : self . origin * scale,
@@ -228,7 +228,7 @@ impl Transform3D {
228228 ///
229229 /// _Godot equivalent: `Transform2D.scaled_local()`_
230230 #[ must_use]
231- pub fn scaled_local ( self , scale : Vector3 ) -> Self {
231+ pub fn scaled_local ( & self , scale : Vector3 ) -> Self {
232232 Self {
233233 basis : self . basis * Basis :: from_scale ( scale) ,
234234 origin : self . origin ,
@@ -242,7 +242,7 @@ impl Transform3D {
242242 ///
243243 /// _Godot equivalent: `Transform2D.translated()`_
244244 #[ must_use]
245- pub fn translated ( self , offset : Vector3 ) -> Self {
245+ pub fn translated ( & self , offset : Vector3 ) -> Self {
246246 Self {
247247 basis : self . basis ,
248248 origin : self . origin + offset,
@@ -256,7 +256,7 @@ impl Transform3D {
256256 ///
257257 /// _Godot equivalent: `Transform2D.translated()`_
258258 #[ must_use]
259- pub fn translated_local ( self , offset : Vector3 ) -> Self {
259+ pub fn translated_local ( & self , offset : Vector3 ) -> Self {
260260 Self {
261261 basis : self . basis ,
262262 origin : self . origin + ( self . basis * offset) ,
0 commit comments