More C# style and comment clean up (#602)
* More style guidline changes.
This commit is contained in:
Родитель
cc3b6a8274
Коммит
05bc8daafa
|
@ -1,5 +1,9 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="Calibration.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
|
@ -124,7 +128,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transform a 2D pixel coordinate with an associated depth value of the source camera into a 3D point of the target coordinate system.
|
||||
/// Transform a 2D pixel coordinate with an associated depth value of the source camera into a 3D point of the target coordinate system.
|
||||
/// </summary>
|
||||
/// <param name="sourcePoint2D">The 2D pixel in <paramref name="sourceCamera"/> coordinates.</param>
|
||||
/// <param name="sourceDepth">The depth of <paramref name="sourceCamera"/> in millimeters.</param>
|
||||
|
@ -221,7 +225,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
/// <inheritdoc/>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var hashCode = -454809512;
|
||||
int hashCode = -454809512;
|
||||
hashCode = (hashCode * -1521134295) + EqualityComparer<CameraCalibration>.Default.GetHashCode(this.DepthCameraCalibration);
|
||||
hashCode = (hashCode * -1521134295) + EqualityComparer<CameraCalibration>.Default.GetHashCode(this.ColorCameraCalibration);
|
||||
hashCode = (hashCode * -1521134295) + EqualityComparer<Extrinsics[]>.Default.GetHashCode(this.DeviceExtrinsics);
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="CalibrationDeviceType.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.Azure.Kinect.Sensor
|
||||
{
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="CalibrationModelType.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.Azure.Kinect.Sensor
|
||||
{
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="CameraCalibration.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.Azure.Kinect.Sensor
|
||||
|
@ -13,7 +16,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct CameraCalibration : IEquatable<CameraCalibration>
|
||||
{
|
||||
// Struct used for serialization to native SDK
|
||||
// Structure used for serialization to native SDK
|
||||
#pragma warning disable CA1051 // Do not declare visible instance fields
|
||||
|
||||
/// <summary>
|
||||
|
@ -86,7 +89,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
/// <inheritdoc/>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var hashCode = 2125552744;
|
||||
int hashCode = 2125552744;
|
||||
hashCode = (hashCode * -1521134295) + EqualityComparer<Extrinsics>.Default.GetHashCode(this.Extrinsics);
|
||||
hashCode = (hashCode * -1521134295) + EqualityComparer<Intrinsics>.Default.GetHashCode(this.Intrinsics);
|
||||
hashCode = (hashCode * -1521134295) + this.ResolutionWidth.GetHashCode();
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="Extrinsics.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
|
||||
namespace Microsoft.Azure.Kinect.Sensor
|
||||
{
|
||||
|
@ -15,7 +16,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Extrinsics : IEquatable<Extrinsics>
|
||||
{
|
||||
// Struct used for serialization to native SDK
|
||||
// Structure used for serialization to native SDK
|
||||
#pragma warning disable CA1051 // Do not declare visible instance fields
|
||||
|
||||
/// <summary>
|
||||
|
@ -25,7 +26,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
public float[] Rotation;
|
||||
|
||||
/// <summary>
|
||||
/// Gets translation vector, x,yz (in millimeters).
|
||||
/// Gets translation vector, x, y, z (in millimeters).
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||
public float[] Translation;
|
||||
|
@ -33,7 +34,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
#pragma warning restore CA1051 // Do not declare visible instance fields
|
||||
|
||||
/// <summary>
|
||||
/// Compares two Extrinsics for equality.
|
||||
/// Compares two <see cref="Extrinsics"/> for equality.
|
||||
/// </summary>
|
||||
/// <param name="left">First extrinsic to compare.</param>
|
||||
/// <param name="right">Second extrinsic to compare.</param>
|
||||
|
@ -44,7 +45,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Compares two Extrinsics for inequality.
|
||||
/// Compares two <see cref="Extrinsics"/> for inequality.
|
||||
/// </summary>
|
||||
/// <param name="left">First extrinsic to compare.</param>
|
||||
/// <param name="right">Second extrinsic to compare.</param>
|
||||
|
@ -70,7 +71,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
/// <inheritdoc/>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var hashCode = 1370020195;
|
||||
int hashCode = 1370020195;
|
||||
hashCode = (hashCode * -1521134295) + EqualityComparer<float[]>.Default.GetHashCode(this.Rotation);
|
||||
hashCode = (hashCode * -1521134295) + EqualityComparer<float[]>.Default.GetHashCode(this.Translation);
|
||||
return hashCode;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="Intrinsics.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
@ -12,7 +16,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Intrinsics : IEquatable<Intrinsics>
|
||||
{
|
||||
// Struct used for serialization to native SDK
|
||||
// Structure used for serialization to native SDK
|
||||
#pragma warning disable CA1051 // Do not declare visible instance fields
|
||||
|
||||
/// <summary>
|
||||
|
@ -34,7 +38,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
#pragma warning restore CA1051 // Do not declare visible instance fields
|
||||
|
||||
/// <summary>
|
||||
/// Compare two Intrinsics for equality.
|
||||
/// Compare two <see cref="Intrinsics"/> for equality.
|
||||
/// </summary>
|
||||
/// <param name="left">First intrinsic to compare.</param>
|
||||
/// <param name="right">Second intrinsic to compare.</param>
|
||||
|
@ -45,7 +49,7 @@ namespace Microsoft.Azure.Kinect.Sensor
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Compare two Intrinsics for inequality.
|
||||
/// Compare two <see cref="Intrinsics"/> for inequality.
|
||||
/// </summary>
|
||||
/// <param name="left">First intrinsic to compare.</param>
|
||||
/// <param name="right">Second intrinsic to compare.</param>
|
||||
|
|
|
@ -41,8 +41,4 @@
|
|||
<PackageReference Include="System.Memory" Version="4.5.3" />
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <copyright file="AssemblyInfo.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
|
||||
[assembly: CLSCompliant(true)]
|
Загрузка…
Ссылка в новой задаче