Sampler
open class Sampler : BaseObj
Sampler object that defines how Allocations can be read as textures within a kernel. Samplers are used in conjunction with the rsSample runtime function to return values from normalized coordinates. Any Allocation used with a Sampler must have been created with ; using a Sampler on an android.renderscript.Allocation that was not created with is undefined.
Summary
| Nested classes |
| open |
Builder for creating non-standard samplers.
|
|
|
| Public methods |
| open static Sampler! |
Retrieve a sampler with min and mag set to linear and wrap modes set to clamp.
|
| open static Sampler! |
Retrieve a sampler with mag set to linear, min linear mipmap linear, and wrap modes set to clamp.
|
| open static Sampler! |
Retrieve a sampler with min and mag set to nearest and wrap modes set to clamp.
|
| open static Sampler! |
Retrieve a sampler with min and mag set to linear and wrap modes set to mirrored repeat.
|
| open static Sampler! |
Retrieve a sampler with min and mag set to linear and wrap modes set to mirrored repeat.
|
| open static Sampler! |
Retrieve a sampler with min and mag set to nearest and wrap modes set to mirrored repeat.
|
| open static Sampler! |
Retrieve a sampler with min and mag set to linear and wrap modes set to wrap.
|
| open static Sampler! |
Retrieve a sampler with mag set to linear, min linear mipmap linear, and wrap modes set to wrap.
|
| open static Sampler! |
Retrieve a sampler with min and mag set to nearest and wrap modes set to wrap.
|
| open Float |
|
| open Sampler.Value! |
|
| open Sampler.Value! |
|
| open Sampler.Value! |
|
| open Sampler.Value! |
|
| Inherited functions |
From class BaseObj
Unit |
destroy()
Frees any native resources associated with this object. The primary use is to force immediate cleanup of resources when it is believed the GC will not respond quickly enough.
|
Boolean |
equals(other: Any?)
Compare the current BaseObj with another BaseObj for equality.
|
Unit |
finalize()
|
String! |
getName()
|
Int |
hashCode()
Calculates the hash code value for a BaseObj.
|
Unit |
setName(name: String!)
setName assigns a name to an object. This object can later be looked up by this name.
|
|
Public methods
CLAMP_LINEAR
open static fun CLAMP_LINEAR(rs: RenderScript!): Sampler!
Retrieve a sampler with min and mag set to linear and wrap modes set to clamp.
| Parameters |
rs |
RenderScript!: Context to which the sampler will belong. |
CLAMP_LINEAR_MIP_LINEAR
open static fun CLAMP_LINEAR_MIP_LINEAR(rs: RenderScript!): Sampler!
Retrieve a sampler with mag set to linear, min linear mipmap linear, and wrap modes set to clamp.
| Parameters |
rs |
RenderScript!: Context to which the sampler will belong. |
CLAMP_NEAREST
open static fun CLAMP_NEAREST(rs: RenderScript!): Sampler!
Retrieve a sampler with min and mag set to nearest and wrap modes set to clamp.
| Parameters |
rs |
RenderScript!: Context to which the sampler will belong. |
MIRRORED_REPEAT_LINEAR
open static fun MIRRORED_REPEAT_LINEAR(rs: RenderScript!): Sampler!
Retrieve a sampler with min and mag set to linear and wrap modes set to mirrored repeat.
| Parameters |
rs |
RenderScript!: Context to which the sampler will belong. |
MIRRORED_REPEAT_LINEAR_MIP_LINEAR
open static fun MIRRORED_REPEAT_LINEAR_MIP_LINEAR(rs: RenderScript!): Sampler!
Retrieve a sampler with min and mag set to linear and wrap modes set to mirrored repeat.
| Parameters |
rs |
RenderScript!: Context to which the sampler will belong. |
MIRRORED_REPEAT_NEAREST
open static fun MIRRORED_REPEAT_NEAREST(rs: RenderScript!): Sampler!
Retrieve a sampler with min and mag set to nearest and wrap modes set to mirrored repeat.
| Parameters |
rs |
RenderScript!: Context to which the sampler will belong. |
WRAP_LINEAR
open static fun WRAP_LINEAR(rs: RenderScript!): Sampler!
Retrieve a sampler with min and mag set to linear and wrap modes set to wrap.
| Parameters |
rs |
RenderScript!: Context to which the sampler will belong. |
WRAP_LINEAR_MIP_LINEAR
open static fun WRAP_LINEAR_MIP_LINEAR(rs: RenderScript!): Sampler!
Retrieve a sampler with mag set to linear, min linear mipmap linear, and wrap modes set to wrap.
| Parameters |
rs |
RenderScript!: Context to which the sampler will belong. |
WRAP_NEAREST
open static fun WRAP_NEAREST(rs: RenderScript!): Sampler!
Retrieve a sampler with min and mag set to nearest and wrap modes set to wrap.
| Parameters |
rs |
RenderScript!: Context to which the sampler will belong. |
getAnisotropy
open fun getAnisotropy(): Float
| Return |
Float |
anisotropy setting for the sampler |