Exemple #1
0
 private void Form1_MouseMove(object sender, MouseEventArgs e)
 {
     _worldMouse = V.xy(e.X - 800f, e.Y - 600) * (1 / 0.4f); // TODO
     _viewMouse  = V.xy(e.X, e.Y);
     if (e.Button == MouseButtons.Left)
     {
         _p1 = _worldMouse;
     }
 }
Exemple #2
0
        private void DrawAabbTree()
        {
            var treeRootDrawParams = new DrawnParams
            {
                position  = V.xy((ClientSize.Width + 225) / 2, 10),
                layersize = V.xy(ClientSize.Width - 250, 15f),
            };

            _hoveredNode = null;
            DrawTree(_world.tree.Root, treeRootDrawParams, treeRootDrawParams);
        }
Exemple #3
0
 public static AaRect mm(Vec2 min, float maxx, float maxy)
 {
     return(mm(min, Vec2.xy(maxx, maxy)));
 }
Exemple #4
0
 public static AaRect xyxy(float minx, float miny, float maxx, float maxy)
 {
     return(mm(Vec2.xy(minx, miny), Vec2.xy(maxx, maxy)));
 }
Exemple #5
0
 public static AaRect mm(float minx, float miny, Vec2 max)
 {
     return(mm(Vec2.xy(minx, miny), max));
 }