Package org.eaxy

Examples of org.eaxy.Element.attr()


            if (1 != vertexWeightsSet.size()) {
                throw new ColladaParseException("Found " + vertexWeightsSet.size() + " vertex weights sets for controller id=" + controller.id() + " name="
                                                + controller.name());
            }
            Element vertexWeights = vertexWeightsSet.first();
            String vertexWeightsCountString = vertexWeights.attr("count");
            int vertexWeightsCount = Integer.parseInt(vertexWeightsCountString);

            String[] jointNameArray = null;
            float[] inverseBindMatrixArray;
            Quat4f[] rotationArray;
View Full Code Here


        ElementSet unitSet = rootElement.find("asset", "unit");
        if (1 != unitSet.size()) {
            throw new ColladaParseException("Found multiple unit asset values");
        }
        Element unitElement = unitSet.first();
        String unitsPerMeterString = unitElement.attr("meter");
        if (null != unitsPerMeterString) {
            unitsPerMeter = Double.parseDouble(unitsPerMeterString);
        }

        boolean yUp = "Y_UP".equals(upAxis);
View Full Code Here

                    throw new ColladaParseException("Found " + instanceEffectSet.size() + " instance_effect sets for material " + facesMaterial + " for geometry id="
                                                    + geometry.id() + " name=" + geometry.name());
                }
                Element instanceEffect = instanceEffectSet.first();

                String effectUrl = instanceEffect.attr("url");

                ElementSet libraryEffectsSet = rootElement.find("library_effects");
                if (0 != libraryEffectsSet.size()) {
                    if (1 != libraryEffectsSet.size()) {
                        throw new ColladaParseException("Found " + libraryEffectsSet.size() + " library effects sets for geometry id=" + geometry.id() + " name="
View Full Code Here

        ElementSet accessorSet = sourceElement.find("technique_common", "accessor");
        if (1 != accessorSet.size()) {
            throw new ColladaParseException("Found " + accessorSet.size() + " accessor sets for sourceElement id=" + sourceElement.id() + " name=" + sourceElement.name());
        }
        Element accessor = accessorSet.first();
        String accessorCount = accessor.attr("count");
        source.count = Integer.parseInt(accessorCount);
        String accessorStride = accessor.attr("stride");
        if (null != accessorStride) {
            source.stride = Integer.parseInt(accessorStride);
        }
View Full Code Here

            throw new ColladaParseException("Found " + accessorSet.size() + " accessor sets for sourceElement id=" + sourceElement.id() + " name=" + sourceElement.name());
        }
        Element accessor = accessorSet.first();
        String accessorCount = accessor.attr("count");
        source.count = Integer.parseInt(accessorCount);
        String accessorStride = accessor.attr("stride");
        if (null != accessorStride) {
            source.stride = Integer.parseInt(accessorStride);
        }
        String accessorSource = accessor.attr("source");
        source.accessorSource = accessorSource;
View Full Code Here

        source.count = Integer.parseInt(accessorCount);
        String accessorStride = accessor.attr("stride");
        if (null != accessorStride) {
            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];
View Full Code Here

        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);
            source.parameterNames[i] = param.attr("name");
            source.parameterTypes[i] = param.attr("type");
        }

        Element objectArray = sourceElement.select(accessorSource);
        if (null == objectArray) {
View Full Code Here

        source.parameterNames = new String[paramSize];
        source.parameterTypes = new String[paramSize];
        for (int i = 0; i < paramSize; i++) {
            Element param = paramSet.get(i);
            source.parameterNames[i] = param.attr("name");
            source.parameterTypes[i] = param.attr("type");
        }

        Element objectArray = sourceElement.select(accessorSource);
        if (null == objectArray) {
            throw new ColladaParseException("Unable to find id " + accessorSource + " for float array in sourceElement id=" + sourceElement.id() + " name="
View Full Code Here

        Element objectArray = sourceElement.select(accessorSource);
        if (null == objectArray) {
            throw new ColladaParseException("Unable to find id " + accessorSource + " for float array in sourceElement id=" + sourceElement.id() + " name="
                                            + sourceElement.name());
        }
        String arraySizeString = objectArray.attr("count");
        int arraySize = Integer.parseInt(arraySizeString);
        String objectArrayDataString = objectArray.text().trim();

        // TODO: we should really parse each parameter type, but we'll assume they are homogeneneous for now
        if (("float".equalsIgnoreCase(source.parameterTypes[0]))
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.