231 {
233 value.X = objectPosition.X - cameraPosition.X;
234 value.Y = objectPosition.Y - cameraPosition.Y;
235 value.Z = objectPosition.Z - cameraPosition.Z;
236 float num =
value.LengthSquared();
237 if (num < 0.0001f)
238 {
240 }
241 else
242 {
244 }
245 Vector3.Cross(ref cameraUpVector, ref
value, out var result);
246 result.Normalize();
249 result3.M11 = result.X;
250 result3.M12 = result.Y;
251 result3.M13 = result.Z;
252 result3.M14 = 0f;
253 result3.M21 = result2.X;
254 result3.M22 = result2.Y;
255 result3.M23 = result2.Z;
256 result3.M24 = 0f;
257 result3.M31 =
value.X;
258 result3.M32 =
value.Y;
259 result3.M33 =
value.Z;
260 result3.M34 = 0f;
261 result3.M41 = objectPosition.X;
262 result3.M42 = objectPosition.Y;
263 result3.M43 = objectPosition.Z;
264 result3.M44 = 1f;
265 return result3;
266 }
static double Sqrt(double d)
Matrix(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)