ソースを参照

Consistency fix: A few files were using spaces instead of tabs (#1171)

Jorrit Rouwe 1 年間 前
コミット
19fbd9e031
100 ファイル変更537 行追加537 行削除
  1. 4 4
      Assets/Shaders/FontPixelShader.hlsl
  2. 9 9
      Assets/Shaders/FontVertexShader.hlsl
  3. 6 6
      Assets/Shaders/LinePixelShader.hlsl
  4. 10 10
      Assets/Shaders/LineVertexShader.hlsl
  5. 4 4
      Assets/Shaders/TriangleDepthVertexShader.hlsl
  6. 6 6
      Assets/Shaders/TrianglePixelShader.hlsl
  7. 10 10
      Assets/Shaders/TriangleVertexShader.hlsl
  8. 4 4
      Assets/Shaders/UIPixelShader.hlsl
  9. 4 4
      Assets/Shaders/UIPixelShaderUntextured.hlsl
  10. 8 8
      Assets/Shaders/UIVertexShader.hlsl
  11. 2 2
      Assets/Shaders/VertexConstants.h
  12. 5 5
      Jolt/Core/ARMNeon.h
  13. 3 3
      Jolt/Core/Array.h
  14. 6 6
      Jolt/Core/Core.h
  15. 2 2
      Jolt/Core/FPControlWord.h
  16. 13 13
      Jolt/Core/HashCombine.h
  17. 1 1
      Jolt/Core/IssueReporting.h
  18. 3 3
      Jolt/Core/JobSystem.h
  19. 1 1
      Jolt/Core/JobSystemWithBarrier.h
  20. 1 1
      Jolt/Core/LockFreeHashMap.h
  21. 1 1
      Jolt/Core/RTTI.h
  22. 6 6
      Jolt/Core/Reference.h
  23. 3 3
      Jolt/Core/StaticArray.h
  24. 3 3
      Jolt/Core/StringTools.h
  25. 1 1
      Jolt/Geometry/ConvexHullBuilder.h
  26. 2 2
      Jolt/Geometry/EPAConvexHullBuilder.h
  27. 1 1
      Jolt/Geometry/GJKClosestPoint.h
  28. 1 1
      Jolt/Geometry/Sphere.h
  29. 1 1
      Jolt/Jolt.cmake
  30. 1 1
      Jolt/Math/DVec3.h
  31. 10 10
      Jolt/Math/DVec3.inl
  32. 1 1
      Jolt/Math/Quat.h
  33. 4 4
      Jolt/Math/Quat.inl
  34. 1 1
      Jolt/Math/Real.h
  35. 3 3
      Jolt/Math/UVec4.inl
  36. 33 33
      Jolt/Math/Vec3.inl
  37. 15 15
      Jolt/Math/Vec4.inl
  38. 1 1
      Jolt/ObjectStream/ObjectStreamBinaryIn.h
  39. 1 1
      Jolt/ObjectStream/ObjectStreamBinaryOut.h
  40. 2 2
      Jolt/ObjectStream/ObjectStreamIn.h
  41. 1 1
      Jolt/ObjectStream/ObjectStreamOut.h
  42. 18 18
      Jolt/ObjectStream/ObjectStreamTextIn.cpp
  43. 1 1
      Jolt/ObjectStream/SerializableObject.h
  44. 3 3
      Jolt/Physics/Body/Body.h
  45. 1 1
      Jolt/Physics/Body/BodyManager.cpp
  46. 5 5
      Jolt/Physics/Body/MotionProperties.h
  47. 2 2
      Jolt/Physics/Character/CharacterBase.h
  48. 1 1
      Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h
  49. 2 2
      Jolt/Physics/Collision/BroadPhase/QuadTree.h
  50. 1 1
      Jolt/Physics/Collision/Shape/BoxShape.h
  51. 5 5
      Jolt/Physics/Collision/Shape/CompoundShapeVisitors.h
  52. 3 3
      Jolt/Physics/Collision/Shape/MeshShape.cpp
  53. 1 1
      Jolt/Physics/Collision/Shape/ScaledShape.h
  54. 1 1
      Jolt/Physics/Collision/Shape/Shape.h
  55. 2 2
      Jolt/Physics/Collision/Shape/SphereShape.h
  56. 1 1
      Jolt/Physics/Collision/Shape/TriangleShape.h
  57. 1 1
      Jolt/Physics/Constraints/ConeConstraint.h
  58. 1 1
      Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h
  59. 1 1
      Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h
  60. 1 1
      Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h
  61. 1 1
      Jolt/Physics/Constraints/DistanceConstraint.h
  62. 1 1
      Jolt/Physics/Constraints/HingeConstraint.h
  63. 1 1
      Jolt/Physics/Constraints/PathConstraintPathHermite.cpp
  64. 1 1
      Jolt/Physics/Constraints/PointConstraint.h
  65. 1 1
      Jolt/Physics/Constraints/PulleyConstraint.h
  66. 4 4
      Jolt/Physics/Constraints/SixDOFConstraint.h
  67. 1 1
      Jolt/Physics/Constraints/SliderConstraint.h
  68. 1 1
      Jolt/Physics/Constraints/SpringSettings.h
  69. 7 7
      Jolt/Physics/Constraints/SwingTwistConstraint.h
  70. 1 1
      Jolt/Physics/LargeIslandSplitter.h
  71. 3 3
      Jolt/Physics/PhysicsLock.h
  72. 5 5
      Jolt/Physics/PhysicsSystem.h
  73. 1 1
      Jolt/Physics/Ragdoll/Ragdoll.h
  74. 1 1
      Jolt/Physics/SoftBody/SoftBodyMotionProperties.h
  75. 2 2
      Jolt/Physics/SoftBody/SoftBodyVertex.h
  76. 1 1
      Jolt/Renderer/DebugRenderer.cpp
  77. 3 3
      PerformanceTest/RagdollScene.h
  78. 1 1
      Samples/Samples.cmake
  79. 1 1
      Samples/Tests/General/ChangeShapeTest.h
  80. 1 1
      Samples/Tests/General/ShapeFilterTest.cpp
  81. 4 4
      Samples/Tests/ScaledShapes/ScaledOffsetCenterOfMassShapeTest.cpp
  82. 2 2
      Samples/Tests/Shapes/OffsetCenterOfMassShapeTest.cpp
  83. 3 3
      Samples/Tests/Vehicle/VehicleConstraintTest.h
  84. 32 32
      TestFramework/Image/LoadBMP.cpp
  85. 3 3
      TestFramework/Input/Keyboard.cpp
  86. 3 3
      TestFramework/Input/Mouse.cpp
  87. 87 87
      TestFramework/Renderer/CommandQueue.h
  88. 1 1
      TestFramework/Renderer/ConstantBuffer.h
  89. 5 5
      TestFramework/Renderer/Font.cpp
  90. 33 33
      TestFramework/Renderer/PipelineState.cpp
  91. 1 1
      TestFramework/Renderer/PipelineState.h
  92. 1 1
      TestFramework/Renderer/Renderer.cpp
  93. 12 12
      TestFramework/Renderer/Renderer.h
  94. 43 43
      TestFramework/Renderer/Texture.cpp
  95. 6 6
      TestFramework/UI/UIManager.cpp
  96. 3 3
      UnitTests/Math/UVec4Tests.cpp
  97. 1 1
      UnitTests/Math/Vec4Tests.cpp
  98. 1 1
      UnitTests/Physics/PhysicsTests.cpp
  99. 12 12
      UnitTests/UnitTestFramework.cpp
  100. 1 1
      WebIncludes/profile_chart.css

+ 4 - 4
Assets/Shaders/FontPixelShader.hlsl

@@ -3,23 +3,23 @@ SamplerState SampleType : register(s0);
 
 struct PS_INPUT
 {
-    float4 Position : SV_POSITION;
+	float4 Position : SV_POSITION;
 	float2 Tex		: TEXCOORD0;
 	float4 Color	: COLOR0;
 };
 
 struct PS_OUTPUT
 {
-    float4 RGBColor : SV_TARGET;
+	float4 RGBColor : SV_TARGET;
 };
 
 PS_OUTPUT main(PS_INPUT In)
 {
-    PS_OUTPUT Output;
+	PS_OUTPUT Output;
 
 	float t = ShaderTexture.Sample(SampleType, In.Tex).r;
 
 	Output.RGBColor = float4(In.Color.rgb, t);
 
-    return Output;
+	return Output;
 }

+ 9 - 9
Assets/Shaders/FontVertexShader.hlsl

@@ -2,28 +2,28 @@
 
 struct VS_INPUT
 {
-    float3 vPos   : POSITION;
+	float3 vPos	  : POSITION;
 	float2 vTex	  : TEXCOORD0;
 	float4 vCol	  : COLOR;
 };
 
 struct VS_OUTPUT
 {
-    float4 Position : SV_POSITION;
-	float2 Tex      : TEXCOORD0;
+	float4 Position : SV_POSITION;
+	float2 Tex		: TEXCOORD0;
 	float4 Color	: COLOR0;
 };
 
 VS_OUTPUT main(VS_INPUT input)
 {
-    VS_OUTPUT Output;
+	VS_OUTPUT Output;
 
 	float4 pos = float4(input.vPos, 1.0f);
 
-    // Transform the position from object space to homogeneous projection space
-    pos = mul(View, pos);
-    pos = mul(Projection, pos);
-    Output.Position = pos;
+	// Transform the position from object space to homogeneous projection space
+	pos = mul(View, pos);
+	pos = mul(Projection, pos);
+	Output.Position = pos;
 
 	// Output texture coordinates
 	Output.Tex = input.vTex;
@@ -31,5 +31,5 @@ VS_OUTPUT main(VS_INPUT input)
 	// Output color
 	Output.Color = input.vCol;
 
-    return Output;
+	return Output;
 }

+ 6 - 6
Assets/Shaders/LinePixelShader.hlsl

@@ -1,19 +1,19 @@
 struct PS_INPUT
 {
-    float4 Position : SV_POSITION;
-    float4 Color    : COLOR0;
+	float4 Position : SV_POSITION;
+	float4 Color	: COLOR0;
 };
 
 struct PS_OUTPUT
 {
-    float4 RGBColor : SV_TARGET;
+	float4 RGBColor : SV_TARGET;
 };
 
 PS_OUTPUT main(PS_INPUT In)
 {
-    PS_OUTPUT Output;
+	PS_OUTPUT Output;
 
-    Output.RGBColor = In.Color;
+	Output.RGBColor = In.Color;
 
-    return Output;
+	return Output;
 }

+ 10 - 10
Assets/Shaders/LineVertexShader.hlsl

@@ -2,29 +2,29 @@
 
 struct VS_INPUT
 {
-    float3 vPos   : POSITION;
+	float3 vPos	  : POSITION;
 	float3 vColor : COLOR;
 };
 
 struct VS_OUTPUT
 {
-    float4 Position : SV_POSITION;
-    float4 Color    : COLOR0;
+	float4 Position : SV_POSITION;
+	float4 Color	: COLOR0;
 };
 
 VS_OUTPUT main(VS_INPUT input)
 {
-    VS_OUTPUT Output;
+	VS_OUTPUT Output;
 
 	float4 pos = float4(input.vPos, 1.0f);
 
-    // Transform the position from object space to homogeneous projection space
-    pos = mul(View, pos);
-    pos = mul(Projection, pos);
-    Output.Position = pos;
+	// Transform the position from object space to homogeneous projection space
+	pos = mul(View, pos);
+	pos = mul(Projection, pos);
+	Output.Position = pos;
 
-    // Output color
+	// Output color
 	Output.Color = float4(input.vColor, 1.0f);
 
-    return Output;
+	return Output;
 }

+ 4 - 4
Assets/Shaders/TriangleDepthVertexShader.hlsl

@@ -3,7 +3,7 @@
 struct VS_INPUT
 {
 	// Per vertex data
-    float3 vPos   : POSITION;
+	float3 vPos	  : POSITION;
 	float3 vNorm  : NORMAL;
 	float2 vTex	  : TEXCOORD0;
 	float4 vCol	  : COLOR;
@@ -16,12 +16,12 @@ struct VS_INPUT
 
 struct VS_OUTPUT
 {
-    float4 Position : SV_POSITION;
+	float4 Position : SV_POSITION;
 };
 
 VS_OUTPUT main(VS_INPUT input)
 {
-    VS_OUTPUT output;
+	VS_OUTPUT output;
 
 	// Check if the alpha = 0
 	if (input.vCol.a * input.iCol.a == 0.0)
@@ -39,5 +39,5 @@ VS_OUTPUT main(VS_INPUT input)
 		output.Position = pos;
 	}
 	
-    return output;
+	return output;
 }

+ 6 - 6
Assets/Shaders/TrianglePixelShader.hlsl

@@ -13,9 +13,9 @@ cbuffer PixelShaderConstantBuffer : register(b1)
 
 struct PS_INPUT
 {
-    float4 Position  : SV_POSITION; // interpolated vertex position
-    float3 Normal	 : TEXCOORD0;
-	float3 WorldPos  : TEXCOORD1;
+	float4 Position	 : SV_POSITION; // interpolated vertex position
+	float3 Normal	 : TEXCOORD0;
+	float3 WorldPos	 : TEXCOORD1;
 	float2 Tex		 : TEXCOORD2;
 	float4 PositionL : TEXCOORD3; // interpolated vertex position in light space
 	float4 Color	 : COLOR0;
@@ -23,7 +23,7 @@ struct PS_INPUT
 
 struct PS_OUTPUT
 {
-    float4 RGBColor : SV_TARGET;
+	float4 RGBColor : SV_TARGET;
 };
 
 PS_OUTPUT main(PS_INPUT input)
@@ -115,7 +115,7 @@ PS_OUTPUT main(PS_INPUT input)
 	darken_factor = lerp(darken_factor, 0.75, clamp(5.0 * texel_distance - 1.5, 0.0, 1.0));
 
 	// Calculate color
-    PS_OUTPUT output;
+	PS_OUTPUT output;
 	output.RGBColor = float4(saturate((AmbientFactor + diffuse * shadow_factor) * darken_factor * DiffuseColor + SpecularColor * specular * shadow_factor), 1);
-    return output;
+	return output;
 }

+ 10 - 10
Assets/Shaders/TriangleVertexShader.hlsl

@@ -3,7 +3,7 @@
 struct VS_INPUT
 {
 	// Per vertex data
-    float3 vPos   : POSITION;
+	float3 vPos	  : POSITION;
 	float3 vNorm  : NORMAL;
 	float2 vTex	  : TEXCOORD0;
 	float4 vCol	  : COLOR;
@@ -16,26 +16,26 @@ struct VS_INPUT
 
 struct VS_OUTPUT
 {
-    float4 Position  : SV_POSITION;
-    float3 Normal    : TEXCOORD0;
+	float4 Position	 : SV_POSITION;
+	float3 Normal	 : TEXCOORD0;
 	float3 WorldPos	 : TEXCOORD1;
-	float2 Tex       : TEXCOORD2;
+	float2 Tex		 : TEXCOORD2;
 	float4 PositionL : TEXCOORD3;
 	float4 Color	 : COLOR0;
 };
 
 VS_OUTPUT main(VS_INPUT input)
 {
-    VS_OUTPUT output;
+	VS_OUTPUT output;
 
 	// Get world position
 	float4 pos = float4(input.vPos, 1.0f);
 	float4 world_pos = mul(input.iModel, pos);
 
-    // Transform the position from world space to homogeneous projection space
-    float4 proj_pos = mul(View, world_pos);
-    proj_pos = mul(Projection, proj_pos);
-    output.Position = proj_pos;
+	// Transform the position from world space to homogeneous projection space
+	float4 proj_pos = mul(View, world_pos);
+	proj_pos = mul(Projection, proj_pos);
+	output.Position = proj_pos;
 
 	// Transform the position from world space to projection space of the light
 	float4 proj_lpos = mul(LightView, world_pos);
@@ -55,5 +55,5 @@ VS_OUTPUT main(VS_INPUT input)
 	// output color
 	output.Color = input.vCol * input.iCol;
 
-    return output;
+	return output;
 }

+ 4 - 4
Assets/Shaders/UIPixelShader.hlsl

@@ -3,21 +3,21 @@ SamplerState SampleType : register(s1);
 
 struct PS_INPUT
 {
-    float4 Position : SV_POSITION;
+	float4 Position : SV_POSITION;
 	float2 Tex		: TEXCOORD0;
 	float4 Color	: COLOR0;
 };
 
 struct PS_OUTPUT
 {
-    float4 RGBColor : SV_TARGET;
+	float4 RGBColor : SV_TARGET;
 };
 
 PS_OUTPUT main(PS_INPUT In)
 {
-    PS_OUTPUT Output;
+	PS_OUTPUT Output;
 
 	Output.RGBColor = In.Color * ShaderTexture.Sample(SampleType, In.Tex);
 
-    return Output;
+	return Output;
 }

+ 4 - 4
Assets/Shaders/UIPixelShaderUntextured.hlsl

@@ -1,20 +1,20 @@
 struct PS_INPUT
 {
-    float4 Position : SV_POSITION;
+	float4 Position : SV_POSITION;
 	float2 Tex		: TEXCOORD0;
 	float4 Color	: COLOR0;
 };
 
 struct PS_OUTPUT
 {
-    float4 RGBColor : SV_TARGET;
+	float4 RGBColor : SV_TARGET;
 };
 
 PS_OUTPUT main(PS_INPUT In)
 {
-    PS_OUTPUT Output;
+	PS_OUTPUT Output;
 
 	Output.RGBColor = In.Color;
 
-    return Output;
+	return Output;
 }

+ 8 - 8
Assets/Shaders/UIVertexShader.hlsl

@@ -2,27 +2,27 @@
 
 struct VS_INPUT
 {
-    float3 vPos   : POSITION;
+	float3 vPos	  : POSITION;
 	float2 vTex	  : TEXCOORD0;
 	float4 vCol	  : COLOR;
 };
 
 struct VS_OUTPUT
 {
-    float4 Position : SV_POSITION;
-	float2 Tex      : TEXCOORD0;
+	float4 Position : SV_POSITION;
+	float2 Tex		: TEXCOORD0;
 	float4 Color	: COLOR0;
 };
 
 VS_OUTPUT main(VS_INPUT input)
 {
-    VS_OUTPUT Output;
+	VS_OUTPUT Output;
 
 	float4 pos = float4(input.vPos, 1.0f);
 
-    // Transform the position from object space to ortho space
-    pos = mul(Projection, pos);
-    Output.Position = pos;
+	// Transform the position from object space to ortho space
+	pos = mul(Projection, pos);
+	Output.Position = pos;
 
 	// Output texture coordinates
 	Output.Tex = input.vTex;
@@ -30,5 +30,5 @@ VS_OUTPUT main(VS_INPUT input)
 	// Output color
 	Output.Color = input.vCol;
 
-    return Output;
+	return Output;
 }

+ 2 - 2
Assets/Shaders/VertexConstants.h

@@ -1,7 +1,7 @@
 cbuffer VertexShaderConstantBuffer : register(b0)
 {
-    matrix View;			// view matrix
-    matrix Projection;		// projection matrix
+	matrix View;			// view matrix
+	matrix Projection;		// projection matrix
 	matrix LightView;		// view matrix of the light
 	matrix LightProjection;	// projection matrix of the light
 };

+ 5 - 5
Jolt/Core/ARMNeon.h

@@ -30,13 +30,13 @@
 	template <>
 	JPH_INLINE float32x4_t NeonShuffleFloat32x4<0, 1, 2, 2>(float32x4_t inV1, float32x4_t inV2)
 	{
-	    return vcombine_f32(vget_low_f32(inV1), vdup_lane_s32(vget_high_f32(inV1), 0));
+		return vcombine_f32(vget_low_f32(inV1), vdup_lane_s32(vget_high_f32(inV1), 0));
 	}
 
 	template <>
 	JPH_INLINE float32x4_t NeonShuffleFloat32x4<0, 1, 3, 3>(float32x4_t inV1, float32x4_t inV2)
 	{
-	    return vcombine_f32(vget_low_f32(inV1), vdup_lane_s32(vget_high_f32(inV1), 1));
+		return vcombine_f32(vget_low_f32(inV1), vdup_lane_s32(vget_high_f32(inV1), 1));
 	}
 
 	template <>
@@ -48,13 +48,13 @@
 	template <>
 	JPH_INLINE float32x4_t NeonShuffleFloat32x4<1, 0, 3, 2>(float32x4_t inV1, float32x4_t inV2)
 	{
-	    return vcombine_f32(vrev64_f32(vget_low_f32(inV1)), vrev64_f32(vget_high_f32(inV1)));
+		return vcombine_f32(vrev64_f32(vget_low_f32(inV1)), vrev64_f32(vget_high_f32(inV1)));
 	}
 
 	template <>
 	JPH_INLINE float32x4_t NeonShuffleFloat32x4<2, 2, 1, 0>(float32x4_t inV1, float32x4_t inV2)
 	{
-	    return vcombine_f32(vdup_lane_s32(vget_high_f32(inV1), 0), vrev64_f32(vget_low_f32(inV1)));
+		return vcombine_f32(vdup_lane_s32(vget_high_f32(inV1), 0), vrev64_f32(vget_low_f32(inV1)));
 	}
 
 	template <>
@@ -68,7 +68,7 @@
 	JPH_INLINE float32x4_t NeonShuffleFloat32x4<1, 2, 0, 0>(float32x4_t inV1, float32x4_t inV2)
 	{
 		static int8x16_t table = JPH_NEON_INT8x16(0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03);
-	    return vreinterpretq_f32_u8(vqtbl1q_u8(vreinterpretq_u8_f32(inV1), table));
+		return vreinterpretq_f32_u8(vqtbl1q_u8(vreinterpretq_u8_f32(inV1), table));
 	}
 
 	// Shuffle a vector

+ 3 - 3
Jolt/Core/Array.h

@@ -582,13 +582,13 @@ namespace std
 			std::size_t ret = 0;
 
 			// Hash length first
-            JPH::HashCombine(ret, inRHS.size());
+			JPH::HashCombine(ret, inRHS.size());
 
 			// Then hash elements
 			for (const T &t : inRHS)
-	            JPH::HashCombine(ret, t);
+				JPH::HashCombine(ret, t);
 
-            return ret;
+			return ret;
 		}
 	};
 }

