PlaneRenderer

class PlaneRenderer(val engine: Engine, modelLoader: ModelLoader, materialLoader: MaterialLoader, scene: Scene)

Control rendering of ARCore planes.

Used to visualize detected planes and to control whether Renderables cast shadows on them.

Constructors

Link copied to clipboard
constructor(engine: Engine, modelLoader: ModelLoader, materialLoader: MaterialLoader, scene: Scene)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Use this enum to configure the Plane Rendering.

Properties

Link copied to clipboard
val engine: Engine
Link copied to clipboard
Link copied to clipboard

Control whether Renderables in the scene should cast shadows onto the planes

Link copied to clipboard

Control visibility of plane visualization.

Link copied to clipboard

Decrease if you don't need a very precise position update and want to reduce frame consumption. Increase for a more accurate positioning update.

Link copied to clipboard
val planeMaterial: Material

Default material instance used to render the planes.

Link copied to clipboard

Determines how tracked planes should be visualized on the screen. Two options are available, RENDER_ALL and RENDER_TOP_MOST. To see all tracked planes which are visible to the camera set the PlaneRendererMode to RENDER_ALL. This mode eats up quite a few resources and should only be set with care. To optimize the rendering set the mode to RENDER_TOP_MOST. In that case only the top most plane visible to a camera is rendered on the screen. Especially on weaker smartphone models this improves the overall performance.

Link copied to clipboard
val planeTexture: Texture
Link copied to clipboard
lateinit var viewSize: Size

Functions

Link copied to clipboard
fun destroy()
Link copied to clipboard
fun update(session: Session, frame: Frame)