protected override BoundingBox InitSourceActiveBounds()
        {
            if (this.NodeNum <= 0)
            { throw new ArgumentException("No nodes found"); }

            vec3[] nodes = this.Nodes;
            var boundingBox = new BoundingBox(nodes[0], nodes[0]);
            for (int i = 1; i < nodes.Length; i++)
            {
                boundingBox = boundingBox.Union(nodes[i]);
            }
            return boundingBox;
        }
示例#2
0
        //public PointRadiusBuffer CreateRadiusBuffer(float[] radius)
        //{
        //    return (this.Factory as PointGridFactory).CreateRadiusBufferData(this, radius);
        //}
        //public PointRadiusBuffer CreateRadiusBuffer(float radius)
        //{
        //    return (this.Factory as PointGridFactory).CreateRadiusBufferData(this, radius);
        //}
        protected override BoundingBox InitSourceActiveBounds()
        {
            if (this.Positions == null || this.Positions.Length <= 0)
            { throw new ArgumentException("Points has No Value"); }

            vec3 v = this.Positions[0];
            var boundingBox = new BoundingBox(v, v);
            for (int i = 1; i < this.Positions.Length; i++)
            {
                boundingBox = boundingBox.Union(this.Positions[i]);
            }
            return boundingBox;
        }