Code example for FloatBuffer

Methods: limit

0
         * @param vertices vertices to set 
         * @param indices indices to set 
         */ 
	public Object3D(String name, FloatBuffer vertices, CharBuffer indices) {
		super(name);
		if(vertices.limit() % 3 != 0) {
			Log.e(TAG, "Invalid vertex array length (Found: "
					+vertices.limit()+", not divisable by 3) in "+name);
			return; 
		} 
		mVertexCount = vertices.limit() / 3;
		this.mVertices = vertices;
		this.mIndices = indices;
	} 
 
	/** 
	 * Creates a clone of this mesh.  
	 * The clone shares vertices, indices etc 
	 * with the original but the buffers are write protected. 
	 * If you change the original Object3D's buffers, those changes 
	 * will be visible in the clone.