+ 6 - 6
Jolt/Core/Core.h

@@ -86,12 +86,12 @@
 #elif defined(__FreeBSD__)
 	#define JPH_PLATFORM_FREEBSD
 #elif defined(__APPLE__)
-    #include <TargetConditionals.h>
-    #if defined(TARGET_OS_IPHONE) && !TARGET_OS_IPHONE
-        #define JPH_PLATFORM_MACOS
-    #else
-        #define JPH_PLATFORM_IOS
-    #endif
+	#include <TargetConditionals.h>
+	#if defined(TARGET_OS_IPHONE) && !TARGET_OS_IPHONE
+		#define JPH_PLATFORM_MACOS
+	#else
+		#define JPH_PLATFORM_IOS
+	#endif
 #elif defined(__EMSCRIPTEN__)
 	#define JPH_PLATFORM_WASM
 #endif

+ 2 - 2
Jolt/Core/FPControlWord.h

@@ -75,11 +75,11 @@ public:
 				FPControlWord()
 	{
 		uint64 val;
-	    asm volatile("mrs %0, fpcr" : "=r" (val));
+		asm volatile("mrs %0, fpcr" : "=r" (val));
 		mPrevState = val;
 		val &= ~Mask;
 		val |= Value;
-	    asm volatile("msr fpcr, %0" : /* no output */ : "r" (val));
+		asm volatile("msr fpcr, %0" : /* no output */ : "r" (val));
 	}
 
 				~FPControlWord()

+ 13 - 13
Jolt/Core/HashCombine.h

@@ -46,7 +46,7 @@ template <typename T>
 inline void HashCombineHelper(size_t &ioSeed, const T &inValue)
 {
 	std::hash<T> hasher;
-    ioSeed ^= hasher(inValue) + 0x9e3779b9 + (ioSeed << 6) + (ioSeed >> 2);
+	ioSeed ^= hasher(inValue) + 0x9e3779b9 + (ioSeed << 6) + (ioSeed >> 2);
 }
 
 /// Hash combiner to use a custom struct in an unordered map or set
@@ -55,9 +55,9 @@ inline void HashCombineHelper(size_t &ioSeed, const T &inValue)
 ///
 ///		struct SomeHashKey
 ///		{
-///		    std::string key1;
-///		    std::string key2;
-///		    bool key3;
+///			std::string key1;
+///			std::string key2;
+///			bool key3;
 ///		};
 ///
 ///		JPH_MAKE_HASHABLE(SomeHashKey, t.key1, t.key2, t.key3)
@@ -76,22 +76,22 @@ JPH_CLANG_SUPPRESS_WARNING("-Wc++98-compat-pedantic")
 #define JPH_MAKE_HASH_STRUCT(type, name, ...)				\
 	struct [[nodiscard]] name								\
 	{														\
-        std::size_t operator()(const type &t) const			\
+		std::size_t operator()(const type &t) const			\
 		{													\
-            std::size_t ret = 0;							\
-            ::JPH::HashCombine(ret, __VA_ARGS__);			\
-            return ret;										\
-        }													\
-    };
+			std::size_t ret = 0;							\
+			::JPH::HashCombine(ret, __VA_ARGS__);			\
+			return ret;										\
+		}													\
+	};
 
 #define JPH_MAKE_HASHABLE(type, ...)						\
 	JPH_SUPPRESS_WARNING_PUSH								\
 	JPH_SUPPRESS_WARNINGS									\
-    namespace std											\
+	namespace std											\
 	{														\
-        template<>											\
+		template<>											\
 		JPH_MAKE_HASH_STRUCT(type, hash<type>, __VA_ARGS__)	\
-    }														\
+	}														\
 	JPH_SUPPRESS_WARNING_POP
 
 JPH_SUPPRESS_WARNING_POP

+ 1 - 1
Jolt/Core/IssueReporting.h

@@ -30,7 +30,7 @@ JPH_EXPORT extern TraceFunction Trace;
 
 	#define JPH_IF_ENABLE_ASSERTS(...)		__VA_ARGS__
 #else
-    #define JPH_ASSERT(...)					((void)0)
+	#define JPH_ASSERT(...)					((void)0)
 
 	#define JPH_IF_ENABLE_ASSERTS(...)
 #endif // JPH_ENABLE_ASSERTS

+ 3 - 3
Jolt/Core/JobSystem.h

@@ -33,9 +33,9 @@ JPH_NAMESPACE_BEGIN
 ///		barrier->AddJob(third_job);
 ///		job_system->WaitForJobs(barrier);
 ///
-/// 	// Clean up
-/// 	job_system->DestroyBarrier(barrier);
-/// 	delete job_system;
+///		// Clean up
+///		job_system->DestroyBarrier(barrier);
+///		delete job_system;
 ///
 ///	Jobs are guaranteed to be started in the order that their dependency counter becomes zero (in case they're scheduled on a background thread)
 ///	or in the order they're added to the barrier (when dependency count is zero and when executing on the thread that calls WaitForJobs).

+ 1 - 1
Jolt/Core/JobSystemWithBarrier.h

@@ -70,7 +70,7 @@ private:
 		/// Jobs queue for the barrier
 		static constexpr uint cMaxJobs = 2048;
 		static_assert(IsPowerOf2(cMaxJobs));								// We do bit operations and require max jobs to be a power of 2
-		atomic<Job *> 		mJobs[cMaxJobs];								///< List of jobs that are part of this barrier, nullptrs for empty slots
+		atomic<Job *>		mJobs[cMaxJobs];								///< List of jobs that are part of this barrier, nullptrs for empty slots
 		alignas(JPH_CACHE_LINE_SIZE) atomic<uint> mJobReadIndex { 0 };		///< First job that could be valid (modulo cMaxJobs), can be nullptr if other thread is still working on adding the job
 		alignas(JPH_CACHE_LINE_SIZE) atomic<uint> mJobWriteIndex { 0 };		///< First job that can be written (modulo cMaxJobs)
 		atomic<int>			mNumToAcquire { 0 };							///< Number of times the semaphore has been released, the barrier should acquire the semaphore this many times (written at the same time as mJobWriteIndex so ok to put in same cache line)

+ 1 - 1
Jolt/Core/LockFreeHashMap.h

@@ -145,7 +145,7 @@ public:
 		bool				operator != (const Iterator &inRHS) const	{ return !(*this == inRHS); }
 
 		/// Convert to key value pair
-		KeyValue & 			operator * ();
+		KeyValue &			operator * ();
 
 		/// Next item
 		Iterator &			operator ++ ();

+ 1 - 1
Jolt/Core/RTTI.h

@@ -308,7 +308,7 @@ public:																												\
 
 #define JPH_DECLARE_RTTI_WITH_NAMESPACE_FOR_FACTORY(linkage, name_space, class_name)								\
 	namespace name_space {																							\
-		class class_name; 																							\
+		class class_name;																							\
 		linkage RTTI *			GetRTTIOfType(class class_name *);													\
 	}
 

+ 6 - 6
Jolt/Core/Reference.h

@@ -108,7 +108,7 @@ public:
 	inline					~Ref()											{ Release(); }
 
 	/// Assignment operators
-	inline Ref<T> &			operator = (T *inRHS) 							{ if (mPtr != inRHS) { Release(); mPtr = inRHS; AddRef(); } return *this; }
+	inline Ref<T> &			operator = (T *inRHS)							{ if (mPtr != inRHS) { Release(); mPtr = inRHS; AddRef(); } return *this; }
 	inline Ref<T> &			operator = (const Ref<T> &inRHS)				{ if (mPtr != inRHS.mPtr) { Release(); mPtr = inRHS.mPtr; AddRef(); } return *this; }
 	inline Ref<T> &			operator = (Ref<T> &&inRHS) noexcept			{ if (mPtr != inRHS.mPtr) { Release(); mPtr = inRHS.mPtr; inRHS.mPtr = nullptr; } return *this; }
 
@@ -116,7 +116,7 @@ public:
 	inline					operator T *() const							{ return mPtr; }
 
 	/// Access like a normal pointer
-	inline T * 				operator -> () const							{ return mPtr; }
+	inline T *				operator -> () const							{ return mPtr; }
 	inline T &				operator * () const								{ return *mPtr; }
 
 	/// Comparison
@@ -126,7 +126,7 @@ public:
 	inline bool				operator != (const Ref<T> &inRHS) const			{ return mPtr != inRHS.mPtr; }
 
 	/// Get pointer
-	inline T * 				GetPtr() const									{ return mPtr; }
+	inline T *				GetPtr() const									{ return mPtr; }
 
 	/// INTERNAL HELPER FUNCTION USED BY SERIALIZATION
 	void **					InternalGetPointer()							{ return reinterpret_cast<void **>(&mPtr); }
@@ -160,7 +160,7 @@ public:
 	inline					~RefConst()										{ Release(); }
 
 	/// Assignment operators
-	inline RefConst<T> &	operator = (const T * inRHS) 					{ if (mPtr != inRHS) { Release(); mPtr = inRHS; AddRef(); } return *this; }
+	inline RefConst<T> &	operator = (const T * inRHS)					{ if (mPtr != inRHS) { Release(); mPtr = inRHS; AddRef(); } return *this; }
 	inline RefConst<T> &	operator = (const RefConst<T> &inRHS)			{ if (mPtr != inRHS.mPtr) { Release(); mPtr = inRHS.mPtr; AddRef(); } return *this; }
 	inline RefConst<T> &	operator = (RefConst<T> &&inRHS) noexcept		{ if (mPtr != inRHS.mPtr) { Release(); mPtr = inRHS.mPtr; inRHS.mPtr = nullptr; } return *this; }
 	inline RefConst<T> &	operator = (const Ref<T> &inRHS)				{ if (mPtr != inRHS.mPtr) { Release(); mPtr = inRHS.mPtr; AddRef(); } return *this; }
@@ -170,7 +170,7 @@ public:
 	inline					operator const T * () const						{ return mPtr; }
 
 	/// Access like a normal pointer
-	inline const T * 	 	operator -> () const							{ return mPtr; }
+	inline const T *		operator -> () const							{ return mPtr; }
 	inline const T &		operator * () const								{ return *mPtr; }
 
 	/// Comparison
@@ -182,7 +182,7 @@ public:
 	inline bool				operator != (const Ref<T> &inRHS) const			{ return mPtr != inRHS.mPtr; }
 
 	/// Get pointer
-	inline const T * 		GetPtr() const									{ return mPtr; }
+	inline const T *		GetPtr() const									{ return mPtr; }
 
 	/// INTERNAL HELPER FUNCTION USED BY SERIALIZATION
 	void **					InternalGetPointer()							{ return const_cast<void **>(reinterpret_cast<const void **>(&mPtr)); }

+ 3 - 3
Jolt/Core/StaticArray.h

@@ -311,13 +311,13 @@ namespace std
 			std::size_t ret = 0;
 
 			// Hash length first
-            JPH::HashCombine(ret, inRHS.size());
+			JPH::HashCombine(ret, inRHS.size());
 
 			// Then hash elements
 			for (const T &t : inRHS)
-	            JPH::HashCombine(ret, t);
+				JPH::HashCombine(ret, t);
 
-            return ret;
+			return ret;
 		}
 	};
 }

+ 3 - 3
Jolt/Core/StringTools.h

@@ -15,9 +15,9 @@ template<typename T>
 String ConvertToString(const T &inValue)
 {
 	using OStringStream = std::basic_ostringstream<char, std::char_traits<char>, STLAllocator<char>>;
-    OStringStream oss;
-    oss << inValue;
-    return oss.str();
+	OStringStream oss;
+	oss << inValue;
+	return oss.str();
 }
 
 /// Calculate the FNV-1a hash of inString.

+ 1 - 1
Jolt/Geometry/ConvexHullBuilder.h

@@ -255,7 +255,7 @@ private:
 #endif
 
 	const Positions &	mPositions;							///< List of positions (some of them are part of the hull)
-	Faces 				mFaces;								///< List of faces that are part of the hull (if !mRemoved)
+	Faces				mFaces;								///< List of faces that are part of the hull (if !mRemoved)
 
 	struct Coplanar
 	{

+ 2 - 2
Jolt/Geometry/EPAConvexHullBuilder.h

@@ -692,9 +692,9 @@ public:
 #endif
 
 private:
-	TriangleFactory 	mFactory;							///< Factory to create new triangles and remove old ones
+	TriangleFactory		mFactory;							///< Factory to create new triangles and remove old ones
 	const Points &		mPositions;							///< List of positions (some of them are part of the hull)
-	TriangleQueue 		mTriangleQueue;						///< List of triangles that are part of the hull that still need to be checked (if !mRemoved)
+	TriangleQueue		mTriangleQueue;						///< List of triangles that are part of the hull that still need to be checked (if !mRemoved)
 
 #if defined(JPH_EPA_CONVEX_BUILDER_VALIDATE) || defined(JPH_EPA_CONVEX_BUILDER_DRAW)
 	Triangles			mTriangles;							///< The list of all triangles in this hull (for debug purposes)

+ 1 - 1
Jolt/Geometry/GJKClosestPoint.h

@@ -73,7 +73,7 @@ private:
 		}
 
 #ifdef JPH_GJK_DEBUG
- 		Trace("GetClosest: set = 0b%s, v = [%s], |v| = %g", NibbleToBinary(set), ConvertToString(v).c_str(), (double)v.Length());
+		Trace("GetClosest: set = 0b%s, v = [%s], |v| = %g", NibbleToBinary(set), ConvertToString(v).c_str(), (double)v.Length());
 #endif
 
 		float v_len_sq = v.LengthSq();

+ 1 - 1
Jolt/Geometry/Sphere.h

@@ -26,7 +26,7 @@ public:
 	}
 
 	// Properties
-	inline Vec3 		GetCenter() const										{ return Vec3::sLoadFloat3Unsafe(mCenter); }
+	inline Vec3			GetCenter() const										{ return Vec3::sLoadFloat3Unsafe(mCenter); }
 	inline float		GetRadius() const										{ return mRadius; }
 
 	/// Test if two spheres overlap

+ 1 - 1
Jolt/Jolt.cmake

@@ -621,7 +621,7 @@ else()
 		# ARM64 uses no special commandline flags
 	elseif ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386")
 		# x86 and x86_64
-  		# On 32-bit builds we need to default to using SSE instructions, the x87 FPU instructions have higher intermediate precision
+		# On 32-bit builds we need to default to using SSE instructions, the x87 FPU instructions have higher intermediate precision
 		# which will cause problems in the collision detection code (the effect is similar to leaving FMA on, search for
 		# JPH_PRECISE_MATH_ON for the locations where this is a problem).
 

+ 1 - 1
Jolt/Math/DVec3.h

