Codota Logo
com.jme3.util
Code IndexAdd Codota to your IDE (free)

How to use com.jme3.util

Best Java code snippets using com.jme3.util (Showing top 20 results out of 351)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Will reload the filter's materials whenever the shader file is changed 
 * on the hard drive
 * @param shaderName the shader name (relative path to the asset folder or 
 * to a registered asset path)
 * @param filter the filter to reload
 */
public void registerBinding(String shaderName, final Filter filter) {
  registerBinding(new FileChangedTrigger(shaderName), filter);
}
origin: jMonkeyEngine/jmonkeyengine

@Override
protected void deleteNativeBuffers() {
  super.deleteNativeBuffers();
  if (previousData != null) {
    BufferUtils.destroyDirectBuffer(previousData);
    previousData = null;
  }
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Direct buffers are garbage collected by using a phantom reference and a
 * reference queue. Every once a while, the JVM checks the reference queue
 * and cleans the direct buffers. However, as this doesn't happen
 * immediately after discarding all references to a direct buffer, it's easy
 * to OutOfMemoryError yourself using direct buffers.
 **/
public static void destroyDirectBuffer(Buffer toBeDestroyed) {
  if (!isDirect(toBeDestroyed)) {
    return;
  }
  allocator.destroyDirectBuffer(toBeDestroyed);
}
origin: jMonkeyEngine/jmonkeyengine

@Override
public void simpleUpdate(float tpf) {
  ByteBuffer buf = BufferUtils.createByteBuffer(500000);
  BufferUtils.destroyDirectBuffer(buf);
  
  FloatBuffer buf2 = BufferUtils.createFloatBuffer(500000);
  BufferUtils.destroyDirectBuffer(buf2);
}

origin: jMonkeyEngine/jmonkeyengine

private IntMap<Savable> intSavableMapFromKV(int[] keys, Savable[] values) {
  if(keys == null || values == null) {
    return null;
  }
  IntMap<Savable> map = new IntMap<Savable>(keys.length);
  for (int x = 0; x < keys.length; x++)
    map.put(keys[x], values[x]);
  return map;
}
origin: jMonkeyEngine/jmonkeyengine

public ListIterator<E> listIterator(int index) {
  return new ArrayIterator<E>(getArray(), index);
}
origin: jMonkeyEngine/jmonkeyengine

/**
 *
 * <code>getChild</code> returns a child at a given index.
 *
 * @param i
 *            the index to retrieve the child from.
 * @return the child at a specified index.
 */
public Spatial getChild(int i) {
  return children.get(i);
}
origin: jMonkeyEngine/jmonkeyengine

protected void updateMatParamOverrides() {
  refreshFlags &= ~RF_MATPARAM_OVERRIDE;
  worldOverrides.clear();
  if (parent == null) {
    worldOverrides.addAll(localOverrides);
  } else {
    assert (parent.refreshFlags & RF_MATPARAM_OVERRIDE) == 0;
    worldOverrides.addAll(parent.worldOverrides);
    worldOverrides.addAll(localOverrides);
  }
}
origin: jMonkeyEngine/jmonkeyengine

/**
* Create a sky using the given cubemap or spheremap texture.
*
* @param assetManager from which to load materials
* @param texture to use  
* @param envMapType see {@link EnvMapType}
* @return a new spatial representing the sky, ready to be attached to the
* scene graph    
*/  
public static Spatial createSky(AssetManager assetManager, Texture texture, EnvMapType envMapType) {
  return createSky(assetManager, texture, Vector3f.UNIT_XYZ, envMapType);
}
 
origin: jMonkeyEngine/jmonkeyengine

/**
 * Returns true if this spatial requires updateLogicalState() to
 * be called, either because setRequiresUpdate(true) has been called
 * or because the spatial has controls.  This is package private to
 * avoid exposing it to the public API since it is only used by Node.
 */
boolean requiresUpdates() {
  return requiresUpdates | !controls.isEmpty();
}
/**
origin: jMonkeyEngine/jmonkeyengine

/**
 * Do not use.
 * Called to reset pressed keys or buttons when focus is restored.
 */
public void reset() {
  pressedButtons.clear();
  axisValues.clear();
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Remove a forced material parameter previously added.
 *
 * @param override The override to remove.
 * @see #addForcedMatParam(com.jme3.material.MatParamOverride)
 */
public void removeForcedMatParam(MatParamOverride override) {
  forcedOverrides.remove(override);
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Sorts the elements in the list according to their Comparator.
 */
public void sort() {
  if (size > 1) {
    // sort the spatial list using the comparator
    if(listSort.getLength() != size){
      listSort.allocateStack(size);
    }                       
    listSort.sort(geometries,comparator);
  }
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Clears all {@link RawInputListener}s.
 *
 * @see InputManager#addRawInputListener(com.jme3.input.RawInputListener)
 */
public void clearRawInputListeners() {
  rawListeners.clear();
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Removes a buffer block by the name.
 *
 * @param name the buffer block's name.
 */
public void removeBufferBlock(final String name){
  bufferBlocks.remove(name);
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Quick sorts the supplied array using the specified comparator.
 */
public static void qsort(Object[] a, Comparator comp) {
  qsort(a, 0, a.length - 1, comp);
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Merge sort
 */
public static void msort(Object[] src, Object[] dest, Comparator comp){
  msort(src, dest, 0, src.length - 1, comp);
}

origin: jMonkeyEngine/jmonkeyengine

/**
 * Initializes the GeometryList to use the given {@link GeometryComparator}
 * to use for comparing geometries.
 *
 * @param comparator The comparator to use.
 */
public GeometryList(GeometryComparator comparator) {
  size = 0;
  geometries = new Geometry[DEFAULT_SIZE];      
  this.comparator = comparator;
  listSort = new ListSort<Geometry>();
}
origin: jMonkeyEngine/jmonkeyengine

@Override
public Quaternion getOrientation() {
  VRUtil.convertMatrix4toQuat(hmdPose, rotStore);
  return rotStore;
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Will reload the spatials's materials whenever the shader file is changed 
 * on the hard drive
 * @param shaderName the shader name (relative path to the asset folder or 
 * to a registered asset path)
 * @param spat the spatial to reload
 */
public void registerBinding(String shaderName, final Spatial spat) {
  registerBinding(new FileChangedTrigger(shaderName), spat);
}
com.jme3.util

Most used classes

  • BufferUtils
    BufferUtils is a helper class for generating nio buffers from jME data classes such as Vectors and C
  • SafeArrayList
    Provides a list with similar modification semantics to java.util.concurrent's CopyOnWriteArrayList e
  • TempVars
    Temporary variables assigned to each thread. Engine classes may access these temp variables with Tem
  • IntMap
    Similar to a Map except that ints are used as keys. Taken from http://code.google.com/p/skorpios/ [
  • Cloner
    A deep clone utility that provides similar object-graph-preserving qualities to typical serializatio
  • LittleEndien,
  • SkyFactory,
  • PlaceholderAssets,
  • TangentBinormalGenerator,
  • BlockLanguageParser,
  • Statement,
  • SAXUtil,
  • JmeFormatter,
  • ListMap,
  • MikktspaceTangentGenerator,
  • NativeObjectManager,
  • Screenshots,
  • IntMap$IntMapIterator,
  • ListMap$ListMapEntry
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now