Refactor engine to support double-precision vectors

This commit is contained in:
Wojtek Figat
2022-06-13 00:40:32 +02:00
parent f82e370392
commit a881c90b2e
744 changed files with 19062 additions and 12467 deletions

View File

@@ -1,3 +1,9 @@
#if USE_LARGE_WORLDS
using Real = System.Double;
#else
using Real = System.Single;
#endif
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
using System;
@@ -53,7 +59,7 @@ namespace FlaxEditor.SceneGraph.Actors
}
/// <inheritdoc />
public override bool RayCastSelf(ref RayCastData ray, out float distance, out Vector3 normal)
public override bool RayCastSelf(ref RayCastData ray, out Real distance, out Vector3 normal)
{
normal = Vector3.Up;
var sphere = new BoundingSphere(Transform.Translation, 10.0f);
@@ -82,10 +88,10 @@ namespace FlaxEditor.SceneGraph.Actors
public override bool AffectsNavigation => true;
/// <inheritdoc />
public override bool RayCastSelf(ref RayCastData ray, out float distance, out Vector3 normal)
public override bool RayCastSelf(ref RayCastData ray, out Real distance, out Vector3 normal)
{
normal = Vector3.Up;
distance = float.MaxValue;
distance = Real.MaxValue;
return false;
}
}