@@ -73,7 +73,7 @@ public:
 	/// Prepare to convert to float vector 3 rounding towards zero (returns DVec3 that can be converted to a Vec3 to get the rounding)
 	JPH_INLINE DVec3			PrepareRoundToZero() const;
 
-	/// Prepare to convert to float vector 3 rounding towards positive/negative inf  (returns DVec3 that can be converted to a Vec3 to get the rounding)
+	/// Prepare to convert to float vector 3 rounding towards positive/negative inf (returns DVec3 that can be converted to a Vec3 to get the rounding)
 	JPH_INLINE DVec3			PrepareRoundToInf() const;
 
 	/// Convert to float vector 3 rounding down

+ 10 - 10
Jolt/Math/DVec3.inl

@@ -730,11 +730,11 @@ DVec3 DVec3::Cross(DVec3Arg inV2) const
 {
 #if defined(JPH_USE_AVX2)
 	__m256d t1 = _mm256_permute4x64_pd(inV2.mValue, _MM_SHUFFLE(0, 0, 2, 1)); // Assure Z and W are the same
-    t1 = _mm256_mul_pd(t1, mValue);
-    __m256d t2 = _mm256_permute4x64_pd(mValue, _MM_SHUFFLE(0, 0, 2, 1)); // Assure Z and W are the same
-    t2 = _mm256_mul_pd(t2, inV2.mValue);
-    __m256d t3 = _mm256_sub_pd(t1, t2);
-    return _mm256_permute4x64_pd(t3, _MM_SHUFFLE(0, 0, 2, 1)); // Assure Z and W are the same
+	t1 = _mm256_mul_pd(t1, mValue);
+	__m256d t2 = _mm256_permute4x64_pd(mValue, _MM_SHUFFLE(0, 0, 2, 1)); // Assure Z and W are the same
+	t2 = _mm256_mul_pd(t2, inV2.mValue);
+	__m256d t3 = _mm256_sub_pd(t1, t2);
+	return _mm256_permute4x64_pd(t3, _MM_SHUFFLE(0, 0, 2, 1)); // Assure Z and W are the same
 #else
 	return DVec3(mF64[1] * inV2.mF64[2] - mF64[2] * inV2.mF64[1],
 				 mF64[2] * inV2.mF64[0] - mF64[0] * inV2.mF64[2],
@@ -746,10 +746,10 @@ double DVec3::Dot(DVec3Arg inV2) const
 {
 #if defined(JPH_USE_AVX)
 	__m256d mul = _mm256_mul_pd(mValue, inV2.mValue);
-    __m128d xy = _mm256_castpd256_pd128(mul);
+	__m128d xy = _mm256_castpd256_pd128(mul);
 	__m128d yx = _mm_shuffle_pd(xy, xy, 1);
 	__m128d sum = _mm_add_pd(xy, yx);
-    __m128d zw = _mm256_extractf128_pd(mul, 1);
+	__m128d zw = _mm256_extractf128_pd(mul, 1);
 	sum = _mm_add_pd(sum, zw);
 	return _mm_cvtsd_f64(sum);
 #elif defined(JPH_USE_SSE)
@@ -760,9 +760,9 @@ double DVec3::Dot(DVec3Arg inV2) const
 	sum = _mm_add_pd(sum, z);
 	return _mm_cvtsd_f64(sum);
 #elif defined(JPH_USE_NEON)
-    float64x2_t mul_low = vmulq_f64(mValue.val[0], inV2.mValue.val[0]);
-    float64x2_t mul_high = vmulq_f64(mValue.val[1], inV2.mValue.val[1]);
-    return vaddvq_f64(mul_low) + vgetq_lane_f64(mul_high, 0);
+	float64x2_t mul_low = vmulq_f64(mValue.val[0], inV2.mValue.val[0]);
+	float64x2_t mul_high = vmulq_f64(mValue.val[1], inV2.mValue.val[1]);
+	return vaddvq_f64(mul_low) + vgetq_lane_f64(mul_high, 0);
 #else
 	double dot = 0.0;
 	for (int i = 0; i < 3; i++)

+ 1 - 1
Jolt/Math/Quat.h

@@ -81,7 +81,7 @@ public:
 	JPH_INLINE Vec3				GetXYZ() const													{ return Vec3(mValue); }
 
 	/// Get the quaternion as a Vec4
-	JPH_INLINE Vec4 			GetXYZW() const													{ return mValue; }
+	JPH_INLINE Vec4				GetXYZW() const													{ return mValue; }
 
 	/// Set individual components
 	JPH_INLINE void				SetX(float inX)													{ mValue.SetX(inX); }

+ 4 - 4
Jolt/Math/Quat.inl

@@ -73,11 +73,11 @@ Quat Quat::operator * (QuatArg inRHS) const
 
 Quat Quat::sRotation(Vec3Arg inAxis, float inAngle)
 {
-    // returns [inAxis * sin(0.5f * inAngle), cos(0.5f * inAngle)]
+	// returns [inAxis * sin(0.5f * inAngle), cos(0.5f * inAngle)]
 	JPH_ASSERT(inAxis.IsNormalized());
 	Vec4 s, c;
 	Vec4::sReplicate(0.5f * inAngle).SinCos(s, c);
-    return Quat(Vec4::sSelect(Vec4(inAxis) * s, c, UVec4(0, 0, 0, 0xffffffffU)));
+	return Quat(Vec4::sSelect(Vec4(inAxis) * s, c, UVec4(0, 0, 0, 0xffffffffU)));
 }
 
 void Quat::GetAxisAngle(Vec3 &outAxis, float &outAngle) const
@@ -237,12 +237,12 @@ Quat Quat::LERP(QuatArg inDestination, float inFraction) const
 
 Quat Quat::SLERP(QuatArg inDestination, float inFraction) const
 {
-    // Difference at which to LERP instead of SLERP
+	// Difference at which to LERP instead of SLERP
 	const float delta = 0.0001f;
 
 	// Calc cosine
 	float sign_scale1 = 1.0f;
-    float cos_omega = Dot(inDestination);
+	float cos_omega = Dot(inDestination);
 
 	// Adjust signs (if necessary)
 	if (cos_omega < 0.0f)

+ 1 - 1
Jolt/Math/Real.h

@@ -26,7 +26,7 @@ using RMat44Arg = DMat44Arg;
 // Define real to float
 using Real = float;
 using Real3 = Float3;
-using RVec3  = Vec3;
+using RVec3 = Vec3;
 using RVec3Arg = Vec3Arg;
 using RMat44 = Mat44;
 using RMat44Arg = Mat44Arg;

+ 3 - 3
Jolt/Math/UVec4.inl

@@ -369,7 +369,7 @@ int UVec4::CountTrues() const
 #if defined(JPH_USE_SSE)
 	return CountBits(_mm_movemask_ps(_mm_castsi128_ps(mValue)));
 #elif defined(JPH_USE_NEON)
-    return vaddvq_u32(vshrq_n_u32(mValue, 31));
+	return vaddvq_u32(vshrq_n_u32(mValue, 31));
 #else
 	return (mU32[0] >> 31) + (mU32[1] >> 31) + (mU32[2] >> 31) + (mU32[3] >> 31);
 #endif
@@ -380,8 +380,8 @@ int UVec4::GetTrues() const
 #if defined(JPH_USE_SSE)
 	return _mm_movemask_ps(_mm_castsi128_ps(mValue));
 #elif defined(JPH_USE_NEON)
-    int32x4_t shift = JPH_NEON_INT32x4(0, 1, 2, 3);
-    return vaddvq_u32(vshlq_u32(vshrq_n_u32(mValue, 31), shift));
+	int32x4_t shift = JPH_NEON_INT32x4(0, 1, 2, 3);
+	return vaddvq_u32(vshlq_u32(vshrq_n_u32(mValue, 31), shift));
 #else
 	return (mU32[0] >> 31) | ((mU32[1] >> 31) << 1) | ((mU32[2] >> 31) << 2) | ((mU32[3] >> 31) << 3);
 #endif

+ 33 - 33
Jolt/Math/Vec3.inl

@@ -57,9 +57,9 @@ Vec3::Vec3(const Float3 &inV)
 	Type xy = _mm_unpacklo_ps(x, y);
 	mValue = _mm_shuffle_ps(xy, z, _MM_SHUFFLE(0, 0, 1, 0)); // Assure Z and W are the same
 #elif defined(JPH_USE_NEON)
-    float32x2_t xy = vld1_f32(&inV.x);
-    float32x2_t zz = vdup_n_f32(inV.z); // Assure Z and W are the same
-    mValue = vcombine_f32(xy, zz);
+	float32x2_t xy = vld1_f32(&inV.x);
+	float32x2_t zz = vdup_n_f32(inV.z); // Assure Z and W are the same
+	mValue = vcombine_f32(xy, zz);
 #else
 	mF32[0] = inV[0];
 	mF32[1] = inV[1];
@@ -591,18 +591,18 @@ Vec3 Vec3::Cross(Vec3Arg inV2) const
 {
 #if defined(JPH_USE_SSE)
 	Type t1 = _mm_shuffle_ps(inV2.mValue, inV2.mValue, _MM_SHUFFLE(0, 0, 2, 1)); // Assure Z and W are the same
-    t1 = _mm_mul_ps(t1, mValue);
-    Type t2 = _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(0, 0, 2, 1)); // Assure Z and W are the same
-    t2 = _mm_mul_ps(t2, inV2.mValue);
-    Type t3 = _mm_sub_ps(t1, t2);
-    return _mm_shuffle_ps(t3, t3, _MM_SHUFFLE(0, 0, 2, 1)); // Assure Z and W are the same
+	t1 = _mm_mul_ps(t1, mValue);
+	Type t2 = _mm_shuffle_ps(mValue, mValue, _MM_SHUFFLE(0, 0, 2, 1)); // Assure Z and W are the same
+	t2 = _mm_mul_ps(t2, inV2.mValue);
+	Type t3 = _mm_sub_ps(t1, t2);
+	return _mm_shuffle_ps(t3, t3, _MM_SHUFFLE(0, 0, 2, 1)); // Assure Z and W are the same
 #elif defined(JPH_USE_NEON)
 	Type t1 = JPH_NEON_SHUFFLE_F32x4(inV2.mValue, inV2.mValue, 1, 2, 0, 0); // Assure Z and W are the same
-    t1 = vmulq_f32(t1, mValue);
-    Type t2 = JPH_NEON_SHUFFLE_F32x4(mValue, mValue, 1, 2, 0, 0); // Assure Z and W are the same
-    t2 = vmulq_f32(t2, inV2.mValue);
-    Type t3 = vsubq_f32(t1, t2);
-    return JPH_NEON_SHUFFLE_F32x4(t3, t3, 1, 2, 0, 0); // Assure Z and W are the same
+	t1 = vmulq_f32(t1, mValue);
+	Type t2 = JPH_NEON_SHUFFLE_F32x4(mValue, mValue, 1, 2, 0, 0); // Assure Z and W are the same
+	t2 = vmulq_f32(t2, inV2.mValue);
+	Type t3 = vsubq_f32(t1, t2);
+	return JPH_NEON_SHUFFLE_F32x4(t3, t3, 1, 2, 0, 0); // Assure Z and W are the same
 #else
 	return Vec3(mF32[1] * inV2.mF32[2] - mF32[2] * inV2.mF32[1],
 				mF32[2] * inV2.mF32[0] - mF32[0] * inV2.mF32[2],
@@ -615,9 +615,9 @@ Vec3 Vec3::DotV(Vec3Arg inV2) const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_dp_ps(mValue, inV2.mValue, 0x7f);
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
+	float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
 	mul = vsetq_lane_f32(0, mul, 3);
-    return vdupq_n_f32(vaddvq_f32(mul));
+	return vdupq_n_f32(vaddvq_f32(mul));
 #else
 	float dot = 0.0f;
 	for (int i = 0; i < 3; i++)
@@ -631,9 +631,9 @@ Vec4 Vec3::DotV4(Vec3Arg inV2) const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_dp_ps(mValue, inV2.mValue, 0x7f);
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
+	float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
 	mul = vsetq_lane_f32(0, mul, 3);
-    return vdupq_n_f32(vaddvq_f32(mul));
+	return vdupq_n_f32(vaddvq_f32(mul));
 #else
 	float dot = 0.0f;
 	for (int i = 0; i < 3; i++)
@@ -647,9 +647,9 @@ float Vec3::Dot(Vec3Arg inV2) const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_cvtss_f32(_mm_dp_ps(mValue, inV2.mValue, 0x7f));
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
+	float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
 	mul = vsetq_lane_f32(0, mul, 3);
-    return vaddvq_f32(mul);
+	return vaddvq_f32(mul);
 #else
 	float dot = 0.0f;
 	for (int i = 0; i < 3; i++)
@@ -663,9 +663,9 @@ float Vec3::LengthSq() const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_cvtss_f32(_mm_dp_ps(mValue, mValue, 0x7f));
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, mValue);
+	float32x4_t mul = vmulq_f32(mValue, mValue);
 	mul = vsetq_lane_f32(0, mul, 3);
-    return vaddvq_f32(mul);
+	return vaddvq_f32(mul);
 #else
 	float len_sq = 0.0f;
 	for (int i = 0; i < 3; i++)
@@ -679,10 +679,10 @@ float Vec3::Length() const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_cvtss_f32(_mm_sqrt_ss(_mm_dp_ps(mValue, mValue, 0x7f)));
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, mValue);
+	float32x4_t mul = vmulq_f32(mValue, mValue);
 	mul = vsetq_lane_f32(0, mul, 3);
-    float32x2_t sum = vdup_n_f32(vaddvq_f32(mul));
-    return vget_lane_f32(vsqrt_f32(sum), 0);
+	float32x2_t sum = vdup_n_f32(vaddvq_f32(mul));
+	return vget_lane_f32(vsqrt_f32(sum), 0);
 #else
 	return sqrt(LengthSq());
 #endif
@@ -704,10 +704,10 @@ Vec3 Vec3::Normalized() const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_div_ps(mValue, _mm_sqrt_ps(_mm_dp_ps(mValue, mValue, 0x7f)));
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, mValue);
+	float32x4_t mul = vmulq_f32(mValue, mValue);
 	mul = vsetq_lane_f32(0, mul, 3);
-    float32x4_t sum = vdupq_n_f32(vaddvq_f32(mul));
-    return vdivq_f32(mValue, vsqrtq_f32(sum));
+	float32x4_t sum = vdupq_n_f32(vaddvq_f32(mul));
+	return vdivq_f32(mValue, vsqrtq_f32(sum));
 #else
 	return *this / Length();
 #endif
@@ -727,12 +727,12 @@ Vec3 Vec3::NormalizedOr(Vec3Arg inZeroValue) const
 	return _mm_blendv_ps(_mm_div_ps(mValue, _mm_sqrt_ps(len_sq)), inZeroValue.mValue, is_zero);
 #endif // JPH_FLOATING_POINT_EXCEPTIONS_ENABLED
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, mValue);
+	float32x4_t mul = vmulq_f32(mValue, mValue);
 	mul = vsetq_lane_f32(0, mul, 3);
-    float32x4_t sum = vdupq_n_f32(vaddvq_f32(mul));
+	float32x4_t sum = vdupq_n_f32(vaddvq_f32(mul));
 	float32x4_t len = vsqrtq_f32(sum);
 	float32x4_t is_zero = vceqq_f32(len, vdupq_n_f32(0));
-    return vbslq_f32(is_zero, inZeroValue.mValue, vdivq_f32(mValue, len));
+	return vbslq_f32(is_zero, inZeroValue.mValue, vdivq_f32(mValue, len));
 #else
 	float len_sq = LengthSq();
 	if (len_sq == 0.0f)
@@ -771,9 +771,9 @@ void Vec3::StoreFloat3(Float3 *outV) const
 	t = t.Swizzle<SWIZZLE_Y, SWIZZLE_UNUSED, SWIZZLE_UNUSED>();
 	_mm_store_ss(&outV->z, t.mValue);
 #elif defined(JPH_USE_NEON)
-    float32x2_t xy = vget_low_f32(mValue);
-    vst1_f32(&outV->x, xy);
-    vst1q_lane_f32(&outV->z, mValue, 2);
+	float32x2_t xy = vget_low_f32(mValue);
+	vst1_f32(&outV->x, xy);
+	vst1q_lane_f32(&outV->z, mValue, 2);
 #else
 	outV->x = mF32[0];
 	outV->y = mF32[1];

+ 15 - 15
Jolt/Math/Vec4.inl

@@ -619,8 +619,8 @@ Vec4 Vec4::DotV(Vec4Arg inV2) const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_dp_ps(mValue, inV2.mValue, 0xff);
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
-    return vdupq_n_f32(vaddvq_f32(mul));
+	float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
+	return vdupq_n_f32(vaddvq_f32(mul));
 #else
 	// Brackets placed so that the order is consistent with the vectorized version
 	return Vec4::sReplicate((mF32[0] * inV2.mF32[0] + mF32[1] * inV2.mF32[1]) + (mF32[2] * inV2.mF32[2] + mF32[3] * inV2.mF32[3]));
@@ -632,8 +632,8 @@ float Vec4::Dot(Vec4Arg inV2) const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_cvtss_f32(_mm_dp_ps(mValue, inV2.mValue, 0xff));
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
-    return vaddvq_f32(mul);
+	float32x4_t mul = vmulq_f32(mValue, inV2.mValue);
+	return vaddvq_f32(mul);
 #else
 	// Brackets placed so that the order is consistent with the vectorized version
 	return (mF32[0] * inV2.mF32[0] + mF32[1] * inV2.mF32[1]) + (mF32[2] * inV2.mF32[2] + mF32[3] * inV2.mF32[3]);
@@ -645,8 +645,8 @@ float Vec4::LengthSq() const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_cvtss_f32(_mm_dp_ps(mValue, mValue, 0xff));
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, mValue);
-    return vaddvq_f32(mul);
+	float32x4_t mul = vmulq_f32(mValue, mValue);
+	return vaddvq_f32(mul);
 #else
 	// Brackets placed so that the order is consistent with the vectorized version
 	return (mF32[0] * mF32[0] + mF32[1] * mF32[1]) + (mF32[2] * mF32[2] + mF32[3] * mF32[3]);
@@ -658,9 +658,9 @@ float Vec4::Length() const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_cvtss_f32(_mm_sqrt_ss(_mm_dp_ps(mValue, mValue, 0xff)));
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, mValue);
-    float32x2_t sum = vdup_n_f32(vaddvq_f32(mul));
-    return vget_lane_f32(vsqrt_f32(sum), 0);
+	float32x4_t mul = vmulq_f32(mValue, mValue);
+	float32x2_t sum = vdup_n_f32(vaddvq_f32(mul));
+	return vget_lane_f32(vsqrt_f32(sum), 0);
 #else
 	// Brackets placed so that the order is consistent with the vectorized version
 	return sqrt((mF32[0] * mF32[0] + mF32[1] * mF32[1]) + (mF32[2] * mF32[2] + mF32[3] * mF32[3]));
