Package com.jme3.scene.shape

Examples of com.jme3.scene.shape.Quad.updateBound()


            ib.put(i++);
          }
        }
    m.setBuffer(Type.Position, 3, vb);
    m.setBuffer(Type.Index, 3, ib);
    m.updateBound();
   
    Geometry g = new Geometry("Debug_NavMesh_"+this.toString(),m);
    g.updateModelBound();
    return g;
  }
View Full Code Here


        if(i <= 0){
          log.warning("Navmesh without any bordercells:"+this);
        }
    m.setBuffer(Type.Position, 3, vb);
    m.setBuffer(Type.Index, 3, ib);
    m.updateBound();
   
    Geometry g = new Geometry("Debug_NavBorderMesh_"+this.toString(),m);
    g.updateModelBound();
    return g;
  }
View Full Code Here

        m.setBuffer(Type.Position, 3, pb);
        m.setBuffer(Type.Normal, 3, nb);
        m.setBuffer(Type.TexCoord, 2, tb);
        m.setBuffer(Type.Index, 3, ib);
        m.setStatic();
        m.updateBound();
        return m;
    }
   
    public void write(JmeExporter ex) throws IOException {
        OutputCapsule oc = ex.getCapsule(this);
View Full Code Here

        Geometry geom = new Geometry();
        Mesh mesh = new Mesh();
        GeometryBatchFactory.mergeGeometries(geometries, mesh);
        applyAtlasCoords(geometries, mesh, atlas);
        mesh.updateCounts();
        mesh.updateBound();
        geom.setMesh(mesh);

        Material mat = new Material(mgr, "Common/MatDefs/Light/Lighting.j3md");
        mat.getAdditionalRenderState().setAlphaTest(true);
        Texture diffuseMap = atlas.getAtlasTexture("DiffuseMap");
View Full Code Here

                    continue;

                vb.compact(currentVertex);
            }

            out.updateBound();
            out.updateCounts();
            out.setStatic();
            //out.setInterleaved();
            Geometry outGeom = new Geometry("Geom"+entry.getKey(), out);
            outGeom.setLocalTransform(inGeom.getWorldTransform());
View Full Code Here

        if (ib instanceof IntBuffer)
            m.setBuffer(Type.Index, 3, (IntBuffer)ib);
        else if (ib instanceof ShortBuffer)
            m.setBuffer(Type.Index, 3, (ShortBuffer)ib);
        m.setStatic();
        m.updateBound();
        return m;
    }

    public FloatBuffer writeTexCoordArray(FloatBuffer store, Vector2f offset, Vector2f scale, float offsetAmount, int totalSize) {
        if (store != null) {
View Full Code Here

    // Assign the indexes and vertices to the mesh.
    m.setBuffer(Type.Position, 3, BufferUtils.createFloatBuffer(vertices));
    m.setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals));
    m.setBuffer(Type.TexCoord, 2, BufferUtils.createFloatBuffer(texCoord));
    m.setBuffer(Type.Index, 1, BufferUtils.createIntBuffer(indexes));
    m.updateBound();

    return m;
  }
}
View Full Code Here

        Mesh m = new Mesh();
        m.setBuffer(Type.Position, 3, BufferUtils.createFloatBuffer(vertices));
        m.setBuffer(Type.TexCoord, 2, BufferUtils.createFloatBuffer(texCoords));
        m.setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals));
        m.setBuffer(Type.Index, 1, BufferUtils.createIntBuffer(indexes));
        m.updateBound();

        return new Geometry("Terrain", m);
    }

    public Geometry cubicalMarchingSquares(AbstractHeightMap heightMap, float scale,
View Full Code Here

        m.setBuffer(Type.Position, 3, BufferUtils.createFloatBuffer(vertices));
        m.setBuffer(Type.TexCoord, 2, BufferUtils.createFloatBuffer(texCoords));
        m.setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals));
        m.setBuffer(Type.Index, 1, BufferUtils.createIntBuffer(indexes));
        m.updateCounts();
        m.updateBound();

        return new Geometry("Terrain", m);
    }

    private float getIsoLevel(float x, float y, float z, float scale,
View Full Code Here

        m.setBuffer(Type.Position, 3, BufferUtils.createFloatBuffer(verts));
        m.setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(sqrNormals));
        m.setBuffer(Type.Index, 1, BufferUtils.createIntBuffer(sqrIndexes));
        m.setMode(Mode.Lines);
        m.updateCounts();
        m.updateBound();

        g = new Geometry("Face(" + verts[0] + ", " + verts[1]
                + ", " + verts[2] + ", " + verts[3] + ")", m);
        g.updateModelBound();
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.