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(...);
Content copied to clipboard
Types
Link copied to clipboard
Factory class for ViewRenderable
Link copied to clipboard
enum HorizontalAlignment
Controls the horizontal alignment of the ViewRenderable relative to the it is attached to.
Link copied to clipboard
enum VerticalAlignment
Controls the vertical alignment of the ViewRenderable relative to the it is attached to.
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Constructs a ViewRenderable
Link copied to clipboard
Link copied to clipboard
open fun createInstance(engine: Engine, assetLoader: AssetLoader, resourceLoader: ResourceLoader, transformProvider: TransformProvider): RenderableInstance
Link copied to clipboard
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
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
Returns the material bound to the first submesh.
Returns the material bound to the specified submesh.
Link copied to clipboard
Gets the ViewSizer that controls the size of this ViewRenderable in the .
Link copied to clipboard
Returns the number of submeshes that this renderable has.
Link copied to clipboard
Returns the name associated with the specified submesh.
Link copied to clipboard
Creates a new instance of this ViewRenderable.
Link copied to clipboard
Link copied to clipboard
Set the CollisionShape used for collision detection with this Renderable.
Link copied to clipboard
Sets the material bound to the first submesh.
Sets the material bound to the specified submesh.
Link copied to clipboard
Sets the ViewSizer that controls the size of this ViewRenderable in the .
Link copied to clipboard