@@ -704,9 +704,9 @@ Vec4 Vec4::Normalized() const
 #if defined(JPH_USE_SSE4_1)
 	return _mm_div_ps(mValue, _mm_sqrt_ps(_mm_dp_ps(mValue, mValue, 0xff)));
 #elif defined(JPH_USE_NEON)
-    float32x4_t mul = vmulq_f32(mValue, mValue);
-    float32x4_t sum = vdupq_n_f32(vaddvq_f32(mul));
-    return vdivq_f32(mValue, vsqrtq_f32(sum));
+	float32x4_t mul = vmulq_f32(mValue, mValue);
+	float32x4_t sum = vdupq_n_f32(vaddvq_f32(mul));
+	return vdivq_f32(mValue, vsqrtq_f32(sum));
 #else
 	return *this / Length();
 #endif
@@ -717,7 +717,7 @@ void Vec4::StoreFloat4(Float4 *outV) const
 #if defined(JPH_USE_SSE)
 	_mm_storeu_ps(&outV->x, mValue);
 #elif defined(JPH_USE_NEON)
-    vst1q_f32(&outV->x, mValue);
+	vst1q_f32(&outV->x, mValue);
 #else
 	for (int i = 0; i < 4; ++i)
 		(&outV->x)[i] = mF32[i];
@@ -751,8 +751,8 @@ int Vec4::GetSignBits() const
 #if defined(JPH_USE_SSE)
 	return _mm_movemask_ps(mValue);
 #elif defined(JPH_USE_NEON)
-    int32x4_t shift = JPH_NEON_INT32x4(0, 1, 2, 3);
-    return vaddvq_u32(vshlq_u32(vshrq_n_u32(vreinterpretq_u32_f32(mValue), 31), shift));
+	int32x4_t shift = JPH_NEON_INT32x4(0, 1, 2, 3);
+	return vaddvq_u32(vshlq_u32(vshrq_n_u32(vreinterpretq_u32_f32(mValue), 31), shift));
 #else
 	return (signbit(mF32[0])? 1 : 0) | (signbit(mF32[1])? 2 : 0) | (signbit(mF32[2])? 4 : 0) | (signbit(mF32[3])? 8 : 0);
 #endif

+ 1 - 1
Jolt/ObjectStream/ObjectStreamBinaryIn.h

@@ -17,7 +17,7 @@ public:
 	JPH_OVERRIDE_NEW_DELETE
 
 	/// Constructor
-	explicit 					ObjectStreamBinaryIn(istream &inStream);
+	explicit					ObjectStreamBinaryIn(istream &inStream);
 
 	///@name Input type specific operations
 	virtual bool				ReadDataType(EOSDataType &outType) override;

+ 1 - 1
Jolt/ObjectStream/ObjectStreamBinaryOut.h

@@ -17,7 +17,7 @@ public:
 	JPH_OVERRIDE_NEW_DELETE
 
 	/// Constructor and destructor
-	explicit 					ObjectStreamBinaryOut(ostream &inStream);
+	explicit					ObjectStreamBinaryOut(ostream &inStream);
 
 	///@name Output type specific operations
 	virtual void				WriteDataType(EOSDataType inType) override;

+ 2 - 2
Jolt/ObjectStream/ObjectStreamIn.h

@@ -88,7 +88,7 @@ public:
 
 protected:
 	/// Constructor
-	explicit 					ObjectStreamIn(istream &inStream);
+	explicit					ObjectStreamIn(istream &inStream);
 
 	/// Determine the type and version of an object stream
 	static bool					GetInfo(istream &inStream, EStreamType &outType, int &outVersion, int &outRevision);
@@ -112,7 +112,7 @@ private:
 	struct ClassDescription
 	{
 								ClassDescription() = default;
-		explicit 				ClassDescription(const RTTI *inRTTI)					: mRTTI(inRTTI) { }
+		explicit				ClassDescription(const RTTI *inRTTI)					: mRTTI(inRTTI) { }
 
 		const RTTI *			mRTTI = nullptr;
 		Array<AttributeDescription>	mAttributes;

+ 1 - 1
Jolt/ObjectStream/ObjectStreamOut.h

@@ -73,7 +73,7 @@ protected:
 	static ObjectStreamOut *	Open(EStreamType inType, ostream &inStream);
 
 	/// Constructor
-	explicit 					ObjectStreamOut(ostream &inStream);
+	explicit					ObjectStreamOut(ostream &inStream);
 
 	ostream &					mStream;
 

+ 18 - 18
Jolt/ObjectStream/ObjectStreamTextIn.cpp

@@ -30,41 +30,41 @@ bool ObjectStreamTextIn::ReadDataType(EOSDataType &outType)
 		else if (token == "pointer")
 			outType = EOSDataType::Pointer;
 		else if (token == "array")
-			outType  = EOSDataType::Array;
+			outType = EOSDataType::Array;
 		else if (token == "uint8")
-			outType  = EOSDataType::T_uint8;
+			outType = EOSDataType::T_uint8;
 		else if (token == "uint16")
-			outType  = EOSDataType::T_uint16;
+			outType = EOSDataType::T_uint16;
 		else if (token == "int")
-			outType  = EOSDataType::T_int;
+			outType = EOSDataType::T_int;
 		else if (token == "uint32")
-			outType  = EOSDataType::T_uint32;
+			outType = EOSDataType::T_uint32;
 		else if (token == "uint64")
-			outType  = EOSDataType::T_uint64;
+			outType = EOSDataType::T_uint64;
 		else if (token == "float")
-			outType  = EOSDataType::T_float;
+			outType = EOSDataType::T_float;
 		else if (token == "double")
-			outType  = EOSDataType::T_double;
+			outType = EOSDataType::T_double;
 		else if (token == "bool")
-			outType  = EOSDataType::T_bool;
+			outType = EOSDataType::T_bool;
 		else if (token == "string")
-			outType  = EOSDataType::T_String;
+			outType = EOSDataType::T_String;
 		else if (token == "float3")
-			outType  = EOSDataType::T_Float3;
+			outType = EOSDataType::T_Float3;
 		else if (token == "double3")
-			outType  = EOSDataType::T_Double3;
+			outType = EOSDataType::T_Double3;
 		else if (token == "vec3")
-			outType  = EOSDataType::T_Vec3;
+			outType = EOSDataType::T_Vec3;
 		else if (token == "dvec3")
-			outType  = EOSDataType::T_DVec3;
+			outType = EOSDataType::T_DVec3;
 		else if (token == "vec4")
-			outType  = EOSDataType::T_Vec4;
+			outType = EOSDataType::T_Vec4;
 		else if (token == "quat")
-			outType  = EOSDataType::T_Quat;
+			outType = EOSDataType::T_Quat;
 		else if (token == "mat44")
-			outType  = EOSDataType::T_Mat44;
+			outType = EOSDataType::T_Mat44;
 		else if (token == "dmat44")
-			outType  = EOSDataType::T_DMat44;
+			outType = EOSDataType::T_DMat44;
 		else
 		{
 			Trace("ObjectStreamTextIn: Found unknown data type.");

+ 1 - 1
Jolt/ObjectStream/SerializableObject.h

@@ -51,7 +51,7 @@ JPH_NAMESPACE_BEGIN
 	{																												\
 		if (inPointer)																								\
 			ioStream.WritePointerData(GetRTTI(inPointer), (void *)inPointer);										\
-		else 																										\
+		else																										\
 			ioStream.WritePointerData(nullptr, nullptr);															\
 	}																												\
 	void		OSWriteDataType(IObjectStreamOut &ioStream, class_name *)											\

+ 3 - 3
Jolt/Physics/Body/Body.h

@@ -228,13 +228,13 @@ public:
 	inline RVec3			GetPosition() const												{ JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::Read)); return mPosition - mRotation * mShape->GetCenterOfMass(); }
 
 	/// World space rotation of the body
-	inline Quat 			GetRotation() const												{ JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::Read)); return mRotation; }
+	inline Quat				GetRotation() const												{ JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::Read)); return mRotation; }
 
 	/// Calculates the transform of this body
 	inline RMat44			GetWorldTransform() const;
 
 	/// Gets the world space position of this body's center of mass
-	inline RVec3 			GetCenterOfMassPosition() const									{ JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::Read)); return mPosition; }
+	inline RVec3			GetCenterOfMassPosition() const									{ JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::Read)); return mPosition; }
 
 	/// Calculates the transform for this body's center of mass
 	inline RMat44			GetCenterOfMassTransform() const;
@@ -281,7 +281,7 @@ public:
 
 	/// Update position using an Euler step (used during position integrate & constraint solving)
 	inline void				AddPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime)			{ JPH_ASSERT(IsRigidBody()); JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::ReadWrite)); mPosition += mMotionProperties->LockTranslation(inLinearVelocityTimesDeltaTime); JPH_ASSERT(!mPosition.IsNaN()); }
-	inline void				SubPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime) 		{ JPH_ASSERT(IsRigidBody()); JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::ReadWrite)); mPosition -= mMotionProperties->LockTranslation(inLinearVelocityTimesDeltaTime); JPH_ASSERT(!mPosition.IsNaN()); }
+	inline void				SubPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime)			{ JPH_ASSERT(IsRigidBody()); JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::ReadWrite)); mPosition -= mMotionProperties->LockTranslation(inLinearVelocityTimesDeltaTime); JPH_ASSERT(!mPosition.IsNaN()); }
 
 	/// Update rotation using an Euler step (using during position integrate & constraint solving)
 	inline void				AddRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime);

+ 1 - 1
Jolt/Physics/Body/BodyManager.cpp

@@ -188,7 +188,7 @@ Body *BodyManager::AllocateBody(const BodyCreationSettings &inBodyCreationSettin
 	}
 	else
 	{
-	 	body = new Body;
+		body = new Body;
 	}
 	body->mBodyType = EBodyType::RigidBody;
 	body->mShape = inBodyCreationSettings.GetShape();

+ 5 - 5
Jolt/Physics/Body/MotionProperties.h

@@ -102,10 +102,10 @@ public:
 	void					SetInverseMass(float inInverseMass)								{ mInvMass = inInverseMass; }
 
 	/// Diagonal of inverse inertia matrix: D. Should only be called on a dynamic object (static or kinematic bodies have infinite mass so should be treated as D = 0)
-	inline Vec3		 		GetInverseInertiaDiagonal() const								{ JPH_ASSERT(mCachedMotionType == EMotionType::Dynamic); return mInvInertiaDiagonal; }
+	inline Vec3				GetInverseInertiaDiagonal() const								{ JPH_ASSERT(mCachedMotionType == EMotionType::Dynamic); return mInvInertiaDiagonal; }
 
 	/// Rotation (R) that takes inverse inertia diagonal to local space: \f$I_{body}^{-1} = R \: D \: R^{-1}\f$
-	inline Quat		 		GetInertiaRotation() const										{ return mInertiaRotation; }
+	inline Quat				GetInertiaRotation() const										{ return mInertiaRotation; }
 
 	/// Set the inverse inertia tensor in local space by setting the diagonal and the rotation: \f$I_{body}^{-1} = R \: D \: R^{-1}\f$.
 	/// Note that mass and inertia are linearly related (e.g. inertia of a sphere with mass m and radius r is \f$2/5 \: m \: r^2\f$).
@@ -114,10 +114,10 @@ public:
 	void					SetInverseInertia(Vec3Arg inDiagonal, QuatArg inRot)			{ mInvInertiaDiagonal = inDiagonal; mInertiaRotation = inRot; }
 
 	/// Get inverse inertia matrix (\f$I_{body}^{-1}\f$). Will be a matrix of zeros for a static or kinematic object.
-	inline Mat44 			GetLocalSpaceInverseInertia() const;
+	inline Mat44			GetLocalSpaceInverseInertia() const;
 
 	/// Same as GetLocalSpaceInverseInertia() but doesn't check if the body is dynamic
-	inline Mat44 			GetLocalSpaceInverseInertiaUnchecked() const;
+	inline Mat44			GetLocalSpaceInverseInertiaUnchecked() const;
 
 	/// Get inverse inertia matrix (\f$I^{-1}\f$) for a given object rotation (translation will be ignored). Zero if object is static or kinematic.
 	inline Mat44			GetInverseInertiaForRotation(Mat44Arg inRotation) const;
@@ -191,7 +191,7 @@ public:
 	inline void				AddLinearVelocityStep(Vec3Arg inLinearVelocityChange)			{ JPH_DET_LOG("AddLinearVelocityStep: " << inLinearVelocityChange); JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sVelocityAccess, BodyAccess::EAccess::ReadWrite)); mLinearVelocity = LockTranslation(mLinearVelocity + inLinearVelocityChange); JPH_ASSERT(!mLinearVelocity.IsNaN()); }
 	inline void				SubLinearVelocityStep(Vec3Arg inLinearVelocityChange)			{ JPH_DET_LOG("SubLinearVelocityStep: " << inLinearVelocityChange); JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sVelocityAccess, BodyAccess::EAccess::ReadWrite)); mLinearVelocity = LockTranslation(mLinearVelocity - inLinearVelocityChange); JPH_ASSERT(!mLinearVelocity.IsNaN()); }
 	inline void				AddAngularVelocityStep(Vec3Arg inAngularVelocityChange)			{ JPH_DET_LOG("AddAngularVelocityStep: " << inAngularVelocityChange); JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sVelocityAccess, BodyAccess::EAccess::ReadWrite)); mAngularVelocity += inAngularVelocityChange; JPH_ASSERT(!mAngularVelocity.IsNaN()); }
-	inline void				SubAngularVelocityStep(Vec3Arg inAngularVelocityChange) 		{ JPH_DET_LOG("SubAngularVelocityStep: " << inAngularVelocityChange); JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sVelocityAccess, BodyAccess::EAccess::ReadWrite)); mAngularVelocity -= inAngularVelocityChange; JPH_ASSERT(!mAngularVelocity.IsNaN()); }
+	inline void				SubAngularVelocityStep(Vec3Arg inAngularVelocityChange)			{ JPH_DET_LOG("SubAngularVelocityStep: " << inAngularVelocityChange); JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sVelocityAccess, BodyAccess::EAccess::ReadWrite)); mAngularVelocity -= inAngularVelocityChange; JPH_ASSERT(!mAngularVelocity.IsNaN()); }
 	///@}
 
 	/// Apply the gyroscopic force (aka Dzhanibekov effect, see https://en.wikipedia.org/wiki/Tennis_racket_theorem)

+ 2 - 2
Jolt/Physics/Character/CharacterBase.h

@@ -100,10 +100,10 @@ public:
 	bool								IsSupported() const										{ return mGroundState == EGroundState::OnGround || mGroundState == EGroundState::OnSteepGround; }
 
 	/// Get the contact point with the ground
-	RVec3 								GetGroundPosition() const								{ return mGroundPosition; }
+	RVec3								GetGroundPosition() const								{ return mGroundPosition; }
 
 	/// Get the contact normal with the ground
-	Vec3	 							GetGroundNormal() const									{ return mGroundNormal; }
+	Vec3								GetGroundNormal() const									{ return mGroundNormal; }
 
 	/// Velocity in world space of ground
 	Vec3								GetGroundVelocity() const								{ return mGroundVelocity; }

+ 1 - 1
Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h

@@ -19,7 +19,7 @@ class BroadPhaseLayer
 public:
 	using Type = uint8;
 
-	JPH_INLINE 						BroadPhaseLayer() = default;
+	JPH_INLINE						BroadPhaseLayer() = default;
 	JPH_INLINE explicit constexpr	BroadPhaseLayer(Type inValue) : mValue(inValue) { }
 	JPH_INLINE constexpr			BroadPhaseLayer(const BroadPhaseLayer &) = default;
 	JPH_INLINE BroadPhaseLayer &	operator = (const BroadPhaseLayer &) = default;

+ 2 - 2
Jolt/Physics/Collision/BroadPhase/QuadTree.h

@@ -33,11 +33,11 @@ private:
 		JPH_OVERRIDE_NEW_DELETE
 
 		/// Default constructor does not initialize
-		inline 					NodeID() = default;
+		inline					NodeID() = default;
 
 		/// Construct a node ID
 		static inline NodeID	sInvalid()							{ return NodeID(cInvalidNodeIndex); }
-		static inline NodeID	sFromBodyID(BodyID inID) 			{ NodeID node_id(inID.GetIndexAndSequenceNumber()); JPH_ASSERT(node_id.IsBody()); return node_id; }
+		static inline NodeID	sFromBodyID(BodyID inID)			{ NodeID node_id(inID.GetIndexAndSequenceNumber()); JPH_ASSERT(node_id.IsBody()); return node_id; }
 		static inline NodeID	sFromNodeIndex(uint32 inIdx)		{ NodeID node_id(inIdx | cIsNode); JPH_ASSERT(node_id.IsNode()); return node_id; }
 
 		/// Check what type of ID it is

+ 1 - 1
Jolt/Physics/Collision/Shape/BoxShape.h

@@ -44,7 +44,7 @@ public:
 							BoxShape(Vec3Arg inHalfExtent, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr) : ConvexShape(EShapeSubType::Box, inMaterial), mHalfExtent(inHalfExtent), mConvexRadius(inConvexRadius) { JPH_ASSERT(inConvexRadius >= 0.0f); JPH_ASSERT(inHalfExtent.ReduceMin() >= inConvexRadius); }
 
 	/// Get half extent of box
-	Vec3		 			GetHalfExtent() const										{ return mHalfExtent; }
+	Vec3					GetHalfExtent() const										{ return mHalfExtent; }
 
 	// See Shape::GetLocalBounds
 	virtual AABox			GetLocalBounds() const override								{ return AABox(-mHalfExtent, mHalfExtent); }

+ 5 - 5
Jolt/Physics/Collision/Shape/CompoundShapeVisitors.h

