Package org.eaxy

Examples of org.eaxy.Element.find()


            if (1 != skinSet.size()) {
                throw new ColladaParseException("Found " + skinSet.size() + " skin sets for controller id=" + controller.id() + " name=" + controller.name());
            }
            Element skin = skinSet.first();

            ElementSet jointsSet = skin.find("joints");
            if (1 != jointsSet.size()) {
                throw new ColladaParseException("Found " + jointsSet.size() + " joints sets for controller id=" + controller.id() + " name=" + controller.name());
            }
            Element joints = jointsSet.first();
View Full Code Here


                // TODO: this one isn't standard like the others, and sometimes it doesn't exist
                material = libraryMaterials.select("#" + facesMaterial);
                if (null == material) {
                    throw new ColladaParseException("No material for " + facesMaterial + " for geometry id=" + geometry.id() + " name=" + geometry.name());
                }
                ElementSet instanceEffectSet = material.find("instance_effect");
                if (1 != instanceEffectSet.size()) {
                    throw new ColladaParseException("Found " + instanceEffectSet.size() + " instance_effect sets for material " + facesMaterial + " for geometry id="
                                                    + geometry.id() + " name=" + geometry.name());
                }
                Element instanceEffect = instanceEffectSet.first();
View Full Code Here

                    Element effect = libraryEffects.select(effectUrl);
                    if (null == effect) {
                        throw new ColladaParseException("No effect for " + effectUrl + " for geometry id=" + geometry.id() + " name=" + geometry.name());
                    }

                    ElementSet colorSet = effect.find("profile_COMMON", "technique", "lambert", "diffuse", "color");
                    if (1 == colorSet.size()) {
                        Element color = colorSet.first();

                        String colorListString = color.text();
                        String[] colorString = getItemsInString(colorListString);
View Full Code Here

                ElementSet verticesSet = mesh.find("vertices");
                if (1 != verticesSet.size()) {
                    throw new ColladaParseException("Found " + verticesSet.size() + " vertices sets for geometry id=" + geometry.id() + " name=" + geometry.name());
                }
                Element verticesElement = verticesSet.first();
                ElementSet verticesInputSet = verticesElement.find("input");
                List<Input> verticesInputs = parseInputs(verticesInputSet);
                for (Input vertexInput : verticesInputs) {
                    if ("POSITION".equals(vertexInput.semantic)) {
                        Element vertexSourceElement = mesh.select(vertexInput.sourceName);
                        faceInput.vertexPositionSource = parseSource(vertexSourceElement);
View Full Code Here

            source.stride = Integer.parseInt(accessorStride);
        }
        String accessorSource = accessor.attr("source");
        source.accessorSource = accessorSource;

        ElementSet paramSet = accessor.find("param");
        int paramSize = paramSet.size();
        source.parameterNames = new String[paramSize];
        source.parameterTypes = new String[paramSize];
        for (int i = 0; i < paramSize; i++) {
            Element param = paramSet.get(i);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.