예제 #1
0
 void Awake()
 {
     mappingManager    = GetComponentInChildren <SpatialMappingManager>();
     planesMaker       = GetComponentInChildren <SurfaceMeshesToPlanes>();
     verticesRemover   = GetComponentInChildren <RemoveSurfaceVertices>();
     horizontalObjects = new List <GameObject>();
     verticalObjects   = new List <GameObject>();
     otherObjects      = new List <GameObject>();
 }
    /// <summary>
    /// Removes triangles from the spatial mapping surfaces.
    /// </summary>
    private void RemoveVertices(IEnumerable <GameObject> boundingObjects)
    {
        RemoveSurfaceVertices removeVerts = RemoveSurfaceVertices.Instance;

        if (removeVerts != null && removeVerts.enabled)
        {
            removeVerts.RemoveSurfaceVerticesWithinBounds(boundingObjects);
        }
    }
    // Use this for initialization
    private void Start()
    {
        // Get Instance of SpatialMappingManager
        spatialMappingManager = SpatialMappingManager.Instance;

        surfaceMeshesToPlanes = SurfaceMeshesToPlanes.Instance;

        // Start to recognize gestures
        gestureRecognizer = new GestureRecognizer();
        gestureRecognizer.SetRecognizableGestures(GestureSettings.Tap);

        removeVerts = RemoveSurfaceVertices.Instance;
    }