private void MyMakePlanes() { SurfaceMeshesToPlanes meshToPlanes = SurfaceMeshesToPlanes.Instance; if (null != meshToPlanes && meshToPlanes.enabled) { meshToPlanes.MakePlanes(); } }
private void CreatePlanes() { SurfaceMeshesToPlanes surfaceToPlanes = SurfaceMeshesToPlanes.Instance; if (surfaceToPlanes != null && surfaceToPlanes.enabled) { surfaceToPlanes.MakePlanes(); } }
/// <summary> /// Creates planes from the spatial mapping surfaces. /// </summary> private void CreatePlanes() { // Generate planes based on the spatial map. SurfaceMeshesToPlanes surfaceToPlanes = SurfaceMeshesToPlanes.Instance; if (surfaceToPlanes != null && surfaceToPlanes.enabled) { surfaceToPlanes.MakePlanes(); } }
/// <summary> /// Creates planes from the spatial mapping surfaces. /// </summary> private void CreatePlanes() { // Generate planes based on the spatial map. SurfaceMeshesToPlanes surfaceToPlanes = SurfaceMeshesToPlanes.Instance; if (surfaceToPlanes != null && surfaceToPlanes.enabled) { surfaceToPlanes.MakePlanes(); } Debug.Log("CREATING PLANES COMPLETE"); }
/// <summary> /// Creates planes from the spatial mapping surfaces. /// </summary> private void CreatePlanes() { // Generate planes based on the spatial map. SurfaceMeshesToPlanes surfaceToPlanes = SurfaceMeshesToPlanes.Instance; Debug.Log("CreatePlanes : " + surfaceToPlanes.enabled); if (surfaceToPlanes != null && surfaceToPlanes.enabled) { Debug.Log("MakePlanes"); surfaceToPlanes.MakePlanes(); } }
// Update is called once per frame void Update() { /* wait initialization */ if (!initializer.Finished) { return; } if (!meshProcessed) { Debug.Log("plane making"); meshToPlanes.MakePlanes(); meshProcessed = true; } }
public void Create_Planes() { ReadText.Instance.Say("Select a module to load."); // Quit observer and complete planes spatialMappingManager.StopObserver(); #if UNITY_EDITOR #else surfaceMeshesToPlanes.drawPlanesMask = PlaneTypes.Unknown; #endif surfaceMeshesToPlanes.MakePlanes(); surfaceMeshesToPlanes.MakePlanesComplete += Remove_Verts; }
private void OnTapEvent(InteractionSourceKind source, int tap_count, Ray head_ray) { switch (m_state) { case State.Scanning: // Stop scanning and detect planes if (SpatialMappingManager.Instance.IsObserverRunning()) { SpatialMappingManager.Instance.StopObserver(); } SurfaceMeshesToPlanes planeDetector = SurfaceMeshesToPlanes.Instance; planeDetector.MakePlanesComplete += OnPlanesComplete; planeDetector.MakePlanes(); m_state = State.Playing; break; case State.Playing: RaycastHit hit; if (Physics.Raycast(Camera.main.transform.position, Camera.main.transform.forward, out hit)) { // If a wall, floor, or ceiling was hit, embed a bullet hole GameObject target = hit.collider.gameObject; Debug.Log("Hit: " + target.name); SurfacePlane plane = target.GetComponent <SurfacePlane>(); if (plane != null) { if (plane.PlaneType == PlaneTypes.Ceiling || plane.PlaneType == PlaneTypes.Floor || plane.PlaneType == PlaneTypes.Wall) { CreateBulletHole(hit.point, hit.normal, plane); } } } break; } }
public virtual void OnInputClicked(InputClickedEventData eventData) { mappingManager.StopObserver(); planesMaker.MakePlanes(); }