| java.lang.Object | |
| ↳ | android.renderscript.FileA3D |
FileA3D allows users to load Renderscript objects from files or resources stored on disk. It could be used to load items such as 3D geometry data converted to a Renderscript format from content creation tools. Currently only meshes are supported in FileA3D. When successfully loaded, FileA3D will contain a list of index entries for all the objects stored inside it.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| FileA3D.EntryType | Specifies what renderscript object type is contained within the FileA3D IndexEntry | ||||||||||
| FileA3D.IndexEntry | IndexEntry contains information about one of the Renderscript objects inside the file's index. | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a FileA3D object from an asset stored on disk
| |||||||||||
Creates a FileA3D object from a file stored on disk
| |||||||||||
Creates a FileA3D object from a file stored on disk
| |||||||||||
Creates a FileA3D object from an application resource
| |||||||||||
destroy disconnects the object from the native object effectivly
rendering this java object dead.
| |||||||||||
Returns an index entry from the list of all objects inside
FileA3D
| |||||||||||
Returns the number of objects stored inside the a3d file
| |||||||||||
setName assigns a name to an object.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Called before the object's memory is reclaimed by the VM.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Creates a FileA3D object from an asset stored on disk
| rs | Context to which the object will belong. |
|---|---|
| mgr | asset manager used to load asset |
| path | location of the file to load |
Creates a FileA3D object from a file stored on disk
| rs | Context to which the object will belong. |
|---|---|
| path | location of the file to load |
Creates a FileA3D object from a file stored on disk
| rs | Context to which the object will belong. |
|---|---|
| path | location of the file to load |
Creates a FileA3D object from an application resource
| rs | Context to which the object will belong. |
|---|---|
| res | resource manager used for loading |
| id | resource to create FileA3D from |
destroy disconnects the object from the native object effectivly rendering this java object dead. The primary use is to force immediate cleanup of resources when its believed the GC will not respond quickly enough.
Returns an index entry from the list of all objects inside FileA3D
| index | number of the entry from the list to return |
|---|
Returns the number of objects stored inside the a3d file
setName assigns a name to an object. This object can later be looked up by this name. This name will also be retained if the object is written to an A3D file.
| name | The name to assign to the object. |
|---|
Called before the object's memory is reclaimed by the VM. This can only happen once the garbage collector has detected that the object is no longer reachable by any thread of the running application.
The method can be used to free system resources or perform other cleanup
before the object is garbage collected. The default implementation of the
method is empty, which is also expected by the VM, but subclasses can
override finalize() as required. Uncaught exceptions which are
thrown during the execution of this method cause it to terminate
immediately but are otherwise ignored.
Note that the VM does guarantee that finalize() is called at most
once for any object, but it doesn't guarantee when (if at all) finalize() will be called. For example, object B's finalize()
can delay the execution of object A's finalize() method and
therefore it can delay the reclamation of A's memory. To be safe, use a
ReferenceQueue, because it provides more control
over the way the VM deals with references during garbage collection.
| Throwable |
|---|