Class Overview
Type is an allocation template. It consists of an Element and one or more
dimensions. It describes only the layout of memory but does not allocate any
storage for the data that is described.
A Type consists of several dimensions. Those are X, Y, Z, LOD (level of
detail), Faces (faces of a cube map). The X,Y,Z dimensions can be assigned
any positive integral value within the constraints of available memory. A
single dimension allocation would have an X dimension of greater than zero
while the Y and Z dimensions would be zero to indicate not present. In this
regard an allocation of x=10, y=1 would be considered 2 dimensionsal while
x=10, y=0 would be considered 1 dimensional.
The LOD and Faces dimensions are booleans to indicate present or not present.
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 |
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
|
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.
|
[Expand]
Inherited Methods |
From class
android.renderscript.BaseObj
synchronized
void
|
destroy()
destroy disconnects the object from the native object effectively
rendering this java object dead.
|
boolean
|
equals(Object obj)
Compare the current BaseObj with another BaseObj for equality.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
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 o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Public Methods
public
int
getCount
()
Return the total number of accessable cells in the Type.
public
Element
getElement
()
Return the element associated with this Type.
public
int
getX
()
Return the value of the X dimension.
public
int
getY
()
Return the value of the Y dimension or 0 for a 1D allocation.
public
int
getZ
()
Return the value of the Z dimension or 0 for a 1D or 2D allocation.
public
boolean
hasFaces
()
Return if the Type is a cube map.
public
boolean
hasMipmaps
()
Return if the Type has a mipmap chain.