Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UpdateSimplex()

bool Microsoft.Xna.Framework.Gjk.UpdateSimplex ( int newIndex)
inlineprivate

Definition at line 135 of file Gjk.cs.

136 {
137 int num = simplexBits | (1 << newIndex);
138 int num2 = 1 << newIndex;
139 for (int num3 = simplexBits; num3 != 0; num3--)
140 {
141 if ((num3 & num) == num3 && IsSatisfiesRule(num3 | num2, num))
142 {
143 simplexBits = num3 | num2;
145 return true;
146 }
147 }
148 bool result = false;
149 if (IsSatisfiesRule(num2, num))
150 {
151 simplexBits = num2;
152 closestPoint = y[newIndex];
153 maxLengthSq = yLengthSq[newIndex];
154 result = true;
155 }
156 return result;
157 }
bool IsSatisfiesRule(int xBits, int yBits)
Definition Gjk.cs:175
Vector3 ComputeClosestPoint()
Definition Gjk.cs:159

References Microsoft.Xna.Framework.Gjk.closestPoint, Microsoft.Xna.Framework.Gjk.ComputeClosestPoint(), Microsoft.Xna.Framework.Gjk.IsSatisfiesRule(), Microsoft.Xna.Framework.Gjk.maxLengthSq, Microsoft.Xna.Framework.Gjk.simplexBits, Microsoft.Xna.Framework.Gjk.y, and Microsoft.Xna.Framework.Gjk.yLengthSq.

Referenced by Microsoft.Xna.Framework.Gjk.AddSupportPoint().