Examples of MeshContext


Examples of com.jme3.scene.plugins.blender.meshes.MeshContext

            LOGGER.log(Level.WARNING, "Armature modifier is invalid! Cannot be applied to: {0}", node.getName());
        }// if invalid, animData will be null
        if (skeleton != null) {
            // setting weights for bones
            List<Geometry> geomList = (List<Geometry>) blenderContext.getLoadedFeature(meshOMA, LoadedFeatureDataType.LOADED_FEATURE);
            MeshContext meshContext = blenderContext.getMeshContext(meshOMA);
            int[] bonesGroups = new int[] { 0 };
            for (Geometry geom : geomList) {
                int materialIndex = meshContext.getMaterialIndex(geom);
                Mesh mesh = geom.getMesh();

                try {
                    VertexBuffer[] buffers = this.readVerticesWeightsData(objectStructure, meshStructure, skeleton, materialIndex, bonesGroups, blenderContext);
                    if (buffers != null) {
View Full Code Here

Examples of com.jme3.scene.plugins.blender.meshes.MeshContext

     */
    private VertexBuffer[] readVerticesWeightsData(Structure objectStructure, Structure meshStructure, Skeleton skeleton, int materialIndex, int[] bonesGroups, BlenderContext blenderContext) throws BlenderFileException {
        Structure defBase = (Structure) objectStructure.getFieldValue("defbase");
        Map<Integer, Integer> groupToBoneIndexMap = this.getGroupToBoneIndexMap(defBase, skeleton);

        MeshContext meshContext = blenderContext.getMeshContext(meshStructure.getOldMemoryAddress());

        return this.getBoneWeightAndIndexBuffer(meshStructure, meshContext.getVertexCount(materialIndex), bonesGroups, meshContext.getVertexReferenceMap(materialIndex), groupToBoneIndexMap);
    }
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.