# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Nested Classes | Methods | Inherited Methods

# Type

`public class Type`
`` `extends BaseObj` ``

java.lang.Object
↳ | android.renderscript.BaseObj
| ↳ | android.renderscript.Type

A Type describes the `Element` and dimensions used for an `Allocation` or a parallel operation. Types are created through `Type.Builder`.

A Type always includes an `Element` and an X dimension. A Type may be multidimensional, up to three dimensions. A nonzero value in the Y or Z dimensions indicates that the dimension is present. Note that a Type with only a given X dimension and a Type with the same X dimension but Y = 1 are not equivalent.

A Type also supports inclusion of level of detail (LOD) or cube map faces. LOD and cube map faces are booleans to indicate present or not present.

A Type also supports YUV format information to support an `Allocation` in a YUV format. The YUV formats supported are `ImageFormat.YV12`, `ImageFormat.NV21`, and `ImageFormat.YUV_420_888`

### Developer Guides

For more information about creating an application that uses RenderScript, read the RenderScript developer guide.

## Summary

### Nested classes
`class` | `Type.Builder` Builder class for Type.
`enum` | `Type.CubemapFace`

### Public methods
`static Type` | `createX(RenderScript rs, Element e, int dimX)` Utility function for creating basic 1D types.
`static Type` | `createXY(RenderScript rs, Element e, int dimX, int dimY)` Utility function for creating basic 2D types.
`static Type` | `createXYZ(RenderScript rs, Element e, int dimX, int dimY, int dimZ)` Utility function for creating basic 3D types.
`int` | `getCount()` Return the total number of accessable cells in the Type.
`Element` | `getElement()` Return the element associated with this Type.
`int` | `getX()` Return the value of the X dimension.
`int` | `getY()` Return the value of the Y dimension or 0 for a 1D allocation.
`int` | `getYuv()` Get the YUV format
`int` | `getZ()` Return the value of the Z dimension or 0 for a 1D or 2D allocation.
`boolean` | `hasFaces()` Return if the Type is a cube map.
`boolean` | `hasMipmaps()` Return if the Type has a mipmap chain.

### Inherited methods
From class `android.renderscript.BaseObj`
`void` | `destroy()` Frees any native resources associated with this object.
`boolean` | `equals(Object obj)` Compare the current BaseObj with another BaseObj for equality.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`String` | `getName()`
`int` | `hashCode()` Calculates the hash code value for a BaseObj.
`void` | `setName(String name)` setName assigns a name to an object.
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public methods

### createX

    public static Type createX (RenderScript rs,
                    Element e,
                    int dimX)

Utility function for creating basic 1D types. The type is created without mipmaps enabled.

Parameters
`rs` | `RenderScript`: The RenderScript context
`e` | `Element`: The Element for the Type
`dimX` | `int`: The X dimension, must be > 0

Returns
`Type` | Type

### createXY

    public static Type createXY (RenderScript rs,
                    Element e,
                    int dimX,
                    int dimY)

Utility function for creating basic 2D types. The type is created without mipmaps or cubemaps.

Parameters
`rs` | `RenderScript`: The RenderScript context
`e` | `Element`: The Element for the Type
`dimX` | `int`: The X dimension, must be > 0
`dimY` | `int`: The Y dimension, must be > 0

Returns
`Type` | Type

### createXYZ

    public static Type createXYZ (RenderScript rs,
                    Element e,
                    int dimX,
                    int dimY,
                    int dimZ)

Utility function for creating basic 3D types. The type is created without mipmaps.

Parameters
`rs` | `RenderScript`: The RenderScript context
`e` | `Element`: The Element for the Type
`dimX` | `int`: The X dimension, must be > 0
`dimY` | `int`: The Y dimension, must be > 0
`dimZ` | `int`: The Z dimension, must be > 0

Returns
`Type` | Type

### getCount

    public int getCount ()

Return the total number of accessable cells in the Type.

Returns
`int` | int

### getElement

    public Element getElement ()

Return the element associated with this Type.

Returns
`Element` | Element

### getX

    public int getX ()

Return the value of the X dimension.

Returns
`int` | int

### getY

    public int getY ()

Return the value of the Y dimension or 0 for a 1D allocation.

Returns
`int` | int

### getYuv

    public int getYuv ()

Get the YUV format

Returns
`int` | int

### getZ

    public int getZ ()

Return the value of the Z dimension or 0 for a 1D or 2D allocation.

Returns
`int` | int

### hasFaces

    public boolean hasFaces ()

Return if the Type is a cube map.

Returns
`boolean` | boolean

### hasMipmaps

    public boolean hasMipmaps ()

Return if the Type has a mipmap chain.

Returns
`boolean` | boolean

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*