Click or drag to resize

ARMeshFromPlane_Example Class

A demo showcasing how to use the SendARPlaneAsMesh functionality with AR Plane surface detection to create mesh surfaces or platforms of the same vertices. This demo allows AR users to tap on scanned AR Planes to instantiate a mesh of the same vertices, position, and rotation. Users can toggle the visibility of AR Planes for visual clarity. Video Example: https://drive.google.com/file/d/1znVxR65LzHuOXVHKnzwtykXlUxd1cwqT/view?usp=sharing
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          SimpleDemosARMeshFromPlane_Example

Namespace:  SimpleDemos
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public class ARMeshFromPlane_Example : MonoBehaviour

The ARMeshFromPlane_Example type exposes the following members.

Constructors
  NameDescription
Public methodARMeshFromPlane_Example
Initializes a new instance of the ARMeshFromPlane_Example class
Top
Methods
  NameDescription
Private methodStatic memberSpawnPlatform
Sends the vertices of the AR Plane to the new mesh once created
Private methodStatic memberSpawnWorldOrigin
Spawns the world origin cloud anchor after the world origin object visualizer has been created (blue cube)
Private methodStart
Called on start up - creates the world origin at the origin and adds a listener for the AR Planes Toggle. For simplicity, this tutorial creates the origin at the exact location the AR user starts at. For a better representation of accurate world origin creation, check out the ARWorldOrigin Example.
Private methodUpdate
Update function - gets touch and creates and sends meshes from AR Planes
Top
Fields
  NameDescription
Private fieldStatic memberm_ARPlaneVertices
Vector3 array of the currently selected mesh vertices
Public fieldm_DisplayInformation
Text that displays scene information to the user
Public fieldm_ShowARPlanesToggle
Toggle that sets if AR Planes should be shown
Private fieldm_TouchPosition
Vector2 position of last touch
Top
See Also