Android Open Source - jmini3d My Int16 Array






From Project

Back to project page jmini3d.

License

The source code is released under:

Copyright 2012 Mobialia http://www.mobialia.com/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to ...

If you think the Android project jmini3d listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package jmini3d.gwt;
//from w  ww.  ja  va  2 s  .c o  m
import com.google.gwt.core.client.JsArrayInteger;
import com.googlecode.gwtgl.array.ArrayBuffer;
import com.googlecode.gwtgl.array.IntBasedTypedArray;
import com.googlecode.gwtgl.array.JsArrayUtil;
import com.googlecode.gwtgl.array.TypedArray;

/**
 * {@link TypedArray} that contains 16 Bit integer values.
 */
public class MyInt16Array extends IntBasedTypedArray<MyInt16Array> {

  /**
   * Creates a new instance of the {@link TypedArray} using the given {@link ArrayBuffer} to
   * read/write values from/to.
   *
   * @param buffer the underlying {@link ArrayBuffer} of the newly created {@link TypedArray}.
   * @return the created {@link TypedArray}.
   */
  public static native MyInt16Array create(ArrayBuffer buffer) /*-{
        return new Int16Array(buffer);
  }-*/;

  /**
   * Creates a new instance of the {@link TypedArray} using the given {@link ArrayBuffer} to
   * read/write values from/to.
   * <p/>
   * The {@link TypedArray} is created using the byteOffset to specify the starting point (in bytes)
   * of the {@link TypedArray} relative to the beginning of the underlying {@link ArrayBuffer}. The
   * byte offset must match (multiple) the value length of this {@link TypedArray}.
   * <p/>
   * if the byteLength is not valid for the given {@link ArrayBuffer}, an exception is thrown
   *
   * @param buffer     the underlying {@link ArrayBuffer} of the newly created {@link TypedArray}.
   * @param byteOffset the offset relative to the beginning of the ArrayBuffer (multiple of the
   *                   value length of this {@link TypedArray})
   * @return the newly created {@link TypedArray}.
   */
  public static native MyInt16Array create(ArrayBuffer buffer, int byteOffset) /*-{
        return new Int16Array(buffer, byteOffset);
  }-*/;

  /**
   * Creates a new instance of the {@link TypedArray} using the given {@link ArrayBuffer} to
   * read/write values from/to.
   * <p/>
   * The {@link TypedArray} is created using the byteOffset and length to specify the start and end
   * (in bytes) of the {@link TypedArray} relative to the beginning of the underlying
   * {@link ArrayBuffer}. The byte offset must match (multiple) the value length of this
   * {@link TypedArray}. The length is in values of the type of the {@link TypedArray}
   * <p/>
   * if the byteLength or length is not valid for the given {@link ArrayBuffer}, an exception is
   * thrown
   *
   * @param buffer     the underlying {@link ArrayBuffer} of the newly created {@link TypedArray}.
   * @param byteOffset the offset relative to the beginning of the ArrayBuffer (multiple of the
   *                   value length of this {@link TypedArray})
   * @param length     the lenght of the {@link TypedArray} in vales.
   * @return the newly created {@link TypedArray}.
   */
  public static native MyInt16Array create(ArrayBuffer buffer, int byteOffset, int length) /*-{
                return new Int16Array(buffer, byteOffset, length);
  }-*/;

  /**
   * Creates a new instance of the {@link TypedArray} of the given length in values. All values are
   * set to 0.
   *
   * @param length the length in values of the type used by this {@link TypedArray}
   * @return the created {@link TypedArray}.
   */
  public static native MyInt16Array create(int length) /*-{
                return new Int16Array(length);
  }-*/;

  /**
   * Creates a new instance of the {@link TypedArray} of the length of the given array in values.
   * The values are set to the values of the given array.
   *
   * @param array the array to get the values from
   * @return the created {@link TypedArray}.
   */
  public static MyInt16Array create(short[] array) {
    return create(JsArrayUtil.wrapArray(array));
  }

  /**
   * Creates a new instance of the {@link TypedArray} of the same length as the given
   * {@link TypedArray}. The values are set to the values of the given {@link TypedArray}.
   *
   * @param array the {@link TypedArray} to get the values from
   * @return the created {@link TypedArray}.
   */
  public static native MyInt16Array create(MyInt16Array array) /*-{
                return new Int16Array(array);
  }-*/;

  /**
   * Creates a new instance of the {@link TypedArray} of the length of the given array in values.
   * The values are set to the values of the given array.
   *
   * @param array the array to get the values from
   * @return the created {@link TypedArray}.
   */
  public static native MyInt16Array create(JsArrayInteger array) /*-{
                return new Int16Array(array);
  }-*/;

  /**
   * protected standard constructor as specified by
   * {@link com.google.gwt.core.client.JavaScriptObject}.
   */
  protected MyInt16Array() {
    super();
  }

}




Java Source Code List

cocoonjs.CocoonJsLinker.java
jmini3d.Blending.java
jmini3d.Camera.java
jmini3d.Color4.java
jmini3d.CubeMapTexture.java
jmini3d.Font.java
jmini3d.GpuObjectStatus.java
jmini3d.MatrixUtils.java
jmini3d.Object3d.java
jmini3d.Rect.java
jmini3d.SceneController.java
jmini3d.Scene.java
jmini3d.Texture.java
jmini3d.Utils.java
jmini3d.Vector3.java
jmini3d.android.Activity3d.java
jmini3d.android.GeometryBuffers.java
jmini3d.android.GlSurfaceView3d.java
jmini3d.android.GpuUploader.java
jmini3d.android.Program.java
jmini3d.android.Renderer3d.java
jmini3d.android.ResourceLoader.java
jmini3d.android.compat.CompatibilityWrapper5.java
jmini3d.android.demo.DemoActivity.java
jmini3d.android.input.InputController.java
jmini3d.demo.ArialFont.java
jmini3d.demo.CubeScene.java
jmini3d.demo.CubesScene.java
jmini3d.demo.DemoSceneController.java
jmini3d.demo.EnvMapCubeScene.java
jmini3d.demo.NormalMapScene.java
jmini3d.demo.ParentScene.java
jmini3d.demo.TeapotGeometry.java
jmini3d.demo.TeapotScene.java
jmini3d.geometry.BoxGeometry.java
jmini3d.geometry.Geometry.java
jmini3d.geometry.PlaneGeometry.java
jmini3d.geometry.SkyboxGeometry.java
jmini3d.geometry.SpriteGeometry.java
jmini3d.geometry.VariableGeometry.java
jmini3d.gwt.Canvas3d.java
jmini3d.gwt.EngineResources.java
jmini3d.gwt.EntryPoint3d.java
jmini3d.gwt.GeometryBuffers.java
jmini3d.gwt.GpuUploader.java
jmini3d.gwt.MyInt16Array.java
jmini3d.gwt.Program.java
jmini3d.gwt.Renderer3d.java
jmini3d.gwt.ResourceLoader.java
jmini3d.gwt.TextureLoadedListener.java
jmini3d.gwt.demo.DemoEntryPoint.java
jmini3d.gwt.input.InputController.java
jmini3d.input.KeyListener.java
jmini3d.input.TouchListener.java
jmini3d.input.TouchPointer.java
jmini3d.light.AmbientLight.java
jmini3d.light.DirectionalLight.java
jmini3d.light.Light.java
jmini3d.light.PointLight.java
jmini3d.material.Material.java
jmini3d.material.PhongMaterial.java
jmini3d.material.SpriteMaterial.java
jmini3d.utils.Fnt2Class.java
jmini3d.utils.Obj2Class.java