コード例 #1
0
        /// <summary>
        /// Draws a convex polygon in screen space.
        /// </summary>
        /// <param name="screenX"></param>
        /// <param name="screenY"></param>
        /// <param name="polygon"></param>
        /// <returns></returns>
        public VisualLogPolygonEntry DrawPolygon(float screenX, float screenY, Vector2[] polygon)
        {
            VisualLogPolygonEntry entry = new VisualLogPolygonEntry();

            entry.Pos      = new Vector3(screenX, screenY, 0.0f);
            entry.Vertices = polygon;
            this.Draw(entry);
            return(entry);
        }
コード例 #2
0
        /// <summary>
        /// Draws a convex polygon in world space.
        /// </summary>
        /// <param name="worldX"></param>
        /// <param name="worldY"></param>
        /// <param name="worldZ"></param>
        /// <param name="polygon"></param>
        /// <returns></returns>
        public VisualLogPolygonEntry DrawPolygon(float worldX, float worldY, float worldZ, Vector2[] polygon)
        {
            VisualLogPolygonEntry entry = new VisualLogPolygonEntry();

            entry.Pos      = new Vector3(worldX, worldY, worldZ);
            entry.Anchor   = VisualLogAnchor.World;
            entry.Vertices = polygon;
            this.Draw(entry);
            return(entry);
        }
コード例 #3
0
 /// <summary>
 /// Prohibits scale changes due to perspective transformation.
 /// </summary>
 /// <param name="entry"></param>
 /// <returns></returns>
 public static VisualLogPolygonEntry DontScale(this VisualLogPolygonEntry entry)
 {
     entry.InvariantScale = true;
     return(entry);
 }