public Node(GraphLocation location, Vector3 worldPosition, bool walkable)
 {
     this.Location      = location;
     this.WorldPosition = worldPosition;
     this.Walkable      = walkable;
     this.Category      = ListCategory.UNVISITED;
 }
Exemple #2
0
 public override bool Equals(object obj)
 {
     if (obj is GraphLocation)
     {
         GraphLocation a = (GraphLocation)obj;
         return(this.x == a.x && this.y == a.y);
     }
     else
     {
         return(false);
     }
 }
Exemple #3
0
        public OutputNode(Graph owner) : base(owner)
        {
            Title       = "Output Image";
            Description = "This is the final image";
            Rectangle graphViewRectangle = owner.GetViewRectangle();

            Size     = new GraphSize(150, 60);
            Location = new GraphLocation((graphViewRectangle.X + graphViewRectangle.Width) - (Size.Width + 10), graphViewRectangle.Height / 2);
            Add(new OutputImageItem()
            {
                Size = new GraphSize(Size.Width, 30)
            });
        }
Exemple #4
0
        public InputNode(Image img, Graph owner) : base(owner)
        {
            Title       = "Input Image";
            Description = "This is the original image";
            Rectangle graphViewRectangle = owner.GetViewRectangle();

            Size     = new GraphSize(150, 60);
            Location = new GraphLocation(graphViewRectangle.X + 10, graphViewRectangle.Height / 2);
            Add(new InputImageItem(img)
            {
                Size = new GraphSize(Size.Width, 30)
            });
        }
Exemple #5
0
 /// <summary>
 /// Initializes a new instance of the FBLocation class from a GraphLocation object.
 /// </summary>
 public FBLocation(GraphLocation location)
 {
     if (location != null)
     {
         this.Street    = location.Street;
         this.City      = location.City;
         this.State     = location.State;
         this.Zip       = location.Zip;
         this.Country   = location.Country;
         this.Latitude  = location.Latitude;
         this.Longitude = location.Longitude;
     }
 }
Exemple #6
0
        public GrayScaleNode(Graph owner) : base(owner)
        {
            Title       = "Gray Scale";
            Description = "This will apply a grayscale filter to the source image";
            Rectangle graphViewRectangle = owner.GetViewRectangle();

            Location = new GraphLocation(graphViewRectangle.Width / 2, graphViewRectangle.Height / 2);
            Size     = new GraphSize(250, 100);
            Add(new GrayScaleImageItem()
            {
                Size = new GraphSize(Size.Width, 30)
            });
        }
Exemple #7
0
        public MirrorNode(Graph owner, RotateFlipType type) : base(owner)
        {
            Title       = "Mirror";
            Description = "This will apply a mirror filter to the source image";
            Rectangle graphViewRectangle = owner.GetViewRectangle();

            Location = new GraphLocation(graphViewRectangle.Width / 2, graphViewRectangle.Height / 2);
            Size     = new GraphSize(250, 100);
            Add(new MirrorItem(type)
            {
                Size = new GraphSize(Size.Width, 30)
            });
        }
Exemple #8
0
        public IntNode(Graph owner) : base(owner)
        {
            Title       = "Int value";
            Description = "This is a interger value";
            Rectangle graphViewRectangle = owner.GetViewRectangle();

            Size     = new GraphSize(150, 60);
            Location = new GraphLocation(graphViewRectangle.Width / 2, graphViewRectangle.Height / 2);
            Add(new IntValueItem(ConnectorType.Output)
            {
                Size = new GraphSize(Size.Width, 30)
            });
        }
Exemple #9
0
        public ResizeNode(Graph owner) : base(owner)
        {
            Title       = "Resize";
            Description = "This will resize the image";
            Rectangle graphViewRectangle = owner.GetViewRectangle();

            Location = new GraphLocation(graphViewRectangle.Width / 2, graphViewRectangle.Height / 2);
            Size     = new GraphSize(250, 100);
            Add(new ResizeImageItem()
            {
                Size = new GraphSize(Size.Width, 30)
            });
            Add(new IntValueItem(ConnectorType.Input)
            {
                Size = new GraphSize(Size.Width, 30)
            });
            Add(new IntValueItem(ConnectorType.Input)
            {
                Size = new GraphSize(Size.Width, 30)
            });
        }
Exemple #10
0
        public MergeNode(Graph owner) : base(owner)
        {
            Title       = "Merge Images";
            Description = "This will merge the specified images";
            Rectangle graphViewRectangle = owner.GetViewRectangle();

            Size     = new GraphSize(150, 60);
            Location = new GraphLocation(graphViewRectangle.Width / 2, graphViewRectangle.Height / 2);
            Add(new IntValueItem(ConnectorType.Input)
            {
                Size = new GraphSize(Size.Width, 20)
            });
            Add(new IntValueItem(ConnectorType.Input)
            {
                Size = new GraphSize(Size.Width, 20)
            });
            Add(new MergeInputItem()
            {
                Size = new GraphSize(Size.Width, 30)
            });
            Add(new MergeOutputItem()
            {
                Size = new GraphSize(Size.Width, 1)
            });
            Add(new MergeInputItem()
            {
                Size = new GraphSize(Size.Width, 30)
            });
            Add(new IntValueItem(ConnectorType.Input)
            {
                Size = new GraphSize(Size.Width, 20)
            });
            Add(new IntValueItem(ConnectorType.Input)
            {
                Size = new GraphSize(Size.Width, 20)
            });
        }