ViewRenderable

Renders a 2D Android view in 3D space by attaching it to a Node.

By default, the size of the view is 1 meter in the SceneView per 250dp in the layout. Use a ViewSizer to control how the size of the view in the is calculated.


future = ViewRenderable.builder().setView(context, R.layout.view).build();
viewRenderable = future.thenAccept(...);

Types

Link copied to clipboard
Factory class for ViewRenderable
Link copied to clipboard
Controls the horizontal alignment of the ViewRenderable relative to the it is attached to.
Link copied to clipboard
Controls the vertical alignment of the ViewRenderable relative to the it is attached to.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val view: View

Functions

Link copied to clipboard
open fun attachView(attachmentManager: ViewAttachmentManager)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun createInstance(engine: Engine, assetLoader: AssetLoader, resourceLoader: ResourceLoader, transformProvider: TransformProvider): RenderableInstance
Link copied to clipboard
open fun detachView()
Link copied to clipboard
open fun dispatchTouchEventToView(@NotNull node: @NotNull ViewNode, cameraNode: CameraNode, @NotNull motionEvent: @NotNull MotionEvent): Boolean
Dispatches a touch event to a node's ViewRenderable if that node has a ViewRenderable by converting the touch event into the local coordinate space of the view.
Link copied to clipboard
Get the CollisionShape used for collision detection with this Renderable.
Link copied to clipboard
open fun getFinalModelMatrix(originalMatrix: Matrix): Matrix
Takes the model matrix from the TransformProvider for rendering this and scales it to size it appropriately based on the meters to pixel ratio for the view.
Link copied to clipboard
open fun getId(): ChangeId
Link copied to clipboard
open fun getMaterial(): MaterialInstance
Returns the material bound to the first submesh.
open fun getMaterial(submeshIndex: Int): MaterialInstance
Returns the material bound to the specified submesh.
Link copied to clipboard
open fun getSizer(): ViewSizer
Gets the ViewSizer that controls the size of this ViewRenderable in the .
Link copied to clipboard
open fun getSubmeshCount(): Int
Returns the number of submeshes that this renderable has.
Link copied to clipboard
open fun getSubmeshName(submeshIndex: Int): String
Returns the name associated with the specified submesh.
Link copied to clipboard
Creates a new instance of this ViewRenderable.
Link copied to clipboard
open fun prepareForDraw(engine: Engine)
Link copied to clipboard
open fun setCollisionShape(@Nullable collisionShape: CollisionShape)
Set the CollisionShape used for collision detection with this Renderable.
Link copied to clipboard
open fun setMaterial(material: MaterialInstance)
Sets the material bound to the first submesh.
open fun setMaterial(submeshIndex: Int, material: MaterialInstance)
Sets the material bound to the specified submesh.
Link copied to clipboard
open fun setSizer(viewSizer: ViewSizer)
Sets the ViewSizer that controls the size of this ViewRenderable in the .
Link copied to clipboard