@@ -19,7 +19,7 @@ JPH_NAMESPACE_BEGIN
 
 struct CompoundShape::CastRayVisitor
 {
-	JPH_INLINE 			CastRayVisitor(const RayCast &inRay, const CompoundShape *inShape, const SubShapeIDCreator &inSubShapeIDCreator, RayCastResult &ioHit) :
+	JPH_INLINE			CastRayVisitor(const RayCast &inRay, const CompoundShape *inShape, const SubShapeIDCreator &inSubShapeIDCreator, RayCastResult &ioHit) :
 		mRay(inRay),
 		mHit(ioHit),
 		mSubShapeIDCreator(inSubShapeIDCreator),
@@ -64,7 +64,7 @@ struct CompoundShape::CastRayVisitor
 
 struct CompoundShape::CastRayVisitorCollector
 {
-	JPH_INLINE 			CastRayVisitorCollector(const RayCast &inRay, const RayCastSettings &inRayCastSettings, const CompoundShape *inShape, const SubShapeIDCreator &inSubShapeIDCreator, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter) :
+	JPH_INLINE			CastRayVisitorCollector(const RayCast &inRay, const RayCastSettings &inRayCastSettings, const CompoundShape *inShape, const SubShapeIDCreator &inSubShapeIDCreator, CastRayCollector &ioCollector, const ShapeFilter &inShapeFilter) :
 		mRay(inRay),
 		mCollector(ioCollector),
 		mSubShapeIDCreator(inSubShapeIDCreator),
@@ -225,7 +225,7 @@ struct CompoundShape::CastShapeVisitor
 
 struct CompoundShape::CollectTransformedShapesVisitor
 {
-	JPH_INLINE 			CollectTransformedShapesVisitor(const AABox &inBox, const CompoundShape *inShape, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale, const SubShapeIDCreator &inSubShapeIDCreator, TransformedShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) :
+	JPH_INLINE			CollectTransformedShapesVisitor(const AABox &inBox, const CompoundShape *inShape, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale, const SubShapeIDCreator &inSubShapeIDCreator, TransformedShapeCollector &ioCollector, const ShapeFilter &inShapeFilter) :
 		mBox(inBox),
 		mLocalBox(Mat44::sInverseRotationTranslation(inRotation, inPositionCOM), inBox),
 		mPositionCOM(inPositionCOM),
@@ -271,8 +271,8 @@ struct CompoundShape::CollectTransformedShapesVisitor
 		inSubShape.mShape->CollectTransformedShapes(mBox, position, rotation, inSubShape.TransformScale(mScale), sub_shape_id, mCollector, mShapeFilter);
 	}
 
-	AABox 							mBox;
-	OrientedBox 					mLocalBox;
+	AABox							mBox;
+	OrientedBox						mLocalBox;
 	Vec3							mPositionCOM;
 	Quat							mRotation;
 	Vec3							mScale;

+ 3 - 3
Jolt/Physics/Collision/Shape/MeshShape.cpp

@@ -392,7 +392,7 @@ Vec3 MeshShape::GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocal
 	const TriangleCodec::DecodingContext triangle_ctx(sGetTriangleHeader(mTree));
 	triangle_ctx.GetTriangle(block_start, triangle_idx, v1, v2, v3);
 
-	//  Calculate normal
+	// Calculate normal
 	return (v3 - v2).Cross(v1 - v2).Normalized();
 }
 
@@ -588,7 +588,7 @@ void MeshShape::Draw(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransfor
 	{
 		struct Visitor
 		{
-			JPH_INLINE 			Visitor(DebugRenderer *inRenderer, RMat44Arg inTransform) :
+			JPH_INLINE			Visitor(DebugRenderer *inRenderer, RMat44Arg inTransform) :
 				mRenderer(inRenderer),
 				mTransform(inTransform)
 			{
@@ -938,7 +938,7 @@ void MeshShape::sCastSphereVsMesh(const ShapeCast &inShapeCast, const ShapeCastS
 
 struct MeshShape::MSGetTrianglesContext
 {
-	JPH_INLINE 		MSGetTrianglesContext(const MeshShape *inShape, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) :
+	JPH_INLINE		MSGetTrianglesContext(const MeshShape *inShape, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) :
 		mDecodeCtx(sGetNodeHeader(inShape->mTree)),
 		mShape(inShape),
 		mLocalBox(Mat44::sInverseRotationTranslation(inRotation, inPositionCOM), inBox),

+ 1 - 1
Jolt/Physics/Collision/Shape/ScaledShape.h

@@ -45,7 +45,7 @@ public:
 									ScaledShape(const Shape *inShape, Vec3Arg inScale)		: DecoratedShape(EShapeSubType::Scaled, inShape), mScale(inScale) { }
 
 	/// Get the scale
-	Vec3		 					GetScale() const										{ return mScale; }
+	Vec3							GetScale() const										{ return mScale; }
 
 	// See Shape::GetCenterOfMass
 	virtual Vec3					GetCenterOfMass() const override						{ return mScale * mInnerShape->GetCenterOfMass(); }

+ 1 - 1
Jolt/Physics/Collision/Shape/Shape.h

@@ -170,7 +170,7 @@ public:
 	static inline ShapeFunctions &	sGet(EShapeSubType inSubType)										{ return sRegistry[int(inSubType)]; }
 
 private:
-	static ShapeFunctions 			sRegistry[NumSubShapeTypes];
+	static ShapeFunctions			sRegistry[NumSubShapeTypes];
 };
 
 /// Base class for all shapes (collision volume of a body). Defines a virtual interface for collision detection.

+ 2 - 2
Jolt/Physics/Collision/Shape/SphereShape.h

@@ -116,8 +116,8 @@ private:
 	inline float			GetScaledRadius(Vec3Arg inScale) const;
 
 	// Classes for GetSupportFunction
-	class 					SphereNoConvex;
-	class 					SphereWithConvex;
+	class					SphereNoConvex;
+	class					SphereWithConvex;
 
 	float					mRadius = 0.0f;
 };

+ 1 - 1
Jolt/Physics/Collision/Shape/TriangleShape.h

@@ -126,7 +126,7 @@ private:
 	class					TSGetTrianglesContext;
 
 	// Classes for GetSupportFunction
-	class 					TriangleNoConvex;
+	class					TriangleNoConvex;
 	class					TriangleWithConvex;
 
 	Vec3					mV1;

+ 1 - 1
Jolt/Physics/Constraints/ConeConstraint.h

@@ -99,7 +99,7 @@ public:
 	float						GetCosHalfConeAngle() const					{ return mCosHalfConeAngle; }
 
 	///@name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy the constraint)
-	inline Vec3 				GetTotalLambdaPosition() const				{ return mPointConstraintPart.GetTotalLambda(); }
+	inline Vec3					GetTotalLambdaPosition() const				{ return mPointConstraintPart.GetTotalLambda(); }
 	inline float				GetTotalLambdaRotation() const				{ return mAngleConstraintPart.GetTotalLambda(); }
 
 private:

+ 1 - 1
Jolt/Physics/Constraints/ConstraintPart/PointConstraintPart.h

@@ -210,7 +210,7 @@ public:
 	}
 
 	/// Return lagrange multiplier
-	Vec3		 				GetTotalLambda() const
+	Vec3						GetTotalLambda() const
 	{
 		return mTotalLambda;
 	}

+ 1 - 1
Jolt/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h

@@ -243,7 +243,7 @@ public:
 	}
 
 	/// Return lagrange multiplier
-	Vec3		 				GetTotalLambda() const
+	Vec3						GetTotalLambda() const
 	{
 		return mTotalLambda;
 	}

+ 1 - 1
Jolt/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h

@@ -218,7 +218,7 @@ public:
 	}
 
 	/// Return lagrange multiplier
-	Vec3		 				GetTotalLambda() const
+	Vec3						GetTotalLambda() const
 	{
 		return mTotalLambda;
 	}

+ 1 - 1
Jolt/Physics/Constraints/DistanceConstraint.h

@@ -83,7 +83,7 @@ public:
 	void						SetLimitsSpringSettings(const SpringSettings &inLimitsSpringSettings) { mLimitsSpringSettings = inLimitsSpringSettings; }
 
 	///@name Get Lagrange multiplier from last physics update (the linear impulse applied to satisfy the constraint)
-	inline float	 			GetTotalLambdaPosition() const								{ return mAxisConstraint.GetTotalLambda(); }
+	inline float				GetTotalLambdaPosition() const								{ return mAxisConstraint.GetTotalLambda(); }
 
 private:
 	// Internal helper function to calculate the values below

+ 1 - 1
Jolt/Physics/Constraints/HingeConstraint.h

@@ -121,7 +121,7 @@ public:
 	void						SetLimitsSpringSettings(const SpringSettings &inLimitsSpringSettings) { mLimitsSpringSettings = inLimitsSpringSettings; }
 
 	///@name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy the constraint)
-	inline Vec3		 			GetTotalLambdaPosition() const							{ return mPointConstraintPart.GetTotalLambda(); }
+	inline Vec3					GetTotalLambdaPosition() const							{ return mPointConstraintPart.GetTotalLambda(); }
 	inline Vector<2>			GetTotalLambdaRotation() const							{ return mRotationConstraintPart.GetTotalLambda(); }
 	inline float				GetTotalLambdaRotationLimits() const					{ return mRotationLimitsConstraintPart.GetTotalLambda(); }
 	inline float				GetTotalLambdaMotor() const								{ return mMotorConstraintPart.GetTotalLambda(); }

+ 1 - 1
Jolt/Physics/Constraints/PathConstraintPathHermite.cpp

@@ -139,7 +139,7 @@ static inline float sCalculateClosestPointThroughNewtonRaphson(Vec3Arg inP1, Vec
 		float d2dt_h01 = -d2dt_h00;
 		float d2dt_h11 = 6.0f * t - 2.0f;
 		Vec3 ddt_tangent = d2dt_h00 * inP1 + d2dt_h10 * inM1 + d2dt_h01 * inP2 + d2dt_h11 * inM2;
-		float d2dt = tangent.Dot(tangent) + position.Dot(ddt_tangent);  // Leaving out factor 2, because we left it out above too
+		float d2dt = tangent.Dot(tangent) + position.Dot(ddt_tangent); // Leaving out factor 2, because we left it out above too
 
 		// If d2dt is zero, the curve is flat and there are multiple t's for which we are closest to the origin, stop now
 		if (d2dt == 0.0f)

+ 1 - 1
Jolt/Physics/Constraints/PointConstraint.h

@@ -77,7 +77,7 @@ public:
 	virtual Mat44				GetConstraintToBody2Matrix() const override					{ return Mat44::sTranslation(mLocalSpacePosition2); } // Note: Incorrect rotation as we don't track the original rotation difference, should not matter though as the constraint is not limiting rotation.
 
 	///@name Get Lagrange multiplier from last physics update (the linear impulse applied to satisfy the constraint)
-	inline Vec3		 			GetTotalLambdaPosition() const								{ return mPointConstraintPart.GetTotalLambda(); }
+	inline Vec3					GetTotalLambdaPosition() const								{ return mPointConstraintPart.GetTotalLambda(); }
 
 private:
 	// Internal helper function to calculate the values below

+ 1 - 1
Jolt/Physics/Constraints/PulleyConstraint.h

@@ -92,7 +92,7 @@ public:
 	float						GetCurrentLength() const									{ return Vec3(mWorldSpacePosition1 - mFixedPosition1).Length() + mRatio * Vec3(mWorldSpacePosition2 - mFixedPosition2).Length(); }
 
 	///@name Get Lagrange multiplier from last physics update (the linear impulse applied to satisfy the constraint)
-	inline float	 			GetTotalLambdaPosition() const								{ return mIndependentAxisConstraintPart.GetTotalLambda(); }
+	inline float				GetTotalLambdaPosition() const								{ return mIndependentAxisConstraintPart.GetTotalLambda(); }
 
 private:
 	// Calculates world positions and normals and returns current length

+ 4 - 4
Jolt/Physics/Constraints/SixDOFConstraint.h

@@ -173,15 +173,15 @@ public:
 	EMotorState					GetMotorState(EAxis inAxis) const							{ return mMotorState[inAxis]; }
 
 	/// Set the target velocity in body 1 constraint space
-	Vec3		 				GetTargetVelocityCS() const									{ return mTargetVelocity; }
+	Vec3						GetTargetVelocityCS() const									{ return mTargetVelocity; }
 	void						SetTargetVelocityCS(Vec3Arg inVelocity)						{ mTargetVelocity = inVelocity; }
 
 	/// Set the target angular velocity in body 2 constraint space (!)
 	void						SetTargetAngularVelocityCS(Vec3Arg inAngularVelocity)		{ mTargetAngularVelocity = inAngularVelocity; }
-	Vec3		 				GetTargetAngularVelocityCS() const							{ return mTargetAngularVelocity; }
+	Vec3						GetTargetAngularVelocityCS() const							{ return mTargetAngularVelocity; }
 
 	/// Set the target position in body 1 constraint space
-	Vec3		 				GetTargetPositionCS() const									{ return mTargetPosition; }
+	Vec3						GetTargetPositionCS() const									{ return mTargetPosition; }
 	void						SetTargetPositionCS(Vec3Arg inPosition)						{ mTargetPosition = inPosition; }
 
 	/// Set the target orientation in body 1 constraint space
@@ -193,7 +193,7 @@ public:
 	void						SetTargetOrientationBS(QuatArg inOrientation)				{ SetTargetOrientationCS(mConstraintToBody1.Conjugated() * inOrientation * mConstraintToBody2); }
 
 	///@name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy the constraint)
-	inline Vec3		 			GetTotalLambdaPosition() const								{ return IsTranslationFullyConstrained()? mPointConstraintPart.GetTotalLambda() : Vec3(mTranslationConstraintPart[0].GetTotalLambda(), mTranslationConstraintPart[1].GetTotalLambda(), mTranslationConstraintPart[2].GetTotalLambda()); }
+	inline Vec3					GetTotalLambdaPosition() const								{ return IsTranslationFullyConstrained()? mPointConstraintPart.GetTotalLambda() : Vec3(mTranslationConstraintPart[0].GetTotalLambda(), mTranslationConstraintPart[1].GetTotalLambda(), mTranslationConstraintPart[2].GetTotalLambda()); }
 	inline Vec3					GetTotalLambdaRotation() const								{ return IsRotationFullyConstrained()? mRotationConstraintPart.GetTotalLambda() : Vec3(mSwingTwistConstraintPart.GetTotalTwistLambda(), mSwingTwistConstraintPart.GetTotalSwingYLambda(), mSwingTwistConstraintPart.GetTotalSwingZLambda()); }
 	inline Vec3					GetTotalLambdaMotorTranslation() const						{ return Vec3(mMotorTranslationConstraintPart[0].GetTotalLambda(), mMotorTranslationConstraintPart[1].GetTotalLambda(), mMotorTranslationConstraintPart[2].GetTotalLambda()); }
 	inline Vec3					GetTotalLambdaMotorRotation() const							{ return Vec3(mMotorRotationConstraintPart[0].GetTotalLambda(), mMotorRotationConstraintPart[1].GetTotalLambda(), mMotorRotationConstraintPart[2].GetTotalLambda()); }

+ 1 - 1
Jolt/Physics/Constraints/SliderConstraint.h

@@ -123,7 +123,7 @@ public:
 	void						SetLimitsSpringSettings(const SpringSettings &inLimitsSpringSettings) { mLimitsSpringSettings = inLimitsSpringSettings; }
 
 	///@name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy the constraint)
-	inline Vector<2> 			GetTotalLambdaPosition() const							{ return mPositionConstraintPart.GetTotalLambda(); }
+	inline Vector<2>			GetTotalLambdaPosition() const							{ return mPositionConstraintPart.GetTotalLambda(); }
 	inline float				GetTotalLambdaPositionLimits() const					{ return mPositionLimitsConstraintPart.GetTotalLambda(); }
 	inline Vec3					GetTotalLambdaRotation() const							{ return mRotationConstraintPart.GetTotalLambda(); }
 	inline float				GetTotalLambdaMotor() const								{ return mMotorConstraintPart.GetTotalLambda(); }

+ 1 - 1
Jolt/Physics/Constraints/SpringSettings.h

@@ -41,7 +41,7 @@ public:
 
 	/// Selects the way in which the spring is defined
 	/// If the mode is StiffnessAndDamping then mFrequency becomes the stiffness (k) and mDamping becomes the damping ratio (c) in the spring equation F = -k * x - c * v. Otherwise the properties are as documented.
-	ESpringMode 				mMode = ESpringMode::FrequencyAndDamping;
+	ESpringMode					mMode = ESpringMode::FrequencyAndDamping;
 
 	union
 	{

+ 7 - 7
Jolt/Physics/Constraints/SwingTwistConstraint.h

@@ -96,10 +96,10 @@ public:
 	virtual Mat44				GetConstraintToBody2Matrix() const override					{ return Mat44::sRotationTranslation(mConstraintToBody2, mLocalSpacePosition2); }
 
 	///@name Constraint reference frame
-	inline Vec3 				GetLocalSpacePosition1() const								{ return mLocalSpacePosition1; }
-	inline Vec3		 			GetLocalSpacePosition2() const								{ return mLocalSpacePosition2; }
-	inline Quat		 			GetConstraintToBody1() const								{ return mConstraintToBody1; }
-	inline Quat		 			GetConstraintToBody2() const								{ return mConstraintToBody2; }
+	inline Vec3					GetLocalSpacePosition1() const								{ return mLocalSpacePosition1; }
+	inline Vec3					GetLocalSpacePosition2() const								{ return mLocalSpacePosition2; }
+	inline Quat					GetConstraintToBody1() const								{ return mConstraintToBody1; }
+	inline Quat					GetConstraintToBody2() const								{ return mConstraintToBody2; }
 
 	///@name Constraint limits
 	inline float				GetNormalHalfConeAngle() const								{ return mNormalHalfConeAngle; }
@@ -131,11 +131,11 @@ public:
 
 	/// Set the target angular velocity of body 2 in constraint space of body 2
 	void						SetTargetAngularVelocityCS(Vec3Arg inAngularVelocity)		{ mTargetAngularVelocity = inAngularVelocity; }
-	Vec3		 				GetTargetAngularVelocityCS() const							{ return mTargetAngularVelocity; }
+	Vec3						GetTargetAngularVelocityCS() const							{ return mTargetAngularVelocity; }
 
 	/// Set the target orientation in constraint space (drives constraint to: GetRotationInConstraintSpace() == inOrientation)
 	void						SetTargetOrientationCS(QuatArg inOrientation);
-	Quat 						GetTargetOrientationCS() const								{ return mTargetOrientation; }
+	Quat						GetTargetOrientationCS() const								{ return mTargetOrientation; }
 
 	/// Set the target orientation in body space (R2 = R1 * inOrientation, where R1 and R2 are the world space rotations for body 1 and 2).
 	/// Solve: R2 * ConstraintToBody2 = R1 * ConstraintToBody1 * q (see SwingTwistConstraint::GetSwingTwist) and R2 = R1 * inOrientation for q.
@@ -146,7 +146,7 @@ public:
 	Quat						GetRotationInConstraintSpace() const;
 
 	///@name Get Lagrange multiplier from last physics update (the linear/angular impulse applied to satisfy the constraint)
-	inline Vec3		 			GetTotalLambdaPosition() const								{ return mPointConstraintPart.GetTotalLambda(); }
+	inline Vec3					GetTotalLambdaPosition() const								{ return mPointConstraintPart.GetTotalLambda(); }
 	inline float				GetTotalLambdaTwist() const									{ return mSwingTwistConstraintPart.GetTotalTwistLambda(); }
 	inline float				GetTotalLambdaSwingY() const								{ return mSwingTwistConstraintPart.GetTotalSwingYLambda(); }
 	inline float				GetTotalLambdaSwingZ() const								{ return mSwingTwistConstraintPart.GetTotalSwingZLambda(); }

+ 1 - 1
Jolt/Physics/LargeIslandSplitter.h

@@ -43,7 +43,7 @@ public:
 	struct Split
 	{
 		inline uint			GetNumContacts() const								{ return mContactBufferEnd - mContactBufferBegin; }
-		inline uint 		GetNumConstraints() const							{ return mConstraintBufferEnd - mConstraintBufferBegin; }
+		inline uint			GetNumConstraints() const							{ return mConstraintBufferEnd - mConstraintBufferBegin; }
 		inline uint			GetNumItems() const									{ return GetNumContacts() + GetNumConstraints(); }
 
 		uint32				mContactBufferBegin;								///< Begin of the contact buffer (offset relative to mContactAndConstraintIndices)

+ 3 - 3
Jolt/Physics/PhysicsLock.h

@@ -83,7 +83,7 @@ private:
 	struct LockData
 	{
 		uint32					mLockedMutexes = 0;
-		PhysicsLockContext 		mContext = nullptr;
+		PhysicsLockContext		mContext = nullptr;
 	};
 
 	static thread_local LockData sLocks[4];
@@ -133,7 +133,7 @@ public:
 private:
 	LockType &					mLock;
 #ifdef JPH_ENABLE_ASSERTS
-	PhysicsLockContext 			mContext;
+	PhysicsLockContext			mContext;
 	EPhysicsLockTypes			mType;
 #endif // JPH_ENABLE_ASSERTS
 };
@@ -161,7 +161,7 @@ public:
 private:
 	LockType &					mLock;
 #ifdef JPH_ENABLE_ASSERTS
-	PhysicsLockContext 			mContext;
+	PhysicsLockContext			mContext;
 	EPhysicsLockTypes			mType;
 #endif // JPH_ENABLE_ASSERTS
 };

+ 5 - 5
Jolt/Physics/PhysicsSystem.h

@@ -72,16 +72,16 @@ public:
 
 	/// Access to the body interface. This interface allows to to create / remove bodies and to change their properties.
 	const BodyInterface &		GetBodyInterface() const									{ return mBodyInterfaceLocking; }
-	BodyInterface &				GetBodyInterface() 											{ return mBodyInterfaceLocking; }
+	BodyInterface &				GetBodyInterface()											{ return mBodyInterfaceLocking; }
 	const BodyInterface &		GetBodyInterfaceNoLock() const								{ return mBodyInterfaceNoLock; } ///< Version that does not lock the bodies, use with great care!
-	BodyInterface & 			GetBodyInterfaceNoLock()									{ return mBodyInterfaceNoLock; } ///< Version that does not lock the bodies, use with great care!
+	BodyInterface &				GetBodyInterfaceNoLock()									{ return mBodyInterfaceNoLock; } ///< Version that does not lock the bodies, use with great care!
 
 	/// Access to the broadphase interface that allows coarse collision queries
 	const BroadPhaseQuery &		GetBroadPhaseQuery() const									{ return *mBroadPhase; }
 
 	/// Interface that allows fine collision queries against first the broad phase and then the narrow phase.
 	const NarrowPhaseQuery &	GetNarrowPhaseQuery() const									{ return mNarrowPhaseQueryLocking; }
-	const NarrowPhaseQuery & 	GetNarrowPhaseQueryNoLock() const							{ return mNarrowPhaseQueryNoLock; } ///< Version that does not lock the bodies, use with great care!
+	const NarrowPhaseQuery &	GetNarrowPhaseQueryNoLock() const							{ return mNarrowPhaseQueryNoLock; } ///< Version that does not lock the bodies, use with great care!
 
 	/// Add constraint to the world
 	void						AddConstraint(Constraint *inConstraint)						{ mConstraintManager.Add(&inConstraint, 1); }
@@ -144,7 +144,7 @@ public:
 
 	/// Set gravity value
 	void						SetGravity(Vec3Arg inGravity)								{ mGravity = inGravity; }
-	Vec3		 				GetGravity() const											{ return mGravity; }
+	Vec3						GetGravity() const											{ return mGravity; }
 
 	/// Returns a locking interface that won't actually lock the body. Use with great care!
 	inline const BodyLockInterfaceNoLock &	GetBodyLockInterfaceNoLock() const				{ return mBodyLockInterfaceNoLock; }
@@ -288,7 +288,7 @@ private:
 	/// The soft body contact listener
 	SoftBodyContactListener *	mSoftBodyContactListener = nullptr;
 
-    /// Simulation settings
+	/// Simulation settings
 	PhysicsSettings				mPhysicsSettings;
 
 	/// The contact manager resolves all contacts during a simulation step

+ 1 - 1
Jolt/Physics/Ragdoll/Ragdoll.h

@@ -215,7 +215,7 @@ public:
 	const TwoBodyConstraint *			GetConstraint(int inConstraintIndex) const				{ return mConstraints[inConstraintIndex]; }
 
 	/// Get world space bounding box for all bodies of the ragdoll
-	AABox 								GetWorldSpaceBounds(bool inLockBodies = true) const;
+	AABox								GetWorldSpaceBounds(bool inLockBodies = true) const;
 
 	/// Get the settings object that created this ragdoll
 	const RagdollSettings *				GetRagdollSettings() const								{ return mRagdollSettings; }

+ 1 - 1
Jolt/Physics/SoftBody/SoftBodyMotionProperties.h

@@ -180,7 +180,7 @@ private:
 		float							mFriction;									///< Combined friction of the two bodies
 		float							mRestitution;								///< Combined restitution of the two bodies
 		float							mSoftBodyInvMassScale;						///< Scale factor for the inverse mass of the soft body vertices
-		bool 							mUpdateVelocities;							///< If the linear/angular velocity changed and the body needs to be updated
+		bool							mUpdateVelocities;							///< If the linear/angular velocity changed and the body needs to be updated
 		Mat44							mInvInertia;								///< Inverse inertia in local space to the soft body
 		Vec3							mLinearVelocity;							///< Linear velocity of the body in local space to the soft body
 		Vec3							mAngularVelocity;							///< Angular velocity of the body in local space to the soft body

+ 2 - 2
Jolt/Physics/SoftBody/SoftBodyVertex.h

@@ -16,8 +16,8 @@ class SoftBodyVertex
 {
 public:
 	Vec3			mPreviousPosition;					///< Position at the previous time step
-	Vec3 			mPosition;							///< Position, relative to the center of mass of the soft body
-	Vec3 			mVelocity;							///< Velocity, relative to the center of mass of the soft body
+	Vec3			mPosition;							///< Position, relative to the center of mass of the soft body
+	Vec3			mVelocity;							///< Velocity, relative to the center of mass of the soft body
 	Plane			mCollisionPlane;					///< Nearest collision plane, relative to the center of mass of the soft body
 	int				mCollidingShapeIndex;				///< Index in the colliding shapes list of the body we may collide with
 	bool			mHasContact;						///< True if the vertex has collided with anything in the last update

+ 1 - 1
Jolt/Renderer/DebugRenderer.cpp

@@ -340,7 +340,7 @@ void DebugRenderer::Create8thSphereRecursive(Array<uint32> &ioIndices, Array<Ver
 		uint32 idx3 = 0xffffffff;
 
 		Create8thSphereRecursive(ioIndices, ioVertices, inDir1,  ioIdx1, center1, idx1,   center3, idx3,   inUV, inGetSupport, inLevel - 1);
-		Create8thSphereRecursive(ioIndices, ioVertices, center1, idx1,	  center2, idx2,   center3, idx3,   inUV, inGetSupport, inLevel - 1);
+		Create8thSphereRecursive(ioIndices, ioVertices, center1, idx1,	 center2, idx2,   center3, idx3,   inUV, inGetSupport, inLevel - 1);
 		Create8thSphereRecursive(ioIndices, ioVertices, center1, idx1,   inDir2,  ioIdx2, center2, idx2,   inUV, inGetSupport, inLevel - 1);
 		Create8thSphereRecursive(ioIndices, ioVertices, center3, idx3,   center2, idx2,   inDir3,  ioIdx3, inUV, inGetSupport, inLevel - 1);
 	}

+ 3 - 3
PerformanceTest/RagdollScene.h

@@ -131,9 +131,9 @@ public:
 	}
 
 private:
-	int 					mNumPilesPerAxis;
-	int 					mPileSize;
-	float 					mVerticalSeparation;
+	int						mNumPilesPerAxis;
+	int						mPileSize;
+	float					mVerticalSeparation;
 	Ref<RagdollSettings>	mRagdollSettings;
 	Ref<SkeletalAnimation>	mAnimation;
 	SkeletonPose			mPose;

+ 1 - 1
Samples/Samples.cmake

@@ -296,7 +296,7 @@ endif()
 source_group(TREE ${SAMPLES_ROOT} FILES ${SAMPLES_SRC_FILES})
 
 # Create Samples executable
-add_executable(Samples  ${SAMPLES_SRC_FILES})
+add_executable(Samples ${SAMPLES_SRC_FILES})
 target_include_directories(Samples PUBLIC ${SAMPLES_ROOT})
 target_link_libraries(Samples LINK_PUBLIC TestFramework d3d12.lib shcore.lib)
 

+ 1 - 1
Samples/Tests/General/ChangeShapeTest.h

@@ -31,7 +31,7 @@ public:
 private:
 	bool					mActivateAfterSwitch = true;
 	BodyID					mBodyID;
-	Array<RefConst<Shape>> 	mShapes;
+	Array<RefConst<Shape>>	mShapes;
 	float					mTime = 0.0f;
 	int						mShapeIdx = 0;
 };

+ 1 - 1
Samples/Tests/General/ShapeFilterTest.cpp

@@ -105,7 +105,7 @@ void ShapeFilterTest::PostPhysicsUpdate(float inDeltaTime)
 		cast_point = cast_origin + cast_motion * cast_shape_collector.mHit.mFraction;
 		color = Color::sGreen;
 	}
-    else
+	else
 	{
 		cast_point = cast_origin + cast_motion;
 		color = Color::sRed;

+ 4 - 4
Samples/Tests/ScaledShapes/ScaledOffsetCenterOfMassShapeTest.cpp

@@ -46,12 +46,12 @@ void ScaledOffsetCenterOfMassShapeTest::Initialize()
 	mBodyInterface->AddBody(body_bottom.GetID(), EActivation::Activate);
 
 	// Shape that is scaled before the offset center of mass offset is applied
-    ShapeRefC pre_scaled = OffsetCenterOfMassShapeSettings(Vec3(0, 0, 5.0f), new ScaledShape(new SphereShape(1.0f), JPH::Vec3::sReplicate(2.0f))).Create().Get();
-    Body &body_pre_scaled = *mBodyInterface->CreateBody(BodyCreationSettings(pre_scaled, RVec3(0, 5, -15), Quat::sIdentity(), EMotionType::Dynamic, Layers::MOVING));
+	ShapeRefC pre_scaled = OffsetCenterOfMassShapeSettings(Vec3(0, 0, 5.0f), new ScaledShape(new SphereShape(1.0f), JPH::Vec3::sReplicate(2.0f))).Create().Get();
+	Body &body_pre_scaled = *mBodyInterface->CreateBody(BodyCreationSettings(pre_scaled, RVec3(0, 5, -15), Quat::sIdentity(), EMotionType::Dynamic, Layers::MOVING));
 	mBodyInterface->AddBody(body_pre_scaled.GetID(), EActivation::Activate);
 
 	// Shape that is scaled after the offset center of mass offset is applied
 	ShapeRefC post_scaled = new ScaledShape(OffsetCenterOfMassShapeSettings(Vec3(0, 0, 5.0f), new SphereShape(1.0f)).Create().Get(), JPH::Vec3::sReplicate(2.0f));
-    Body &body_post_scaled = *mBodyInterface->CreateBody(BodyCreationSettings(post_scaled, RVec3(5, 5, -15), Quat::sIdentity(), EMotionType::Dynamic, Layers::MOVING));
-    mBodyInterface->AddBody(body_post_scaled.GetID(), EActivation::Activate);
+	Body &body_post_scaled = *mBodyInterface->CreateBody(BodyCreationSettings(post_scaled, RVec3(5, 5, -15), Quat::sIdentity(), EMotionType::Dynamic, Layers::MOVING));
+	mBodyInterface->AddBody(body_post_scaled.GetID(), EActivation::Activate);
 }

+ 2 - 2
Samples/Tests/Shapes/OffsetCenterOfMassShapeTest.cpp

@@ -46,12 +46,12 @@ void OffsetCenterOfMassShapeTest::Initialize()
 	bcs.mLinearDamping = 0.0f;
 	bcs.mAngularDamping = 0.0f;
 	Body *body_rotating1 = mBodyInterface->CreateBody(bcs);
-    mBodyInterface->AddBody(body_rotating1->GetID(), EActivation::Activate);
+	mBodyInterface->AddBody(body_rotating1->GetID(), EActivation::Activate);
 	body_rotating1->AddAngularImpulse(Vec3(0, 1.0e6f, 0));
 
 	// Create the same body but this time apply a torque
 	bcs.mPosition = RVec3(5, 5, 10);
 	Body *body_rotating2 = mBodyInterface->CreateBody(bcs);
-    mBodyInterface->AddBody(body_rotating2->GetID(), EActivation::Activate);
+	mBodyInterface->AddBody(body_rotating2->GetID(), EActivation::Activate);
 	body_rotating2->AddTorque(Vec3(0, 1.0e6f * 60.0f, 0)); // Assuming physics sim is at 60Hz here, otherwise the bodies won't rotate with the same speed
 }

