Exemple #1
0
        /// <inheritdoc />
        public NodeSocketView NodeSocketContains(PointF point)
        {
            if (NodeBounds.Contains(point))
            {
                foreach (NodeSocketView socket in inSockets)
                {
                    if (socket.Contains(point))
                    {
                        return(socket);
                    }
                }

                foreach (NodeSocketView socket in outSockets)
                {
                    if (socket.Contains(point))
                    {
                        return(socket);
                    }
                }

                foreach (NodeSocketView socket in variableSockets)
                {
                    if (socket.Contains(point))
                    {
                        return(socket);
                    }
                }
            }

            return(null);
        }
Exemple #2
0
        public OctreeNode RecursiveUpdate(T obj, Vector3 pos)
        {
            if (!NodeBounds.Contains(pos))
            {
                Contained.Remove(obj);
                CheckChildren();
                if (Parent != null)
                {
                    return(Parent.RecursiveUpdate(obj, pos));
                }
                else
                {
                    throw new System.InvalidOperationException("Node not contained in octree (bounds == " + NodeBounds + ")");
                }
            }

            return(RecursiveInsert(obj, pos));
        }