public Replace ( int index, Vector2 whatToReplaceWith ) : void | ||
index | int | What index to replace. |
whatToReplaceWith | Vector2 | The new vector that will be placed at the given index |
return | void |
public static void UpdateLinePrimitive(LinePrimitive linePrimitive, IPositionedSizedObject ipso) { linePrimitive.Replace(0, Vector2.Zero); linePrimitive.Replace(1, new Vector2(ipso.Width, 0)); linePrimitive.Replace(2, new Vector2(ipso.Width, ipso.Height)); linePrimitive.Replace(3, new Vector2(0, ipso.Height)); linePrimitive.Replace(4, Vector2.Zero); // close back on itself }
public static void UpdateLinePrimitive(LinePrimitive linePrimitive, IRenderableIpso ipso) { Matrix matrix = Matrix.CreateRotationZ(-MathHelper.ToRadians(ipso.GetAbsoluteRotation())); linePrimitive.Replace(0, Vector2.Zero); linePrimitive.Replace(1, Vector2.Transform(new Vector2(ipso.Width, 0), matrix)); linePrimitive.Replace(2, Vector2.Transform(new Vector2(ipso.Width, ipso.Height), matrix)); linePrimitive.Replace(3, Vector2.Transform(new Vector2(0, ipso.Height), matrix)); linePrimitive.Replace(4, Vector2.Zero); // close back on itself }
public static void UpdateLinePrimitive(LinePrimitive linePrimitive, IPositionedSizedObject ipso) { Matrix matrix = Matrix.CreateRotationZ(-MathHelper.ToRadians(ipso.Rotation)); linePrimitive.Replace(0, Vector2.Zero); linePrimitive.Replace(1, Vector2.Transform(new Vector2(ipso.Width, 0), matrix)); linePrimitive.Replace(2, Vector2.Transform(new Vector2(ipso.Width, ipso.Height), matrix)); linePrimitive.Replace(3, Vector2.Transform(new Vector2(0, ipso.Height), matrix)); linePrimitive.Replace(4, Vector2.Zero); // close back on itself }
private void UpdatePoints() { while (mLinePrimitive.VectorCount < 2) { mLinePrimitive.Add(0, 0); } mLinePrimitive.Replace(1, this.RelativePoint); mLinePrimitive.Position.X = this.GetAbsoluteX(); mLinePrimitive.Position.Y = this.GetAbsoluteY(); }
public static void UpdateLinePrimitive(LinePrimitive linePrimitive, IPositionedSizedObject ipso) { linePrimitive.Replace(0, Vector2.Zero); linePrimitive.Replace(1, new Vector2(ipso.Width, 0)); linePrimitive.Replace(2, new Vector2(ipso.Width, ipso.Height)); linePrimitive.Replace(3, new Vector2(0, ipso.Height)); linePrimitive.Replace(4, Vector2.Zero); // close back on itself }
public static void UpdateLinePrimitive(LinePrimitive linePrimitive, IPositionedSizedObject ipso) { Matrix matrix = Matrix.CreateRotationZ(-MathHelper.ToRadians(ipso.Rotation)); linePrimitive.Replace(0, Vector2.Zero); linePrimitive.Replace(1, Vector2.Transform(new Vector2(ipso.Width, 0), matrix) ); linePrimitive.Replace(2, Vector2.Transform(new Vector2(ipso.Width, ipso.Height), matrix) ); linePrimitive.Replace(3, Vector2.Transform(new Vector2(0, ipso.Height), matrix) ); linePrimitive.Replace(4, Vector2.Zero); // close back on itself }