+ 3 - 3
Samples/Tests/Vehicle/VehicleConstraintTest.h

@@ -42,7 +42,7 @@ private:
 	static inline float			sMaxEngineTorque = 500.0f;
 	static inline float			sClutchStrength = 10.0f;
 	static inline float			sFrontCasterAngle = 0.0f;
-	static inline float 		sFrontKingPinAngle = 0.0f;
+	static inline float			sFrontKingPinAngle = 0.0f;
 	static inline float			sFrontCamber = 0.0f;
 	static inline float			sFrontToe = 0.0f;
 	static inline float			sFrontSuspensionForwardAngle = 0.0f;
@@ -53,8 +53,8 @@ private:
 	static inline float			sFrontSuspensionDamping = 0.5f;
 	static inline float			sRearSuspensionForwardAngle = 0.0f;
 	static inline float			sRearSuspensionSidewaysAngle = 0.0f;
-	static inline float 		sRearCasterAngle = 0.0f;
-	static inline float 		sRearKingPinAngle = 0.0f;
+	static inline float			sRearCasterAngle = 0.0f;
+	static inline float			sRearKingPinAngle = 0.0f;
 	static inline float			sRearCamber = 0.0f;
 	static inline float			sRearToe = 0.0f;
 	static inline float			sRearSuspensionMinLength = 0.3f;

+ 32 - 32
TestFramework/Image/LoadBMP.cpp

@@ -12,27 +12,27 @@
 
 struct BitmapFileHeader
 {
-    char			mTypeB;
+	char			mTypeB;
 	char			mTypeM;
-    uint32			mSize;
-    uint16			mReserved1;
-    uint16			mReserved2;
-    uint32			mOffBits;
+	uint32			mSize;
+	uint16			mReserved1;
+	uint16			mReserved2;
+	uint32			mOffBits;
 };
 
 struct BitmapInfoHeader
 {
-    uint32			mSize;
-    uint32			mWidth;
-    uint32			mHeight;
-    uint16			mPlanes;
-    uint16			mBitCount;
-    uint32			mCompression;
-    uint32			mSizeImage;
-    uint32			mXPelsPerMeter;
-    uint32			mYPelsPerMeter;
-    uint32			mClrUsed;
-    uint32			mClrImportant;
+	uint32			mSize;
+	uint32			mWidth;
+	uint32			mHeight;
+	uint16			mPlanes;
+	uint16			mBitCount;
+	uint32			mCompression;
+	uint32			mSizeImage;
+	uint32			mXPelsPerMeter;
+	uint32			mYPelsPerMeter;
+	uint32			mClrUsed;
+	uint32			mClrImportant;
 };
 
 #pragma pack ()
@@ -163,22 +163,22 @@ bool SaveBMP(RefConst<Surface> inSurface, ostream &inStream)
 	// Fill in headers
 	bfh.mTypeB				= 'B';
 	bfh.mTypeM				= 'M';
-    bfh.mSize				= sizeof(bfh) + sizeof(bih) + src->GetHeight() * src->GetStride();
-    bfh.mReserved1			= 0;
-    bfh.mReserved2			= 0;
-    bfh.mOffBits			= sizeof(bfh) + sizeof(bih);
-
-    bih.mSize				= sizeof(bih);
-    bih.mWidth				= src->GetWidth();
-    bih.mHeight				= src->GetHeight();
-    bih.mPlanes				= 1;
-    bih.mBitCount			= 24;
-    bih.mCompression		= 0;
-    bih.mSizeImage			= src->GetHeight() * src->GetStride();
-    bih.mXPelsPerMeter		= 300;
-    bih.mYPelsPerMeter		= 300;
-    bih.mClrUsed			= 0;
-    bih.mClrImportant		= 0;
+	bfh.mSize				= sizeof(bfh) + sizeof(bih) + src->GetHeight() * src->GetStride();
+	bfh.mReserved1			= 0;
+	bfh.mReserved2			= 0;
+	bfh.mOffBits			= sizeof(bfh) + sizeof(bih);
+
+	bih.mSize				= sizeof(bih);
+	bih.mWidth				= src->GetWidth();
+	bih.mHeight				= src->GetHeight();
+	bih.mPlanes				= 1;
+	bih.mBitCount			= 24;
+	bih.mCompression		= 0;
+	bih.mSizeImage			= src->GetHeight() * src->GetStride();
+	bih.mXPelsPerMeter		= 300;
+	bih.mYPelsPerMeter		= 300;
+	bih.mClrUsed			= 0;
+	bih.mClrImportant		= 0;
 
 	// Write headers
 	inStream.write((char *)&bfh, sizeof(bfh));

