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

◆ AddVertex()

void Terraria.Graphics.VertexStrip.AddVertex ( StripColorFunction colorFunction,
StripHalfWidthFunction widthFunction,
Vector2 pos,
float rot,
int indexOnVertexArray,
float progressOnStrip )
inlineprivate

Definition at line 157 of file VertexStrip.cs.

158 {
159 while (indexOnVertexArray + 1 >= _vertices.Length)
160 {
161 Array.Resize(ref _vertices, _vertices.Length * 2);
162 }
164 float num = widthFunction(progressOnStrip);
165 Vector2 vector = MathHelper.WrapAngle(rot - (float)Math.PI / 2f).ToRotationVector2() * num;
172 }
static float WrapAngle(float angle)
Definition MathHelper.cs:87
const double PI
Definition Math.cs:16
CustomVertexInfo[] _vertices

References Terraria.Graphics.VertexStrip._vertices, Terraria.Graphics.VertexStrip.CustomVertexInfo.Color, System.Math.PI, Terraria.Graphics.VertexStrip.CustomVertexInfo.Position, Terraria.Graphics.VertexStrip.CustomVertexInfo.TexCoord, Microsoft.Xna.Framework.Graphics.Vector2, and Microsoft.Xna.Framework.MathHelper.WrapAngle().

Referenced by Terraria.Graphics.VertexStrip.PrepareStrip(), and Terraria.Graphics.VertexStrip.PrepareStripWithProceduralPadding().