Examples of fetchData()


Examples of com.jme3.scene.plugins.blender.file.Pointer.fetchData()

                    textureData.uvCoordinatesName = null;
                }

                Pointer pTex = (Pointer) textureData.mtex.getFieldValue("tex");
                if (pTex.isNotNull()) {
                    Structure tex = pTex.fetchData().get(0);
                    textureData.textureStructure = tex;
                    texturesList.add(textureData);
                }
            }
        }
View Full Code Here

Examples of com.jme3.scene.plugins.blender.file.Pointer.fetchData()

    @SuppressWarnings("unchecked")
    public ParticleEmitter toParticleEmitter(Structure particleSystem) throws BlenderFileException {
        ParticleEmitter result = null;
        Pointer pParticleSettings = (Pointer) particleSystem.getFieldValue("part");
        if (pParticleSettings.isNotNull()) {
            Structure particleSettings = pParticleSettings.fetchData().get(0);

            int totPart = ((Number) particleSettings.getFieldValue("totpart")).intValue();

            // draw type will be stored temporarily in the name (it is used during modifier applying operation)
            int drawAs = ((Number) particleSettings.getFieldValue("draw_as")).intValue();
View Full Code Here

Examples of com.jme3.scene.plugins.blender.file.Pointer.fetchData()

                long doubleVal = (long) doublePart2 << 32 | doublePart1;
                value = Double.valueOf(Double.longBitsToDouble(doubleVal));
                break;
            case IDP_IDPARRAY: {
                Pointer pointer = (Pointer) data.getFieldValue("pointer");
                List<Structure> arrays = pointer.fetchData();
                List<Object> result = new ArrayList<Object>(arrays.size());
                Properties temp = new Properties();
                for (Structure array : arrays) {
                    temp.load(array, blenderContext);
                    result.add(temp.value);
View Full Code Here

Examples of com.jme3.scene.plugins.blender.file.Pointer.fetchData()

        boolean visible = (restrictflag & 0x01) != 0;

        Pointer pParent = (Pointer) objectStructure.getFieldValue("parent");
        Object parent = blenderContext.getLoadedFeature(pParent.getOldMemoryAddress(), LoadedFeatureDataType.LOADED_FEATURE);
        if (parent == null && pParent.isNotNull()) {
            Structure parentStructure = pParent.fetchData().get(0);
            parent = this.toObject(parentStructure, blenderContext);
        }

        Transform t = this.getTransformation(objectStructure, blenderContext);
        LOGGER.log(Level.FINE, "Importing object of type: {0}", objectType);
View Full Code Here

Examples of com.jme3.scene.plugins.blender.file.Pointer.fetchData()

                    break;
                case MESH:
                    result = new Node(name);
                    MeshHelper meshHelper = blenderContext.getHelper(MeshHelper.class);
                    Pointer pMesh = (Pointer) objectStructure.getFieldValue("data");
                    List<Structure> meshesArray = pMesh.fetchData();
                    List<Geometry> geometries = meshHelper.toMesh(meshesArray.get(0), blenderContext);
                    if (geometries != null) {
                        for (Geometry geometry : geometries) {
                            result.attachChild(geometry);
                        }
View Full Code Here

Examples of com.jme3.scene.plugins.blender.file.Pointer.fetchData()

                case CURVE:
                    result = new Node(name);
                    Pointer pCurve = (Pointer) objectStructure.getFieldValue("data");
                    if (pCurve.isNotNull()) {
                        CurvesHelper curvesHelper = blenderContext.getHelper(CurvesHelper.class);
                        Structure curveData = pCurve.fetchData().get(0);
                        List<Geometry> curves = curvesHelper.toCurve(curveData, blenderContext);
                        for (Geometry curve : curves) {
                            result.attachChild(curve);
                        }
                    }
View Full Code Here

Examples of com.jme3.scene.plugins.blender.file.Pointer.fetchData()

                    break;
                case LAMP:
                    Pointer pLamp = (Pointer) objectStructure.getFieldValue("data");
                    if (pLamp.isNotNull()) {
                        LightHelper lightHelper = blenderContext.getHelper(LightHelper.class);
                        List<Structure> lampsArray = pLamp.fetchData();
                        result = lightHelper.toLight(lampsArray.get(0), blenderContext);
                        if(result == null) {
                            //probably some light type is not supported, just create a node so that we can maintain child-parent relationship for nodes
                            result = new Node(name);
                        }
View Full Code Here

Examples of com.jme3.scene.plugins.blender.file.Pointer.fetchData()

                    break;
                case CAMERA:
                    Pointer pCamera = (Pointer) objectStructure.getFieldValue("data");
                    if (pCamera.isNotNull()) {
                        CameraHelper cameraHelper = blenderContext.getHelper(CameraHelper.class);
                        List<Structure> camerasArray = pCamera.fetchData();
                        result = cameraHelper.toCamera(camerasArray.get(0), blenderContext);
                    }
                    break;
                default:
                    LOGGER.log(Level.WARNING, "Unsupported object type: {0}", type);
View Full Code Here

Examples of com.jme3.scene.plugins.blender.file.Pointer.fetchData()

        Pointer pMPoly = (Pointer) meshStructure.getFieldValue("mpoly");
        Map<String, Vector2f[]> uvCoordinatesForFace = new HashMap<String, Vector2f[]>();

        if (pMPoly.isNotNull() && pMLoop.isNotNull()) {
            Map<String, List<Vector2f>> uvs = this.loadUVCoordinates(meshStructure, true);
            List<Structure> polys = pMPoly.fetchData();
            List<Structure> loops = pMLoop.fetchData();
            int[] vertexColorIndex = verticesColors == null ? null : new int[3];
            for (Structure poly : polys) {
                int materialNumber = ((Number) poly.getFieldValue("mat_nr")).intValue();
                int loopStart = ((Number) poly.getFieldValue("loopstart")).intValue();
View Full Code Here

Examples of com.jme3.scene.plugins.blender.file.Pointer.fetchData()

     *             blender file
     */
    private void readTraditionalFaces(Structure meshStructure) throws BlenderFileException {
        LOGGER.fine("Reading traditional faces.");
        Pointer pMFace = (Pointer) meshStructure.getFieldValue("mface");
        List<Structure> mFaces = pMFace.isNotNull() ? pMFace.fetchData() : null;
        if (mFaces != null && mFaces.size() > 0) {
            // indicates if the material with the specified number should have a texture attached
            Map<String, List<Vector2f>> uvs = this.loadUVCoordinates(meshStructure, false);
            Map<String, Vector2f[]> uvCoordinatesForFace = new HashMap<String, Vector2f[]>();
            int[] vertexColorIndex = verticesColors == null ? null : new int[3];
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.