+ 3 - 3
TestFramework/Input/Keyboard.cpp

@@ -88,7 +88,7 @@ bool Keyboard::Initialize(Renderer *inRenderer)
 	dipdw.diph.dwObj = 0;
 	dipdw.diph.dwHow = DIPH_DEVICE;
 	dipdw.dwData = BUFFERSIZE;
-    if (FAILED(mKeyboard->SetProperty(DIPROP_BUFFERSIZE, &dipdw.diph)))
+	if (FAILED(mKeyboard->SetProperty(DIPROP_BUFFERSIZE, &dipdw.diph)))
 	{
 		Trace("Unable to set keyboard buffer size");
 		return false;
@@ -144,8 +144,8 @@ void Keyboard::Poll()
 	}
 
 	// Check double clicks
-    for (DWORD d = 0; d < mDODLength; d++)
-    {
+	for (DWORD d = 0; d < mDODLength; d++)
+	{
 		// Check if this means a button is pressed
 		if (mDOD[d].dwData & 0x80)
 		{

+ 3 - 3
TestFramework/Input/Mouse.cpp

@@ -106,7 +106,7 @@ bool Mouse::Initialize(Renderer *inRenderer)
 	dipdw.diph.dwObj = 0;
 	dipdw.diph.dwHow = DIPH_DEVICE;
 	dipdw.dwData = BUFFERSIZE;
-    if (FAILED(mMouse->SetProperty(DIPROP_BUFFERSIZE, &dipdw.diph)))
+	if (FAILED(mMouse->SetProperty(DIPROP_BUFFERSIZE, &dipdw.diph)))
 	{
 		Trace("Unable to set mouse buffer size");
 		return false;
@@ -198,8 +198,8 @@ void Mouse::Poll()
 	}
 
 	// Check for double clicks
-    for (DWORD d = 0; d < mDODLength; d++)
-    {
+	for (DWORD d = 0; d < mDODLength; d++)
+	{
 		// Check if this means left button is pressed
 		if (mDOD[d].dwOfs == DIMOFS_BUTTON0)
 		{

+ 87 - 87
TestFramework/Renderer/CommandQueue.h

@@ -11,107 +11,107 @@ class CommandQueue
 {
 public:
 	/// Destructor
-                                        ~CommandQueue()
-    {
-        WaitUntilFinished();
+										~CommandQueue()
+	{
+		WaitUntilFinished();
 
-        if (mFenceEvent != INVALID_HANDLE_VALUE)
-            CloseHandle(mFenceEvent);
-    }
+		if (mFenceEvent != INVALID_HANDLE_VALUE)
+			CloseHandle(mFenceEvent);
+	}
 
-    /// Initialize the queue
-    void                                Initialize(ID3D12Device *inDevice)
-    {
-        D3D12_COMMAND_QUEUE_DESC queue_desc = {};
-        queue_desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
-        queue_desc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
-        FatalErrorIfFailed(inDevice->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(&mCommandQueue)));
+	/// Initialize the queue
+	void								Initialize(ID3D12Device *inDevice)
+	{
+		D3D12_COMMAND_QUEUE_DESC queue_desc = {};
+		queue_desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
+		queue_desc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
+		FatalErrorIfFailed(inDevice->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(&mCommandQueue)));
 
-        FatalErrorIfFailed(inDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&mCommandAllocator)));
+		FatalErrorIfFailed(inDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&mCommandAllocator)));
 
-        // Create the command list
-        FatalErrorIfFailed(inDevice->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, mCommandAllocator.Get(), nullptr, IID_PPV_ARGS(&mCommandList)));
+		// Create the command list
+		FatalErrorIfFailed(inDevice->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, mCommandAllocator.Get(), nullptr, IID_PPV_ARGS(&mCommandList)));
 
-        // Command lists are created in the recording state, but there is nothing to record yet. The main loop expects it to be closed, so close it now
-        FatalErrorIfFailed(mCommandList->Close());
+		// Command lists are created in the recording state, but there is nothing to record yet. The main loop expects it to be closed, so close it now
+		FatalErrorIfFailed(mCommandList->Close());
 
-        // Create synchronization object
-        FatalErrorIfFailed(inDevice->CreateFence(mFenceValue, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&mFence)));
+		// Create synchronization object
+		FatalErrorIfFailed(inDevice->CreateFence(mFenceValue, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&mFence)));
 
 		// Increment fence value so we don't skip waiting the first time a command list is executed
 		mFenceValue++;
 
-        // Create an event handle to use for frame synchronization
-        mFenceEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
-        if (mFenceEvent == nullptr)
-            FatalErrorIfFailed(HRESULT_FROM_WIN32(GetLastError()));
-    }
-
-    /// Start the command list (requires waiting until the previous one is finished)
-    ID3D12GraphicsCommandList *         Start()
-    {
-	    // Reset the allocator
-        FatalErrorIfFailed(mCommandAllocator->Reset());
-
-	    // Reset the command list
-        FatalErrorIfFailed(mCommandList->Reset(mCommandAllocator.Get(), nullptr));
-
-	    return mCommandList.Get();
-    }
-
-    /// Execute accumulated command list
-    void                                Execute()
-    {
-        JPH_ASSERT(!mIsExecuting);
-
-	    // Close the command list
-        FatalErrorIfFailed(mCommandList->Close());
-
-	    // Execute the command list
-        ID3D12CommandList* ppCommandLists[] = { mCommandList.Get() };
-        mCommandQueue->ExecuteCommandLists(_countof(ppCommandLists), ppCommandLists);
-
-        // Schedule a Signal command in the queue
-        FatalErrorIfFailed(mCommandQueue->Signal(mFence.Get(), mFenceValue));
-
-        // Mark that we're executing
-        mIsExecuting = true;
-    }
-
-    /// After executing, this waits until execution is done
-    void                                WaitUntilFinished()
-    {
-        // Check if we've been started
-        if (mIsExecuting)
-        {
-            if (mFence->GetCompletedValue() < mFenceValue)
-            {
-                // Wait until the fence has been processed
-                FatalErrorIfFailed(mFence->SetEventOnCompletion(mFenceValue, mFenceEvent));
-                WaitForSingleObjectEx(mFenceEvent, INFINITE, FALSE);
-            }
+		// Create an event handle to use for frame synchronization
+		mFenceEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr);
+		if (mFenceEvent == nullptr)
+			FatalErrorIfFailed(HRESULT_FROM_WIN32(GetLastError()));
+	}
+
+	/// Start the command list (requires waiting until the previous one is finished)
+	ID3D12GraphicsCommandList *			Start()
+	{
+		// Reset the allocator
+		FatalErrorIfFailed(mCommandAllocator->Reset());
+
+		// Reset the command list
+		FatalErrorIfFailed(mCommandList->Reset(mCommandAllocator.Get(), nullptr));
+
+		return mCommandList.Get();
+	}
+
+	/// Execute accumulated command list
+	void								Execute()
+	{
+		JPH_ASSERT(!mIsExecuting);
+
+		// Close the command list
+		FatalErrorIfFailed(mCommandList->Close());
+
+		// Execute the command list
+		ID3D12CommandList* ppCommandLists[] = { mCommandList.Get() };
+		mCommandQueue->ExecuteCommandLists(_countof(ppCommandLists), ppCommandLists);
+
+		// Schedule a Signal command in the queue
+		FatalErrorIfFailed(mCommandQueue->Signal(mFence.Get(), mFenceValue));
+
+		// Mark that we're executing
+		mIsExecuting = true;
+	}
+
+	/// After executing, this waits until execution is done
+	void								WaitUntilFinished()
+	{
+		// Check if we've been started
+		if (mIsExecuting)
+		{
+			if (mFence->GetCompletedValue() < mFenceValue)
+			{
+				// Wait until the fence has been processed
+				FatalErrorIfFailed(mFence->SetEventOnCompletion(mFenceValue, mFenceEvent));
+				WaitForSingleObjectEx(mFenceEvent, INFINITE, FALSE);
+			}
 
 			// Increment the fence value
-            mFenceValue++;
+			mFenceValue++;
 
-            // Done executing
-            mIsExecuting = false;
-        }
-    }
+			// Done executing
+			mIsExecuting = false;
+		}
+	}
 
-    /// Execute and wait for the command list to finish
-    void                                ExecuteAndWait()
-    {
-        Execute();
-        WaitUntilFinished();
-    }
+	/// Execute and wait for the command list to finish
+	void								ExecuteAndWait()
+	{
+		Execute();
+		WaitUntilFinished();
+	}
 
 private:
-    ComPtr<ID3D12CommandQueue>		    mCommandQueue;								///< The command queue that will hold command lists
-    ComPtr<ID3D12CommandAllocator>	    mCommandAllocator;							///< Allocator that holds the memory for the commands
-    ComPtr<ID3D12GraphicsCommandList>   mCommandList;								///< The command list that will hold the render commands / state changes
-    HANDLE							    mFenceEvent = INVALID_HANDLE_VALUE;			///< Fence event, used to wait for rendering to complete
-    ComPtr<ID3D12Fence>				    mFence;										///< Fence object, used to signal the fence event
-	UINT64							    mFenceValue = 0;							///< Current fence value, each time we need to wait we will signal the fence with this value, wait for it and then increase the value
-    bool                                mIsExecuting = false;						///< If a commandlist is currently executing on the queue
+	ComPtr<ID3D12CommandQueue>			mCommandQueue;								///< The command queue that will hold command lists
+	ComPtr<ID3D12CommandAllocator>		mCommandAllocator;							///< Allocator that holds the memory for the commands
+	ComPtr<ID3D12GraphicsCommandList>	mCommandList;								///< The command list that will hold the render commands / state changes
+	HANDLE								mFenceEvent = INVALID_HANDLE_VALUE;			///< Fence event, used to wait for rendering to complete
+	ComPtr<ID3D12Fence>					mFence;										///< Fence object, used to signal the fence event
+	UINT64								mFenceValue = 0;							///< Current fence value, each time we need to wait we will signal the fence with this value, wait for it and then increase the value
+	bool								mIsExecuting = false;						///< If a commandlist is currently executing on the queue
 };

+ 1 - 1
TestFramework/Renderer/ConstantBuffer.h

@@ -27,6 +27,6 @@ private:
 	void *								MapInternal();
 
 	Renderer *							mRenderer;
-    ComPtr<ID3D12Resource>				mBuffer;
+	ComPtr<ID3D12Resource>				mBuffer;
 	uint64								mBufferSize;
 };

+ 5 - 5
TestFramework/Renderer/Font.cpp

@@ -44,11 +44,11 @@ Font::Create(const char *inFontName, int inCharHeight)
 	font_desc.lfPitchAndFamily	= VARIABLE_PITCH;
 	strcpy_s(font_desc.lfFaceName, mFontName.c_str());
 	HFONT font = CreateFontIndirectA(&font_desc);
-    if (font == nullptr)
+	if (font == nullptr)
 		return false;
 
 	// Create a DC for the font
