Exemplo n.º 1
0
        public Object Clone()
        {
            Vector3d[] pnts = _points3d.Clone() as Vector3d[];
            Prism      p    = new Prism(pnts);

            if (coordSys != null)
            {
                p.coordSys = coordSys.Clone() as CoordinateSystem;
            }
            p.computeMaxMin();
            return(p);
        }
Exemplo n.º 2
0
        }// ComputePolygonVolume

        public static bool PointInPolygon(Vector3d pos, Prism poly)
        {
            return(pos.x < poly.MaxCoord.x && pos.x > poly.MinCoord.x &&
                   pos.y < poly.MaxCoord.y && pos.y > poly.MinCoord.y &&
                   pos.z < poly.MaxCoord.z && pos.z > poly.MinCoord.z);
        }// PointInPolygon
Exemplo n.º 3
0
        public static double ComputePolygonVolume(Prism poly)
        {
            Vector3d xyz = poly.MaxCoord - poly.MinCoord;

            return(xyz.x * xyz.y * xyz.z);
        }// ComputePolygonVolume