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

◆ AddSupportPoint()

bool Microsoft.Xna.Framework.Gjk.AddSupportPoint ( ref Vector3 newPoint)
inline

Definition at line 67 of file Gjk.cs.

68 {
69 int num = (BitsToIndices[simplexBits ^ 0xF] & 7) - 1;
70 ref Vector3 reference = ref y[num];
71 reference = newPoint;
72 yLengthSq[num] = newPoint.LengthSquared();
73 for (int num2 = BitsToIndices[simplexBits]; num2 != 0; num2 >>= 3)
74 {
75 int num3 = (num2 & 7) - 1;
76 Vector3 vector = y[num3] - newPoint;
77 edges[num3][num] = vector;
78 ref Vector3 reference2 = ref edges[num][num3];
79 reference2 = -vector;
80 edgeLengthSq[num][num3] = (edgeLengthSq[num3][num] = vector.LengthSquared());
81 }
83 return UpdateSimplex(num);
84 }
Vector3[][] edges
Definition Gjk.cs:20
float[][] edgeLengthSq
Definition Gjk.cs:22
void UpdateDeterminant(int xmIdx)
Definition Gjk.cs:91
static int[] BitsToIndices
Definition Gjk.cs:8
bool UpdateSimplex(int newIndex)
Definition Gjk.cs:135

References Microsoft.Xna.Framework.Gjk.BitsToIndices, Microsoft.Xna.Framework.Gjk.edgeLengthSq, Microsoft.Xna.Framework.Gjk.edges, Microsoft.Xna.Framework.Vector3.LengthSquared(), Microsoft.Xna.Framework.Gjk.simplexBits, Microsoft.Xna.Framework.Gjk.UpdateDeterminant(), Microsoft.Xna.Framework.Gjk.UpdateSimplex(), Microsoft.Xna.Framework.Gjk.y, and Microsoft.Xna.Framework.Gjk.yLengthSq.

Referenced by Microsoft.Xna.Framework.BoundingFrustum.Intersects(), Microsoft.Xna.Framework.BoundingFrustum.Intersects(), and Microsoft.Xna.Framework.BoundingFrustum.Intersects().