t1 / TFDContents / Assets / Standard Assets / CameraIntrinsics.cs @ 9
이력 | 보기 | 이력해설 | 다운로드 (2.18 KB)
| 1 |
#if !(UNITY_WSA_10_0 && NETFX_CORE) |
|---|---|
| 2 |
using RootSystem = System; |
| 3 |
using System.Linq; |
| 4 |
using System.Collections.Generic; |
| 5 |
namespace Windows.Kinect |
| 6 |
{
|
| 7 |
// |
| 8 |
// Windows.Kinect.CameraIntrinsics |
| 9 |
// |
| 10 |
[RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] |
| 11 |
public struct CameraIntrinsics |
| 12 |
{
|
| 13 |
public float FocalLengthX { get; set; }
|
| 14 |
public float FocalLengthY { get; set; }
|
| 15 |
public float PrincipalPointX { get; set; }
|
| 16 |
public float PrincipalPointY { get; set; }
|
| 17 |
public float RadialDistortionSecondOrder { get; set; }
|
| 18 |
public float RadialDistortionFourthOrder { get; set; }
|
| 19 |
public float RadialDistortionSixthOrder { get; set; }
|
| 20 |
|
| 21 |
public override int GetHashCode() |
| 22 |
{
|
| 23 |
return FocalLengthX.GetHashCode() ^ FocalLengthY.GetHashCode() ^ |
| 24 |
PrincipalPointX.GetHashCode() ^ PrincipalPointY.GetHashCode() ^ |
| 25 |
RadialDistortionSecondOrder.GetHashCode() ^ RadialDistortionFourthOrder.GetHashCode() ^ |
| 26 |
RadialDistortionSixthOrder.GetHashCode(); |
| 27 |
} |
| 28 |
|
| 29 |
public override bool Equals(object obj) |
| 30 |
{
|
| 31 |
if (!(obj is CameraIntrinsics)) |
| 32 |
{
|
| 33 |
return false; |
| 34 |
} |
| 35 |
|
| 36 |
return this.Equals((CameraIntrinsics)obj); |
| 37 |
} |
| 38 |
|
| 39 |
public bool Equals(CameraIntrinsics obj) |
| 40 |
{
|
| 41 |
return FocalLengthX.Equals(obj.FocalLengthX) && FocalLengthY.Equals(obj.FocalLengthY) && |
| 42 |
PrincipalPointX.Equals(obj.PrincipalPointX) && PrincipalPointY.Equals(obj.PrincipalPointY) && |
| 43 |
RadialDistortionSecondOrder.Equals(obj.RadialDistortionSecondOrder) && |
| 44 |
RadialDistortionFourthOrder.Equals(obj.RadialDistortionFourthOrder) && |
| 45 |
RadialDistortionSixthOrder.Equals(obj.RadialDistortionSixthOrder); |
| 46 |
} |
| 47 |
|
| 48 |
public static bool operator ==(CameraIntrinsics a, CameraIntrinsics b) |
| 49 |
{
|
| 50 |
return a.Equals(b); |
| 51 |
} |
| 52 |
|
| 53 |
public static bool operator !=(CameraIntrinsics a, CameraIntrinsics b) |
| 54 |
{
|
| 55 |
return !(a.Equals(b)); |
| 56 |
} |
| 57 |
} |
| 58 |
|
| 59 |
} |
| 60 |
#endif |