Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the PathNode struct.
 /// </summary>
 /// <param name="x">The x position for this node.</param>
 /// <param name="y">The y position for this node.</param>
 /// <param name="type">The type of this node.</param>
 public PathNode(int x, int y, PathNodeType type)
     : this()
 {
     this.X = x;
     this.Y = y;
     this.Type = type;
 }
Esempio n. 2
0
 public PathNode(float X, float Y, float Z, PathNodeType Type)
 {
     x    = X;
     y    = Y;
     z    = Z;
     type = Type;
 }
Esempio n. 3
0
 public PathNodeInfoData(string name, PathNodeType type, double x, double y)
     : this()
 {
     this.name       = name;
     this.type       = type;
     this.position_x = x;
     this.position_y = y;
 }
Esempio n. 4
0
 public PathNode(int _x, int _y, PathNodeType _type)
 {
     X         = _x;
     Y         = _y;
     NodeType  = _type;
     NodeLinks = new List <NodeLink>();
     NodeData  = 0.0f; // default data to 0
     H         = 0.0f;
 }
Esempio n. 5
0
 public PathNodeInfo(PathNodeInfo basePlace, double direction, double distance, string name)
     : this()
 {
     this.type       = PathNodeType.Relative;
     this.basePlace  = basePlace;
     this.direction  = direction;
     this.distance   = distance;
     this.position_x = distance * Math.Cos(direction);
     this.position_y = distance * Math.Sin(direction);
     this.name       = name;
 }
Esempio n. 6
0
 public PathNodeInfo(PathNodeType type, double x, double y, double direction, double distance, int id, string name)
     : this()
 {
     this.type       = type;
     this.position_x = x;
     this.position_y = y;
     this.direction  = direction;
     this.distance   = distance;
     this.landmarkID = id;
     this.name       = name;
 }
Esempio n. 7
0
 public PathNodeInfo(double x, double y, int id, string name)
     : this()
 {
     this.type       = PathNodeType.Absolute;
     this.position_x = x;
     this.position_y = y;
     this.distance   = Math.Sqrt(Math.Pow(x, 2) + Math.Pow(y, 2));
     this.direction  = Math.Atan2(y, x);
     this.landmarkID = id;
     this.name       = name;
 }
Esempio n. 8
0
 public PathNodeInfo(string name, int id)
     : this()
 {
     this.type       = PathNodeType.Absolute;
     this.position_x = 0;
     this.position_y = 0;
     this.distance   = 0;
     this.direction  = 0;
     this.name       = name;
     this.landmarkID = id;
 }
Esempio n. 9
0
 public PathNodeInfo()
 {
     this.name       = "";
     this.type       = PathNodeType.Absolute;
     this.basePlace  = this;
     this.position_x = 0;
     this.position_y = 0;
     this.direction  = 0;
     this.distance   = 0;
     this.landmarkID = 0;
     this.channels   = new Dictionary <PathNodeInfo, ChannelInfo>();
 }
Esempio n. 10
0
 public RouteAction Match(HttpMethod method, PathNodeType nodeType, TypeSpec resourceType)
 {
     switch (nodeType)
     {
         case PathNodeType.Collection:
             return MatchCollectionNodeRequest(method, (ResourceType)resourceType);
         case PathNodeType.Resource:
             if (!MethodInfo.Name.StartsWith(method.ToString()))
                 return null;
             return MatchResourceNodeRequest(method, (ResourceType)resourceType);
     }
     return null;
 }
Esempio n. 11
0
        public PathNodeInfoData(PathNodeInfo node)
            : this()
        {
            this.name       = node.Name;
            this.type       = node.Type;
            this.basePlace  = node.BasePlace != null ? node.BasePlace.Name : "";
            this.position_x = node.XPosition;
            this.position_y = node.YPosition;
            this.direction  = node.Direction;
            this.distance   = node.Distance;

            foreach (ChannelInfo channel in node.Channels.Values)
            {
                this.channels.Add(new ChannelInfoData(channel));
            }
        }
Esempio n. 12
0
        public RouteAction Match(HttpMethod method, PathNodeType nodeType, TypeSpec resourceType)
        {
            switch (nodeType)
            {
            case PathNodeType.Collection:
                return(MatchCollectionNodeRequest(method, (ResourceType)resourceType));

            case PathNodeType.Resource:
                if (!MethodInfo.Name.StartsWith(method.ToString()))
                {
                    return(null);
                }
                return(MatchResourceNodeRequest(method, (ResourceType)resourceType));
            }
            return(null);
        }
Esempio n. 13
0
 /// <summary>
 /// Initializes a new instance of the LinkedPathNode class.
 /// </summary>
 /// <param name="point">The position for this node.</param>
 /// <param name="type">The type of this node.</param>
 public LinkedPathNode(Point point, PathNodeType type)
     : this(new PathNode(point, type))
 {
 }
Esempio n. 14
0
 public PathNode(string name, PathNodeType nodeType)
 {
     Name     = name;
     NodeType = nodeType;
 }
Esempio n. 15
0
 /// <summary>
 /// Initializes a new instance of the LinkedPathNode class.
 /// </summary>
 /// <param name="x">The x position for this node.</param>
 /// <param name="y">The y position for this node.</param>
 /// <param name="type">The type of this node.</param>
 public LinkedPathNode(int x, int y, PathNodeType type)
     : this(new PathNode(x, y, type))
 {
 }
Esempio n. 16
0
 public PathNode(Vector3 pos, PathNodeType Type) : this(pos.x, pos.y, pos.z, Type)
 {
 }
Esempio n. 17
0
 /// <summary>
 /// Initializes a new instance of the PathNode struct.
 /// </summary>
 /// <param name="point">The position for this node.</param>
 /// <param name="type">The type of this node.</param>
 public PathNode(Point point, PathNodeType type)
     : this(point.X, point.Y, type)
 {
 }
Esempio n. 18
0
 public PathGraphNode(Vector3 position, uint id, PathNodeType nodeType = PathNodeType.Invalid)
 {
     Edges = new Dictionary<PathGraphNode, float>();
     NodeType = nodeType;
     Id = id;
     Position = position;
 }