docs/android/dokka/filament-android/com.google.android.filament/-view/index.md
//filament-android/com.google.android.filament/View
open class View
Encompasses all the state needed for rendering a Scene.
render operates on View objects. These View objects specify important parameters such as:
View instances are heavy objects that internally cache a lot of data needed for rendering. It is not advised for an application to use many View objects.
For example, in a game, a View could be used for the main scene and another one for the game's user interface. More View instances could be used for creating special effects (e.g. a View is akin to a rendering pass).
| Renderer |
| Scene |
| Camera |
| RenderTarget |
| Name | Summary |
|---|---|
| AmbientOcclusion | [main] |
| enum | |
| List of available ambient occlusion techniques. | |
| AmbientOcclusionOptions | [main] |
| open class AmbientOcclusionOptions | |
| Options for screen space Ambient Occlusion (SSAO) and Screen Space Cone Tracing (SSCT) | |
| AntiAliasing | [main] |
| enum AntiAliasing | |
| List of available post-processing anti-aliasing techniques. | |
| BlendMode | [main] |
| enum BlendMode | |
| BloomOptions | [main] |
| open class BloomOptions | |
| Options to control the bloom effect |
| Name | Summary |
|---|---|
| clearFrameHistory | [main] |
| open fun clearFrameHistory(engine: Engine) | |
| When certain temporal features are used (e.g.: TAA or Screen-space reflections), the view keeps a history of previous frame renders associated with the Renderer the view was last used with. | |
| getAmbientOcclusion | [main] |
| open fun | |
| Queries the type of ambient occlusion active for this View. | |
| getAmbientOcclusionOptions | [main] |
| open fun getAmbientOcclusionOptions(): View.AmbientOcclusionOptions | |
| Gets the ambient occlusion options. | |
| getAntiAliasing | [main] |
| open fun getAntiAliasing(): View.AntiAliasing | |
| Queries whether anti-aliasing is enabled during the post-processing stage. | |
| getBlendMode | [main] |
| open fun getBlendMode(): View.BlendMode | |
| getBloomOptions | [main] |
| open fun getBloomOptions(): View.BloomOptions | |
| Gets the bloom options | |
| getCamera | [main] |
| open fun getCamera(): Camera | |
| Gets this View's associated Camera, or null if none has been assigned. | |
| getColorGrading | [main] |
| open fun getColorGrading(): ColorGrading | |
| Returns the ColorGrading associated to this view. | |
| getDepthOfFieldOptions | [main] |
| open fun getDepthOfFieldOptions(): View.DepthOfFieldOptions | |
| Gets the Depth of Field options | |
| getDithering | [main] |
| open fun getDithering(): View.Dithering | |
| Queries whether dithering is enabled during the post-processing stage. | |
| getDynamicResolutionOptions | [main] |
| open fun getDynamicResolutionOptions(): View.DynamicResolutionOptions | |
| Returns the dynamic resolution options associated with this view. | |
| getEffectiveGridSize | [main] |
| open fun getEffectiveGridSize(): Double | |
| Returns the effective grid size used for grid-based world origin snapping. | |
| getFogEntity | [main] |
| open fun getFogEntity(): Int | |
| Get an Entity representing the large scale fog object. | |
| getFogOptions | [main] |
| open fun getFogOptions(): View.FogOptions | |
| Gets the fog options | |
| getGridSize | [main] |
| open fun getGridSize(): Double | |
| Returns the grid size used for grid-based world origin snapping. | |
| getGuardBandOptions | [main] |
| open fun getGuardBandOptions(): View.GuardBandOptions | |
| Returns screen-space guard band options. | |
| getLastDynamicResolutionScale | [main] |
| open fun getLastDynamicResolutionScale(out: Array<Float>): Array<Float> | |
| Returns the last dynamic resolution scale factor used by this view. | |
| getMaterialGlobal | [main] |
| open fun getMaterialGlobal(index: Int, out: Array<Float>): Array<Float> | |
| Get the value of the material global variables. | |
| getMultiSampleAntiAliasingOptions | [main] |
| open fun getMultiSampleAntiAliasingOptions(): View.MultiSampleAntiAliasingOptions | |
| Returns multi-sample anti-aliasing options. | |
| getName | [main] |
| open fun getName(): String | |
| Returns the View's name. | |
| getNativeObject | [main] |
| open fun getNativeObject(): Long | |
| getRenderQuality | [main] |
| open fun getRenderQuality(): View.RenderQuality | |
| Returns the render quality used by this view. | |
| getRenderTarget | [main] |
| open fun getRenderTarget(): RenderTarget | |
| Gets the offscreen render target associated with this view. | |
| getSampleCount | [main] |
| open fun | |
| Returns the effective MSAA sample count. | |
| getScene | [main] |
| open fun getScene(): Scene | |
| Gets this View's associated Scene, or null if none has been assigned. | |
| getScreenSpaceReflectionsOptions | [main] |
| open fun getScreenSpaceReflectionsOptions(): View.ScreenSpaceReflectionsOptions | |
| Returns screen-space reflections options. | |
| getSoftShadowOptions | [main] |
| open fun getSoftShadowOptions(): View.SoftShadowOptions | |
| Gets soft shadowing options associated with this View. | |
| getStereoscopicOptions | [main] |
| open fun getStereoscopicOptions(): View.StereoscopicOptions | |
| Gets the stereoscopic options. | |
| getTemporalAntiAliasingOptions | [main] |
| open fun getTemporalAntiAliasingOptions(): View.TemporalAntiAliasingOptions | |
| Returns temporal anti-aliasing options. | |
| getToneMapping | [main] |
| open fun | |
| Returns the tone-mapping function. | |
| getViewport | [main] |
| open fun getViewport(): Viewport | |
| Returns the rectangular rendering area. | |
| getVignetteOptions | [main] |
| open fun getVignetteOptions(): View.VignetteOptions | |
| Gets the vignette options | |
| getVisibleLayers | [main] |
| open fun getVisibleLayers(): Int | |
| Returns the visible layers. | |
| getVisibleRenderableCount | [main] |
| open fun getVisibleRenderableCount(): Int | |
| Returns the most recent number of visible renderables for the current Scene as calculated the last time Renderer::render() was called with this View and Scene. | |
| getVsmShadowOptions | [main] |
| open fun getVsmShadowOptions(): View.VsmShadowOptions | |
| Gets the VSM shadowing options. | |
| hasCamera | [main] |
| open fun hasCamera(): Boolean | |
| Query whether a camera is set. | |
| isFrontFaceWindingInverted | [main] |
| open fun isFrontFaceWindingInverted(): Boolean | |
| Returns true if post-processing is enabled. | |
| isFrustumCullingEnabled | [main] |
| open fun isFrustumCullingEnabled(): Boolean | |
| isPostProcessingEnabled | [main] |
| open fun isPostProcessingEnabled(): Boolean | |
| Returns true if post-processing is enabled. | |
| isStencilBufferEnabled | [main] |
| open fun isStencilBufferEnabled(): Boolean | |
| isTransparentPickingEnabled | [main] |
| open fun isTransparentPickingEnabled(): Boolean | |
| Returns true if transparent picking is enabled. | |
| pick | [main] |
| open fun pick(x: Int, y: Int, handler: Any, callback: View.OnPickCallback) | |
| Creates a picking query. | |
| setAmbientOcclusion | [main] |
| open fun | |
| Activates or deactivates ambient occlusion. | |
| setAmbientOcclusionOptions | [main] |
| open fun setAmbientOcclusionOptions(options: View.AmbientOcclusionOptions) | |
| Sets ambient occlusion options. | |
| setAntiAliasing | [main] |
| open fun setAntiAliasing(type: View.AntiAliasing) | |
| Enables or disables anti-aliasing in the post-processing stage. | |
| setBlendMode | [main] |
| open fun setBlendMode(blendMode: View.BlendMode) | |
| Sets the blending mode used to draw the view into the SwapChain. | |
| setBloomOptions | [main] |
| open fun setBloomOptions(options: View.BloomOptions) | |
| Sets bloom options. | |
| setCamera | [main] |
| open fun setCamera(camera: Camera) | |
| Sets this View's Camera. | |
| setColorGrading | [main] |
| open fun setColorGrading(colorGrading: ColorGrading) | |
| Sets this View's color grading transforms. | |
| setDepthOfFieldOptions | [main] |
| open fun setDepthOfFieldOptions(options: View.DepthOfFieldOptions) | |
| Sets Depth of Field options. | |
| setDithering | [main] |
| open fun setDithering(dithering: View.Dithering) | |
| Enables or disables dithering in the post-processing stage. | |
| setDynamicLightingOptions | [main] |
| open fun setDynamicLightingOptions(zLightNear: Float, zLightFar: Float) | |
| Sets options relative to dynamic lighting for this view. | |
| setDynamicResolutionOptions | [main] |
| open fun setDynamicResolutionOptions(options: View.DynamicResolutionOptions) | |
| Sets the dynamic resolution options for this view. | |
| setFogOptions | [main] |
| open fun setFogOptions(options: View.FogOptions) | |
| Sets fog options. | |
| setFrontFaceWindingInverted | [main] |
| open fun setFrontFaceWindingInverted(inverted: Boolean) | |
| Inverts the winding order of front faces. | |
| setFrustumCullingEnabled | [main] |
| open fun setFrustumCullingEnabled(enabled: Boolean) | |
| Enables or disables frustum culling. | |
| setGridSize | [main] |
| open fun setGridSize(size: Double) | |
| Sets the grid size for grid-based world origin snapping. | |
| setGuardBandOptions | [main] |
| open fun setGuardBandOptions(options: View.GuardBandOptions) | |
| Enables or disable screen-space guard band. | |
| setLayerEnabled | [main] |
| open fun setLayerEnabled(layer: Int, enabled: Boolean) | |
| Enables or disables a specific layer. | |
| setMaterialGlobal | [main] |
| open fun setMaterialGlobal(index: Int, value: Array<Float>) | |
| Set the value of material global variables. | |
| setMultiSampleAntiAliasingOptions | [main] |
| open fun setMultiSampleAntiAliasingOptions(options: View.MultiSampleAntiAliasingOptions) | |
| Enables or disable multi-sample anti-aliasing (MSAA). | |
| setName | [main] |
| open fun setName(name: String) | |
| Sets the View's name. | |
| setPostProcessingEnabled | [main] |
| open fun setPostProcessingEnabled(enabled: Boolean) | |
| Enables or disables post processing. | |
| setRenderQuality | [main] |
| open fun setRenderQuality(renderQuality: View.RenderQuality) | |
| Sets the rendering quality for this view (e.g. | |
| setRenderTarget | [main] |
| open fun setRenderTarget(target: RenderTarget) | |
| Specifies an offscreen render target to render into. | |
| setSampleCount | [main] |
| open fun | |
| Sets how many samples are to be used for MSAA in the post-process stage. | |
| setScene | [main] |
| open fun setScene(scene: Scene) | |
| Sets this View instance's Scene. | |
| setScreenSpaceReflectionsOptions | [main] |
| open fun setScreenSpaceReflectionsOptions(options: View.ScreenSpaceReflectionsOptions) | |
| Enables or disable screen-space reflections. | |
| setScreenSpaceRefractionEnabled | [main] |
| open fun setScreenSpaceRefractionEnabled(enabled: Boolean) | |
| Enables or disables screen space refraction. | |
| setShadowingEnabled | [main] |
| open fun setShadowingEnabled(enabled: Boolean) | |
| Enables or disables shadow mapping. | |
| setShadowType | [main] |
| open fun setShadowType(type: View.ShadowType) | |
| Sets the shadow mapping technique this View uses. | |
| setSoftShadowOptions | [main] |
| open fun setSoftShadowOptions(options: View.SoftShadowOptions) | |
| Sets soft shadowing options that apply across the entire View. | |
| setStencilBufferEnabled | [main] |
| open fun setStencilBufferEnabled(enabled: Boolean) | |
| Enables use of the stencil buffer. | |
| setStereoscopicOptions | [main] |
| open fun setStereoscopicOptions(options: View.StereoscopicOptions) | |
| Sets the stereoscopic rendering options for this view. | |
| setTemporalAntiAliasingOptions | [main] |
| open fun setTemporalAntiAliasingOptions(options: View.TemporalAntiAliasingOptions) | |
| Enables or disable temporal anti-aliasing (TAA). | |
| setToneMapping | [main] |
| open fun | |
| Enables or disables tone-mapping in the post-processing stage. | |
| setTransparentPickingEnabled | [main] |
| open fun setTransparentPickingEnabled(enabled: Boolean) | |
| Enables or disables transparent picking. | |
| setViewport | [main] |
| open fun setViewport(viewport: Viewport) | |
| Specifies the rectangular rendering area. | |
| setVignetteOptions | [main] |
| open fun setVignetteOptions(options: View.VignetteOptions) | |
| Sets vignette options. | |
| setVisibleLayers | [main] |
| open fun setVisibleLayers(select: Int, values: Int) | |
| Sets which layers are visible. | |
| setVsmShadowOptions | [main] |
| open fun setVsmShadowOptions(options: View.VsmShadowOptions) | |
| Sets VSM shadowing options that apply across the entire View. |