forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBoneWeight.cs
More file actions
134 lines (134 loc) · 2.66 KB
/
BoneWeight.cs
File metadata and controls
134 lines (134 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
using System;
namespace UnityEngine
{
public struct BoneWeight
{
private float m_Weight0;
private float m_Weight1;
private float m_Weight2;
private float m_Weight3;
private int m_BoneIndex0;
private int m_BoneIndex1;
private int m_BoneIndex2;
private int m_BoneIndex3;
public float weight0
{
get
{
return this.m_Weight0;
}
set
{
this.m_Weight0 = value;
}
}
public float weight1
{
get
{
return this.m_Weight1;
}
set
{
this.m_Weight1 = value;
}
}
public float weight2
{
get
{
return this.m_Weight2;
}
set
{
this.m_Weight2 = value;
}
}
public float weight3
{
get
{
return this.m_Weight3;
}
set
{
this.m_Weight3 = value;
}
}
public int boneIndex0
{
get
{
return this.m_BoneIndex0;
}
set
{
this.m_BoneIndex0 = value;
}
}
public int boneIndex1
{
get
{
return this.m_BoneIndex1;
}
set
{
this.m_BoneIndex1 = value;
}
}
public int boneIndex2
{
get
{
return this.m_BoneIndex2;
}
set
{
this.m_BoneIndex2 = value;
}
}
public int boneIndex3
{
get
{
return this.m_BoneIndex3;
}
set
{
this.m_BoneIndex3 = value;
}
}
public override int GetHashCode()
{
return this.boneIndex0.GetHashCode() ^ this.boneIndex1.GetHashCode() << 2 ^ this.boneIndex2.GetHashCode() >> 2 ^ this.boneIndex3.GetHashCode() >> 1 ^ this.weight0.GetHashCode() << 5 ^ this.weight1.GetHashCode() << 4 ^ this.weight2.GetHashCode() >> 4 ^ this.weight3.GetHashCode() >> 3;
}
public override bool Equals(object other)
{
if (!(other is BoneWeight))
{
return false;
}
BoneWeight boneWeight = (BoneWeight)other;
bool arg_CC_0;
if (this.boneIndex0.Equals(boneWeight.boneIndex0) && this.boneIndex1.Equals(boneWeight.boneIndex1) && this.boneIndex2.Equals(boneWeight.boneIndex2) && this.boneIndex3.Equals(boneWeight.boneIndex3))
{
Vector4 vector = new Vector4(this.weight0, this.weight1, this.weight2, this.weight3);
arg_CC_0 = vector.Equals(new Vector4(boneWeight.weight0, boneWeight.weight1, boneWeight.weight2, boneWeight.weight3));
}
else
{
arg_CC_0 = false;
}
return arg_CC_0;
}
public static bool operator ==(BoneWeight lhs, BoneWeight rhs)
{
return lhs.boneIndex0 == rhs.boneIndex0 && lhs.boneIndex1 == rhs.boneIndex1 && lhs.boneIndex2 == rhs.boneIndex2 && lhs.boneIndex3 == rhs.boneIndex3 && new Vector4(lhs.weight0, lhs.weight1, lhs.weight2, lhs.weight3) == new Vector4(rhs.weight0, rhs.weight1, rhs.weight2, rhs.weight3);
}
public static bool operator !=(BoneWeight lhs, BoneWeight rhs)
{
return !(lhs == rhs);
}
}
}