示例#1
0
文件: Ray.cs 项目: lanicon/NetVecCad
        public double get_b()
        {
            if (true == Slope.isVertical())
            {
                return(Double.NaN);
            }

            return(this.StartPoint.z.Value - (StartPoint.x * Slope.getAsSlope() * this.advanceDirection));
        }
示例#2
0
文件: Ray.cs 项目: lanicon/NetVecCad
        public double?getElevationAlong(double X)
        {
            if (true == Slope.isVertical())
            {
                return(null);
            }

            double horizDistance = X - StartPoint.x;

            if (Math.Sign(horizDistance) != Math.Sign(Slope.getAsSlope()))
            {
                return(null);
            }

            return((double?)
                   ((horizDistance * Slope.getAsSlope()) + this.StartPoint.z));
        }