-    HDC dc = CreateCompatibleDC(nullptr);
+	HDC dc = CreateCompatibleDC(nullptr);
 	if (dc == nullptr)
 	{
 		DeleteObject(font);
@@ -57,7 +57,7 @@ Font::Create(const char *inFontName, int inCharHeight)
 
 	// Select the font
 	SelectObject(dc, font);
-    SetMapMode(dc, MM_TEXT);
+	SetMapMode(dc, MM_TEXT);
 
 	// Get text metrics
 	TEXTMETRICA textmetric;
@@ -192,8 +192,8 @@ Font::Create(const char *inFontName, int inCharHeight)
 	surface->UnLock();
 
 	// Release GDI objects
-    DeleteObject(font);
-    DeleteDC(dc);
+	DeleteObject(font);
+	DeleteDC(dc);
 
 	// Create input layout
 	const D3D12_INPUT_ELEMENT_DESC vertex_desc[] =

+ 33 - 33
TestFramework/Renderer/PipelineState.cpp

@@ -11,31 +11,31 @@
 PipelineState::PipelineState(Renderer *inRenderer, ID3DBlob *inVertexShader, const D3D12_INPUT_ELEMENT_DESC *inInputDescription, uint inInputDescriptionCount, ID3DBlob *inPixelShader, D3D12_FILL_MODE inFillMode, D3D12_PRIMITIVE_TOPOLOGY_TYPE inTopology, EDepthTest inDepthTest, EBlendMode inBlendMode, ECullMode inCullMode) :
 	mRenderer(inRenderer)
 {
-    D3D12_GRAPHICS_PIPELINE_STATE_DESC pso_desc = {};
-    pso_desc.InputLayout = { inInputDescription, inInputDescriptionCount };
-    pso_desc.pRootSignature = mRenderer->GetRootSignature();
-    pso_desc.VS = { inVertexShader->GetBufferPointer(), inVertexShader->GetBufferSize() };
-    pso_desc.PS = { inPixelShader->GetBufferPointer(), inPixelShader->GetBufferSize() };
+	D3D12_GRAPHICS_PIPELINE_STATE_DESC pso_desc = {};
+	pso_desc.InputLayout = { inInputDescription, inInputDescriptionCount };
+	pso_desc.pRootSignature = mRenderer->GetRootSignature();
+	pso_desc.VS = { inVertexShader->GetBufferPointer(), inVertexShader->GetBufferSize() };
+	pso_desc.PS = { inPixelShader->GetBufferPointer(), inPixelShader->GetBufferSize() };
 
-    pso_desc.RasterizerState.FillMode = inFillMode;
-    pso_desc.RasterizerState.CullMode = inCullMode == ECullMode::Backface? D3D12_CULL_MODE_FRONT : D3D12_CULL_MODE_BACK; // DX uses left handed system so we reverse the options
-    pso_desc.RasterizerState.FrontCounterClockwise = FALSE;
-    pso_desc.RasterizerState.DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
-    pso_desc.RasterizerState.DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
-    pso_desc.RasterizerState.SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
-    pso_desc.RasterizerState.DepthClipEnable = TRUE;
-    pso_desc.RasterizerState.MultisampleEnable = FALSE;
-    pso_desc.RasterizerState.AntialiasedLineEnable = FALSE;
-    pso_desc.RasterizerState.ForcedSampleCount = 0;
-    pso_desc.RasterizerState.ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
+	pso_desc.RasterizerState.FillMode = inFillMode;
+	pso_desc.RasterizerState.CullMode = inCullMode == ECullMode::Backface? D3D12_CULL_MODE_FRONT : D3D12_CULL_MODE_BACK; // DX uses left handed system so we reverse the options
+	pso_desc.RasterizerState.FrontCounterClockwise = FALSE;
+	pso_desc.RasterizerState.DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
+	pso_desc.RasterizerState.DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
+	pso_desc.RasterizerState.SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
+	pso_desc.RasterizerState.DepthClipEnable = TRUE;
+	pso_desc.RasterizerState.MultisampleEnable = FALSE;
+	pso_desc.RasterizerState.AntialiasedLineEnable = FALSE;
+	pso_desc.RasterizerState.ForcedSampleCount = 0;
+	pso_desc.RasterizerState.ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
 
-    pso_desc.BlendState.AlphaToCoverageEnable = FALSE;
-    pso_desc.BlendState.IndependentBlendEnable = FALSE;
+	pso_desc.BlendState.AlphaToCoverageEnable = FALSE;
+	pso_desc.BlendState.IndependentBlendEnable = FALSE;
 
 	D3D12_RENDER_TARGET_BLEND_DESC &blend_desc = pso_desc.BlendState.RenderTarget[0];
-    blend_desc.LogicOpEnable = FALSE;
-    blend_desc.LogicOp = D3D12_LOGIC_OP_NOOP;
-    blend_desc.RenderTargetWriteMask = D3D12_COLOR_WRITE_ENABLE_ALL;
+	blend_desc.LogicOpEnable = FALSE;
+	blend_desc.LogicOp = D3D12_LOGIC_OP_NOOP;
+	blend_desc.RenderTargetWriteMask = D3D12_COLOR_WRITE_ENABLE_ALL;
 	switch (inBlendMode)
 	{
 	case EBlendMode::Write:
@@ -57,19 +57,19 @@ PipelineState::PipelineState(Renderer *inRenderer, ID3DBlob *inVertexShader, con
 		break;
 	}
 
-    pso_desc.DepthStencilState.DepthEnable = inDepthTest == EDepthTest::On? TRUE : FALSE;
-    pso_desc.DepthStencilState.DepthWriteMask = inDepthTest == EDepthTest::On? D3D12_DEPTH_WRITE_MASK_ALL : D3D12_DEPTH_WRITE_MASK_ZERO;
-    pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_LESS;
-    pso_desc.DepthStencilState.StencilEnable = FALSE;
+	pso_desc.DepthStencilState.DepthEnable = inDepthTest == EDepthTest::On? TRUE : FALSE;
+	pso_desc.DepthStencilState.DepthWriteMask = inDepthTest == EDepthTest::On? D3D12_DEPTH_WRITE_MASK_ALL : D3D12_DEPTH_WRITE_MASK_ZERO;
+	pso_desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_LESS;
+	pso_desc.DepthStencilState.StencilEnable = FALSE;
 
-    pso_desc.SampleMask = UINT_MAX;
-    pso_desc.PrimitiveTopologyType = inTopology;
-    pso_desc.NumRenderTargets = 1;
-    pso_desc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM;
-    pso_desc.DSVFormat = DXGI_FORMAT_D32_FLOAT;
-    pso_desc.SampleDesc.Count = 1;
+	pso_desc.SampleMask = UINT_MAX;
+	pso_desc.PrimitiveTopologyType = inTopology;
+	pso_desc.NumRenderTargets = 1;
+	pso_desc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM;
+	pso_desc.DSVFormat = DXGI_FORMAT_D32_FLOAT;
+	pso_desc.SampleDesc.Count = 1;
 
-    FatalErrorIfFailed(mRenderer->GetDevice()->CreateGraphicsPipelineState(&pso_desc, IID_PPV_ARGS(&mPSO)));
+	FatalErrorIfFailed(mRenderer->GetDevice()->CreateGraphicsPipelineState(&pso_desc, IID_PPV_ARGS(&mPSO)));
 }
 
 PipelineState::~PipelineState()
@@ -80,5 +80,5 @@ PipelineState::~PipelineState()
 
 void PipelineState::Activate()
 {
-    mRenderer->GetCommandList()->SetPipelineState(mPSO.Get());
+	mRenderer->GetCommandList()->SetPipelineState(mPSO.Get());
 }

+ 1 - 1
TestFramework/Renderer/PipelineState.h

@@ -43,5 +43,5 @@ private:
 	friend class Renderer;
 
 	Renderer *							mRenderer;
-    ComPtr<ID3D12PipelineState>			mPSO;
+	ComPtr<ID3D12PipelineState>			mPSO;
 };

+ 1 - 1
TestFramework/Renderer/Renderer.cpp

@@ -517,7 +517,7 @@ void Renderer::BeginFrame(const CameraState &inCamera, float inWorldScale)
 	vs = mVertexShaderConstantBufferOrtho[mFrameIndex]->Map<VertexShaderConstantBuffer>();
 
 	// Camera ortho projection and view
-    vs->mProjection = Mat44(Vec4(2.0f / mWindowWidth, 0.0f, 0.0f, 0.0f), Vec4(0.0f, -2.0f / mWindowHeight, 0.0f, 0.0f), Vec4(0.0f, 0.0f, -1.0f, 0.0f), Vec4(-1.0f, 1.0f, 0.0f, 1.0f));
+	vs->mProjection = Mat44(Vec4(2.0f / mWindowWidth, 0.0f, 0.0f, 0.0f), Vec4(0.0f, -2.0f / mWindowHeight, 0.0f, 0.0f), Vec4(0.0f, 0.0f, -1.0f, 0.0f), Vec4(-1.0f, 1.0f, 0.0f, 1.0f));
 	vs->mView = Mat44::sIdentity();
 
 	// Light projection and view are unused in ortho mode

+ 12 - 12
TestFramework/Renderer/Renderer.h

@@ -145,28 +145,28 @@ private:
 	Frustum							mCameraFrustum;
 	Frustum							mLightFrustum;
 
-    // DirectX interfaces
-    ComPtr<IDXGIFactory4>			mDXGIFactory;
-    ComPtr<ID3D12Device>			mDevice;
+	// DirectX interfaces
+	ComPtr<IDXGIFactory4>			mDXGIFactory;
+	ComPtr<ID3D12Device>			mDevice;
 	DescriptorHeap					mRTVHeap;							///< Render target view heap
 	DescriptorHeap					mDSVHeap;							///< Depth stencil view heap
 	DescriptorHeap					mSRVHeap;							///< Shader resource view heap
-    ComPtr<IDXGISwapChain3>			mSwapChain;
-    ComPtr<ID3D12Resource>			mRenderTargets[cFrameCount];		///< Two render targets (we're double buffering in order for the CPU to continue while the GPU is rendering)
+	ComPtr<IDXGISwapChain3>			mSwapChain;
+	ComPtr<ID3D12Resource>			mRenderTargets[cFrameCount];		///< Two render targets (we're double buffering in order for the CPU to continue while the GPU is rendering)
 	D3D12_CPU_DESCRIPTOR_HANDLE		mRenderTargetViews[cFrameCount];	///< The two render views corresponding to the render targets
 	ComPtr<ID3D12Resource>			mDepthStencilBuffer;				///< The main depth buffer
 	D3D12_CPU_DESCRIPTOR_HANDLE		mDepthStencilView { 0 };			///< A view for binding the depth buffer
-    ComPtr<ID3D12CommandAllocator>	mCommandAllocators[cFrameCount];	///< Two command allocator lists (one per frame)
-    ComPtr<ID3D12CommandQueue>		mCommandQueue;						///< The command queue that will execute commands (there's only 1 since we want to finish rendering 1 frame before moving onto the next)
-    ComPtr<ID3D12GraphicsCommandList> mCommandList;						///< The command list
-    ComPtr<ID3D12RootSignature>		mRootSignature;						///< The root signature, we have a simple application so we only need 1, which is suitable for all our shaders
+	ComPtr<ID3D12CommandAllocator>	mCommandAllocators[cFrameCount];	///< Two command allocator lists (one per frame)
+	ComPtr<ID3D12CommandQueue>		mCommandQueue;						///< The command queue that will execute commands (there's only 1 since we want to finish rendering 1 frame before moving onto the next)
+	ComPtr<ID3D12GraphicsCommandList> mCommandList;						///< The command list
+	ComPtr<ID3D12RootSignature>		mRootSignature;						///< The root signature, we have a simple application so we only need 1, which is suitable for all our shaders
 	Ref<Texture>					mRenderTargetTexture;				///< When rendering to a texture, this is the active texture
 	CommandQueue					mUploadQueue;						///< Queue used to upload resources to GPU memory
 
 	// Synchronization objects used to finish rendering and swapping before reusing a command queue
-    uint							mFrameIndex;						///< Current frame index (0 or 1)
-    HANDLE							mFenceEvent;						///< Fence event to wait for the previous frame rendering to complete (in order to free 1 of the buffers)
-    ComPtr<ID3D12Fence>				mFence;								///< Fence object, used to signal the end of a frame
+	uint							mFrameIndex;						///< Current frame index (0 or 1)
+	HANDLE							mFenceEvent;						///< Fence event to wait for the previous frame rendering to complete (in order to free 1 of the buffers)
+	ComPtr<ID3D12Fence>				mFence;								///< Fence object, used to signal the end of a frame
 	UINT64							mFenceValues[cFrameCount] = {};		///< Values that were used to signal completion of one of the two frames
 
 	using ResourceCache = UnorderedMap<uint64, Array<ComPtr<ID3D12Resource>>>;

+ 43 - 43
TestFramework/Renderer/Texture.cpp

@@ -17,8 +17,8 @@ Texture::Texture(Renderer *inRenderer, const Surface *inSurface) :
 	mHeight = inSurface->GetHeight();
 
 	// Create description
-    D3D12_RESOURCE_DESC desc = {};
-    desc.MipLevels = 1;
+	D3D12_RESOURCE_DESC desc = {};
+	desc.MipLevels = 1;
 	ESurfaceFormat format = inSurface->GetFormat();
 	switch (format)
 	{
@@ -33,20 +33,20 @@ Texture::Texture(Renderer *inRenderer, const Surface *inSurface) :
 	case ESurfaceFormat::A4R4G4B4:		desc.Format = DXGI_FORMAT_B4G4R4A4_UNORM;	break;
 	case ESurfaceFormat::R8G8B8:		desc.Format = DXGI_FORMAT_B8G8R8X8_UNORM;	format = ESurfaceFormat::X8R8G8B8;	break;
 	case ESurfaceFormat::B8G8R8:		desc.Format = DXGI_FORMAT_B8G8R8X8_UNORM;	format = ESurfaceFormat::X8R8G8B8;	break;
-	case ESurfaceFormat::X8R8G8B8: 		desc.Format = DXGI_FORMAT_B8G8R8X8_UNORM;	break;
+	case ESurfaceFormat::X8R8G8B8:		desc.Format = DXGI_FORMAT_B8G8R8X8_UNORM;	break;
 	case ESurfaceFormat::X8B8G8R8:		desc.Format = DXGI_FORMAT_B8G8R8X8_UNORM;	format = ESurfaceFormat::X8R8G8B8;	break;
 	case ESurfaceFormat::A8R8G8B8:		desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;	break;
 	case ESurfaceFormat::A8B8G8R8:		desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;	format = ESurfaceFormat::A8R8G8B8;	break;
 	case ESurfaceFormat::Invalid:
 	default:							JPH_ASSERT(false);							break;
 	}
-    desc.Width = mWidth;
-    desc.Height = mHeight;
-    desc.Flags = D3D12_RESOURCE_FLAG_NONE;
-    desc.DepthOrArraySize = 1;
-    desc.SampleDesc.Count = 1;
-    desc.SampleDesc.Quality = 0;
-    desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
+	desc.Width = mWidth;
+	desc.Height = mHeight;
+	desc.Flags = D3D12_RESOURCE_FLAG_NONE;
+	desc.DepthOrArraySize = 1;
+	desc.SampleDesc.Count = 1;
+	desc.SampleDesc.Quality = 0;
+	desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
 
 	// Blit the surface to another temporary surface if the format changed
 	const Surface *surface = inSurface;
@@ -62,20 +62,20 @@ Texture::Texture(Renderer *inRenderer, const Surface *inSurface) :
 	D3D12_HEAP_PROPERTIES heap_properties = {};
 	heap_properties.Type = D3D12_HEAP_TYPE_DEFAULT;
 	heap_properties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
-    heap_properties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
-    heap_properties.CreationNodeMask = 1;
-    heap_properties.VisibleNodeMask = 1;
-    FatalErrorIfFailed(inRenderer->GetDevice()->CreateCommittedResource(&heap_properties, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_COPY_DEST, nullptr, IID_PPV_ARGS(&mTexture)));
+	heap_properties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+	heap_properties.CreationNodeMask = 1;
+	heap_properties.VisibleNodeMask = 1;
+	FatalErrorIfFailed(inRenderer->GetDevice()->CreateCommittedResource(&heap_properties, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_COPY_DEST, nullptr, IID_PPV_ARGS(&mTexture)));
 	JPH_IF_DEBUG(mTexture->SetName(L"Texture");)
 
 	// Determine required size of data to copy
 	D3D12_PLACED_SUBRESOURCE_FOOTPRINT footprint;
-    UINT64 row_size_in_bytes;
-    UINT64 required_size = 0;
-    inRenderer->GetDevice()->GetCopyableFootprints(&desc, 0, 1, 0, &footprint, nullptr, &row_size_in_bytes, &required_size);
+	UINT64 row_size_in_bytes;
+	UINT64 required_size = 0;
+	inRenderer->GetDevice()->GetCopyableFootprints(&desc, 0, 1, 0, &footprint, nullptr, &row_size_in_bytes, &required_size);
 
 	// Create the GPU upload buffer
-    ComPtr<ID3D12Resource> upload_resource = mRenderer->CreateD3DResourceOnUploadHeap(required_size);
+	ComPtr<ID3D12Resource> upload_resource = mRenderer->CreateD3DResourceOnUploadHeap(required_size);
 	JPH_IF_DEBUG(upload_resource->SetName(L"Texture Upload");)
 
 	// Copy data to upload texture
@@ -103,23 +103,23 @@ Texture::Texture(Renderer *inRenderer, const Surface *inSurface) :
 	list->CopyTextureRegion(&copy_dst, 0, 0, 0, &copy_src, nullptr);
 
 	// Indicate that the texture is now ready to be used by a pixel shader
-    D3D12_RESOURCE_BARRIER barrier;
-    barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
-    barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
-    barrier.Transition.pResource = mTexture.Get();
-    barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
-    barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE;
-    barrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
-    list->ResourceBarrier(1, &barrier);
-
-    // Create a SRV for the texture
+	D3D12_RESOURCE_BARRIER barrier;
+	barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+	barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+	barrier.Transition.pResource = mTexture.Get();
+	barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
+	barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE;
+	barrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
+	list->ResourceBarrier(1, &barrier);
+
+	// Create a SRV for the texture
 	mSRV = inRenderer->GetSRVHeap().Allocate();
-    D3D12_SHADER_RESOURCE_VIEW_DESC srv_desc = {};
-    srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
-    srv_desc.Format = desc.Format;
-    srv_desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
-    srv_desc.Texture2D.MipLevels = 1;
-    inRenderer->GetDevice()->CreateShaderResourceView(mTexture.Get(), &srv_desc, mSRV);
+	D3D12_SHADER_RESOURCE_VIEW_DESC srv_desc = {};
+	srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
+	srv_desc.Format = desc.Format;
+	srv_desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
+	srv_desc.Texture2D.MipLevels = 1;
+	inRenderer->GetDevice()->CreateShaderResourceView(mTexture.Get(), &srv_desc, mSRV);
 
 	// Wait for copying to finish so we can destroy the upload texture
 	inRenderer->GetUploadQueue().ExecuteAndWait();
@@ -144,9 +144,9 @@ Texture::Texture(Renderer *inRenderer, int inWidth, int inHeight) :
 	D3D12_HEAP_PROPERTIES heap_properties = {};
 	heap_properties.Type = D3D12_HEAP_TYPE_DEFAULT;
 	heap_properties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
-    heap_properties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
-    heap_properties.CreationNodeMask = 1;
-    heap_properties.VisibleNodeMask = 1;
+	heap_properties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+	heap_properties.CreationNodeMask = 1;
+	heap_properties.VisibleNodeMask = 1;
 
 	D3D12_RESOURCE_DESC depth_stencil_desc = {};
 	depth_stencil_desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
@@ -174,12 +174,12 @@ Texture::Texture(Renderer *inRenderer, int inWidth, int inHeight) :
 
 	// Create a SRV for the texture
 	mSRV = inRenderer->GetSRVHeap().Allocate();
-    D3D12_SHADER_RESOURCE_VIEW_DESC srv_desc = {};
-    srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
-    srv_desc.Format = DXGI_FORMAT_R32_FLOAT;
-    srv_desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
-    srv_desc.Texture2D.MipLevels = 1;
-    inRenderer->GetDevice()->CreateShaderResourceView(mTexture.Get(), &srv_desc, mSRV);
+	D3D12_SHADER_RESOURCE_VIEW_DESC srv_desc = {};
+	srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
+	srv_desc.Format = DXGI_FORMAT_R32_FLOAT;
+	srv_desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
+	srv_desc.Texture2D.MipLevels = 1;
+	inRenderer->GetDevice()->CreateShaderResourceView(mTexture.Get(), &srv_desc, mSRV);
 }
 
 Texture::~Texture()

+ 6 - 6
TestFramework/UI/UIManager.cpp

@@ -83,8 +83,8 @@ void UIManager::Update(float inDeltaTime)
 	case STATE_ACTIVE:
 	case STATE_DEACTIVE:
 	case STATE_INVALID:
-    default:
-        break;
+	default:
+		break;
 	}
 }
 
@@ -179,8 +179,8 @@ void UIManager::SwitchToState(EState inState)
 	case STATE_ACTIVE:
 	case STATE_DEACTIVE:
 	case STATE_INVALID:
-    default:
-        break;
+	default:
+		break;
 	}
 
 	// Store new state
@@ -214,8 +214,8 @@ void UIManager::SwitchToState(EState inState)
 
 	case STATE_ACTIVE:
 	case STATE_INVALID:
-    default:
-        break;
+	default:
+		break;
 	}
 }
 

+ 3 - 3
UnitTests/Math/UVec4Tests.cpp

@@ -46,7 +46,7 @@ TEST_SUITE("UVec4Tests")
 		CHECK(i4_out2[2] == 3);
 		CHECK(i4_out2[3] == 4);
 
-		uint32 si[] = { 0, 0,  1, 0,  0, 0,  2, 0,  0, 0,  0, 0,  0, 0,  0, 0,  3, 0, 4, 0 };
+		uint32 si[] = { 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0 };
 		CHECK(UVec4::sGatherInt4<2 * sizeof(uint32)>(si, UVec4(1, 3, 8, 9)) == UVec4(1, 2, 3, 4));
 	}
 
@@ -497,8 +497,8 @@ TEST_SUITE("UVec4Tests")
 		uint16 ints[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
 		UVec4 vector = UVec4::sLoadInt4((const uint32 *)ints);
 
-		CHECK(vector.Expand4Uint16Lo()  == UVec4(1, 2, 3, 4));
-		CHECK(vector.Expand4Uint16Hi()  == UVec4(5, 6, 7, 8));
+		CHECK(vector.Expand4Uint16Lo() == UVec4(1, 2, 3, 4));
+		CHECK(vector.Expand4Uint16Hi() == UVec4(5, 6, 7, 8));
 	}
 
 	TEST_CASE("TestUVec4ExtractBytes")

+ 1 - 1
UnitTests/Math/Vec4Tests.cpp

@@ -40,7 +40,7 @@ TEST_SUITE("Vec4Tests")
 		CHECK(f4_out[2] == 3);
 		CHECK(f4_out[3] == 4);
 
-		float sf[] = { 0, 0,  1, 0,  0, 0,  2, 0,  0, 0,  0, 0,  0, 0,  0, 0,  3, 0, 4, 0 };
+		float sf[] = { 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0 };
 		CHECK(Vec4::sGatherFloat4<2 * sizeof(float)>(sf, UVec4(1, 3, 8, 9)) == Vec4(1, 2, 3, 4));
 	}
 

+ 1 - 1
UnitTests/Physics/PhysicsTests.cpp

@@ -1593,7 +1593,7 @@ TEST_SUITE("PhysicsTests")
 			Vec3 gravity = c.GetSystem()->GetGravity();
 			Vec3 upside_down_gravity = -gravity;
 
-  			// Create the ground.
+			// Create the ground.
 			Body &ground = c.CreateFloor();
 
 			// Create two sets of bodies that each overlap

+ 12 - 12
UnitTests/UnitTestFramework.cpp

@@ -171,7 +171,7 @@ struct App : implements<App, IFrameworkViewSource, IFrameworkView>
 
 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
 {
-    CoreApplication::Run(make<App>());
+	CoreApplication::Run(make<App>());
 }
 
 #elif !defined(JPH_PLATFORM_ANDROID)
@@ -304,17 +304,17 @@ void AndroidInitialize(android_app *inApp)
 			break;
 		}
 
-        case AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM:
-        {
-            uint16 color_u16 = (color.b >> 3) + ((color.g >> 2) << 5) + ((color.r >> 3) << 11);
-            for (int y = 0; y < buffer.height; ++y)
-            {
-                uint16 *dest = (uint16 *) ((uint8 *) buffer.bits + y * buffer.stride * sizeof(uint16));
-                for (int x = 0; x < buffer.width; ++x)
-                    *dest++ = color_u16;
-            }
-            break;
-        }
+		case AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM:
+		{
+			uint16 color_u16 = (color.b >> 3) + ((color.g >> 2) << 5) + ((color.r >> 3) << 11);
+			for (int y = 0; y < buffer.height; ++y)
+			{
+				uint16 *dest = (uint16 *) ((uint8 *) buffer.bits + y * buffer.stride * sizeof(uint16));
+				for (int x = 0; x < buffer.width; ++x)
+					*dest++ = color_u16;
+			}
+			break;
+		}
 
 		default:
 			// TODO implement

+ 1 - 1
WebIncludes/profile_chart.css

@@ -3,7 +3,7 @@ html, body {
 	border: 0px;
 	margin: 0px;
 	width: 100%;
-    height: 100%;
+	height: 100%;
 	overflow: hidden;
 }
 

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません