Tabnine Logo
ShortArray.clear
Code IndexAdd Tabnine to your IDE (free)

How to use
clear
method
in
com.badlogic.gdx.utils.ShortArray

Best Java code snippets using com.badlogic.gdx.utils.ShortArray.clear (Showing top 20 results out of 315)

origin: libgdx/libgdx

/** Clears the data being built up until now, including the vertices, indices and all parts. Must be called in between the call
 * to #begin and #end. Any builder calls made from the last call to #begin up until now are practically discarded. The state
 * (e.g. UV region, color, vertex transform) will remain unchanged. */
public void clear () {
  this.vertices.clear();
  this.indices.clear();
  this.parts.clear();
  this.vindex = 0;
  this.lastIndex = -1;
  this.istart = 0;
  this.part = null;
}
origin: libgdx/libgdx

/** Clears the data being built up until now, including the vertices, indices and all parts. Must be called in between the call
 * to #begin and #end. Any builder calls made from the last call to #begin up until now are practically discarded. The state
 * (e.g. UV region, color, vertex transform) will remain unchanged. */
public void clear () {
  this.vertices.clear();
  this.indices.clear();
  this.parts.clear();
  this.vindex = 0;
  this.lastIndex = -1;
  this.istart = 0;
  this.part = null;
}
origin: libgdx/libgdx

indicesArray.clear();
indicesArray.ensureCapacity(vertexCount);
indicesArray.size = vertexCount;
triangles.clear();
triangles.ensureCapacity(Math.max(0, vertexCount - 2) * 3);
triangulate();
origin: libgdx/libgdx

indicesArray.clear();
indicesArray.ensureCapacity(vertexCount);
indicesArray.size = vertexCount;
triangles.clear();
triangles.ensureCapacity(Math.max(0, vertexCount - 2) * 3);
triangulate();
origin: libgdx/libgdx

@Override
public void addMesh (Mesh mesh, int indexOffset, int numIndices) {
  if (!attributes.equals(mesh.getVertexAttributes())) throw new GdxRuntimeException("Vertex attributes do not match");
  if (numIndices <= 0) return; // silently ignore an empty mesh part
  // FIXME don't triple copy, instead move the copy to jni
  int numFloats = mesh.getNumVertices() * stride;
  tmpVertices.clear();
  tmpVertices.ensureCapacity(numFloats);
  tmpVertices.size = numFloats;
  mesh.getVertices(tmpVertices.items);
  tmpIndices.clear();
  tmpIndices.ensureCapacity(numIndices);
  tmpIndices.size = numIndices;
  mesh.getIndices(indexOffset, numIndices, tmpIndices.items, 0);
  addMesh(tmpVertices.items, tmpIndices.items, 0, numIndices);
}
origin: libgdx/libgdx

@Override
public void addMesh (Mesh mesh, int indexOffset, int numIndices) {
  if (!attributes.equals(mesh.getVertexAttributes())) throw new GdxRuntimeException("Vertex attributes do not match");
  if (numIndices <= 0) return; // silently ignore an empty mesh part
  // FIXME don't triple copy, instead move the copy to jni
  int numFloats = mesh.getNumVertices() * stride;
  tmpVertices.clear();
  tmpVertices.ensureCapacity(numFloats);
  tmpVertices.size = numFloats;
  mesh.getVertices(tmpVertices.items);
  tmpIndices.clear();
  tmpIndices.ensureCapacity(numIndices);
  tmpIndices.size = numIndices;
  mesh.getIndices(indexOffset, numIndices, tmpIndices.items, 0);
  addMesh(tmpVertices.items, tmpIndices.items, 0, numIndices);
}
origin: libgdx/libgdx

this.attributes = attributes;
this.vertices.clear();
this.indices.clear();
this.parts.clear();
this.vindex = 0;
origin: libgdx/libgdx

this.attributes = attributes;
this.vertices.clear();
this.indices.clear();
this.parts.clear();
this.vindex = 0;
origin: libgdx/libgdx

originalIndices.clear();
originalIndices.ensureCapacity(pointCount);
short[] originalIndicesArray = originalIndices.items;
origin: libgdx/libgdx

originalIndices.clear();
originalIndices.ensureCapacity(pointCount);
short[] originalIndicesArray = originalIndices.items;
origin: libgdx/libgdx

originalIndices.clear();
originalIndices.ensureCapacity(pointCount);
short[] originalIndicesArray = originalIndices.items;
origin: libgdx/libgdx

originalIndices.clear();
originalIndices.ensureCapacity(pointCount);
short[] originalIndicesArray = originalIndices.items;
origin: libgdx/libgdx

/** End building the mesh and returns the mesh
 * @param mesh The mesh to receive the built vertices and indices, must have the same attributes and must be big enough to hold
 *           the data, any existing data will be overwritten. */
public Mesh end (Mesh mesh) {
  endpart();
  if (attributes == null) throw new GdxRuntimeException("Call begin() first");
  if (!attributes.equals(mesh.getVertexAttributes())) throw new GdxRuntimeException("Mesh attributes don't match");
  if ((mesh.getMaxVertices() * stride) < vertices.size)
    throw new GdxRuntimeException("Mesh can't hold enough vertices: " + mesh.getMaxVertices() + " * " + stride + " < "
      + vertices.size);
  if (mesh.getMaxIndices() < indices.size)
    throw new GdxRuntimeException("Mesh can't hold enough indices: " + mesh.getMaxIndices() + " < " + indices.size);
  mesh.setVertices(vertices.items, 0, vertices.size);
  mesh.setIndices(indices.items, 0, indices.size);
  for (MeshPart p : parts)
    p.mesh = mesh;
  parts.clear();
  attributes = null;
  vertices.clear();
  indices.clear();
  return mesh;
}
origin: libgdx/libgdx

/** End building the mesh and returns the mesh
 * @param mesh The mesh to receive the built vertices and indices, must have the same attributes and must be big enough to hold
 *           the data, any existing data will be overwritten. */
public Mesh end (Mesh mesh) {
  endpart();
  if (attributes == null) throw new GdxRuntimeException("Call begin() first");
  if (!attributes.equals(mesh.getVertexAttributes())) throw new GdxRuntimeException("Mesh attributes don't match");
  if ((mesh.getMaxVertices() * stride) < vertices.size)
    throw new GdxRuntimeException("Mesh can't hold enough vertices: " + mesh.getMaxVertices() + " * " + stride + " < "
      + vertices.size);
  if (mesh.getMaxIndices() < indices.size)
    throw new GdxRuntimeException("Mesh can't hold enough indices: " + mesh.getMaxIndices() + " < " + indices.size);
  mesh.setVertices(vertices.items, 0, vertices.size);
  mesh.setIndices(indices.items, 0, indices.size);
  for (MeshPart p : parts)
    p.mesh = mesh;
  parts.clear();
  attributes = null;
  vertices.clear();
  indices.clear();
  return mesh;
}
origin: libgdx/libgdx

tmpIndices.clear();
tmpIndices.ensureCapacity(divisionsU * 2);
tmpIndices.size = s;
origin: libgdx/libgdx

tmpIndices.clear();
tmpIndices.ensureCapacity(divisionsU * 2);
tmpIndices.size = s;
origin: libgdx/libgdx

triangles.clear();
if (count < 6) return triangles;
triangles.ensureCapacity(count);
origin: libgdx/libgdx

triangles.clear();
if (count < 6) return triangles;
triangles.ensureCapacity(count);
origin: com.badlogicgames.gdx/gdx

/** Clears the data being built up until now, including the vertices, indices and all parts. Must be called in between the call
 * to #begin and #end. Any builder calls made from the last call to #begin up until now are practically discarded. The state
 * (e.g. UV region, color, vertex transform) will remain unchanged. */
public void clear () {
  this.vertices.clear();
  this.indices.clear();
  this.parts.clear();
  this.vindex = 0;
  this.lastIndex = -1;
  this.istart = 0;
  this.part = null;
}
origin: com.badlogicgames.gdx/gdx

@Override
public void addMesh (Mesh mesh, int indexOffset, int numIndices) {
  if (!attributes.equals(mesh.getVertexAttributes())) throw new GdxRuntimeException("Vertex attributes do not match");
  if (numIndices <= 0) return; // silently ignore an empty mesh part
  // FIXME don't triple copy, instead move the copy to jni
  int numFloats = mesh.getNumVertices() * stride;
  tmpVertices.clear();
  tmpVertices.ensureCapacity(numFloats);
  tmpVertices.size = numFloats;
  mesh.getVertices(tmpVertices.items);
  tmpIndices.clear();
  tmpIndices.ensureCapacity(numIndices);
  tmpIndices.size = numIndices;
  mesh.getIndices(indexOffset, numIndices, tmpIndices.items, 0);
  addMesh(tmpVertices.items, tmpIndices.items, 0, numIndices);
}
com.badlogic.gdx.utilsShortArrayclear

Popular methods of ShortArray

  • get
  • <init>
    Creates a new ordered array containing the elements in the specified array. The capacity is set to t
  • add
  • ensureCapacity
    Increases the size of the backing array to accommodate the specified number of additional items. Use
  • set
  • addAll
  • removeIndex
    Removes and returns the item at the specified index.
  • resize
  • toArray
  • pop
    Removes and returns the last item.

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JButton (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now