/// <summary> /// Draws a vector in screen space. A vector can be thought of as an arrow pointing in a certain direction. /// It is useful for displaying velocities or directions. /// </summary> /// <param name="screenX">The vectors screen origin.</param> /// <param name="screenY">The vectors screen origin.</param> /// <param name="vectorX">The vector to display.</param> /// <param name="vectorY">The vector to display.</param> /// <returns></returns> public VisualLogVectorEntry DrawVector(float screenX, float screenY, float vectorX, float vectorY) { VisualLogVectorEntry entry = new VisualLogVectorEntry(); entry.Origin = new Vector3(screenX, screenY, 0.0f); entry.Vector = new Vector2(vectorX, vectorY); this.Draw(entry); return(entry); }
/// <summary> /// Draws a vector in world space. A vector can be thought of as an arrow pointing in a certain direction. /// It is useful for displaying velocities or directions. /// </summary> /// <param name="worldX">The vectors world origin.</param> /// <param name="worldY">The vectors world origin.</param> /// <param name="worldZ">The vectors world origin.</param> /// <param name="vectorX">The vector to display.</param> /// <param name="vectorY">The vector to display.</param> /// <returns></returns> public VisualLogVectorEntry DrawVector(float worldX, float worldY, float worldZ, float vectorX, float vectorY) { VisualLogVectorEntry entry = new VisualLogVectorEntry(); entry.Origin = new Vector3(worldX, worldY, worldZ); entry.Anchor = VisualLogAnchor.World; entry.Vector = new Vector2(vectorX, vectorY); this.Draw(entry); return(entry); }
/// <summary> /// Draws a vector in world space. A vector can be thought of as an arrow pointing in a certain direction. /// It is useful for displaying velocities or directions. /// </summary> /// <param name="worldPos">The vectors world origin.</param> /// <param name="vector">The vector to display.</param> /// <returns></returns> public VisualLogVectorEntry DrawVector(Vector3 worldPos, Vector2 vector) { VisualLogVectorEntry entry = new VisualLogVectorEntry(); entry.Origin = new Vector3(worldPos.X, worldPos.Y, worldPos.Z); entry.Anchor = VisualLogAnchor.World; entry.Vector = new Vector2(vector.X, vector.Y); this.Draw(entry); return(entry); }
/// <summary> /// Prohibits scale changes due to perspective transformation. /// </summary> /// <param name="entry"></param> /// <returns></returns> public static VisualLogVectorEntry DontScale(this VisualLogVectorEntry entry) { entry.InvariantScale = true; return(entry); }