Ejemplo n.º 1
0
        public Scientrace.Sphere parseXSphere(XElement xSphere)
        {
            if (xSphere.Name.ToString() != "Sphere")
            {
                throw new XMLException("Sphere does not match its name: " + xSphere.Name.ToString());
            }
            double radius = this.X.getXDouble(xSphere, "Radius");

            Scientrace.Location loc = this.X.getXLocation(xSphere, "Location");
            // Replaced with below: Scientrace.MaterialProperties materialprops = this.getXMaterial(xSphere.Element("Material"));
            Scientrace.MaterialProperties materialprops = this.getXMaterialForObject(xSphere);
            Scientrace.Sphere             tRetSphere    = new Scientrace.Sphere(this.parentcollection,
                                                                                materialprops, loc, radius);

            tRetSphere.setRefAxis(this.X.getXNzVectorByName(xSphere, "RefVec", null));
            return(tRetSphere);
        }
Ejemplo n.º 2
0
        public Scientrace.Sphere parseXSphere(XElement xSphere)
        {
            if (xSphere.Name.ToString() != "Sphere") {
            throw new XMLException("Sphere does not match its name: "+xSphere.Name.ToString());
            }
            double radius = this.X.getXDouble(xSphere, "Radius");
            Scientrace.Location loc = this.X.getXLocation(xSphere, "Location");
            // Replaced with below: Scientrace.MaterialProperties materialprops = this.getXMaterial(xSphere.Element("Material"));
            Scientrace.MaterialProperties materialprops = this.getXMaterialForObject(xSphere);
            Scientrace.Sphere tRetSphere  = new Scientrace.Sphere(this.parentcollection,
            materialprops, loc, radius);

            tRetSphere.setRefAxis(this.X.getXNzVectorByName(xSphere, "RefVec", null));
            return tRetSphere;
        }