void PlaneOnBoundaryChanged(ARPlaneBoundaryChangedEventArgs obj) { m_Animator.SetBool(k_FadeOffAnim, false); m_Animator.SetBool(k_FadeOnAnim, true); m_UpdatingPlane = true; m_ShowTime = k_TimeOut; }
private void X_BoundaryUpdate(ARPlaneBoundaryChangedEventArgs eventArgs) { if (GameManager.Instance.CurrentMenu == GameManager.MenuMode.Spawn) { X_GenerateBoundaryUVs(_planeMeshVisualizer.mesh); } }
private void BoundaryChanged(ARPlaneBoundaryChangedEventArgs obj) { if (areaText != null) { areaText.text = string.Format("{0} m2", CalculatePlaneArea(arPlane).ToString()); } }
void OnBoundaryChanged(ARPlaneBoundaryChangedEventArgs eventArgs) { var boundary = arPlane.boundary; Debug.LogWarning("Charlie OnBoundaryChanged: " + magnitude + "; " + arPlane.size.magnitude); magnitude = arPlane.size.magnitude; SpawnCharacters(); }
// 平面の境界が変化した際に呼び出されるよう登録するコールバック void PlaneOnBoundaryChanged(ARPlaneBoundaryChangedEventArgs obj) { // フェードオンのアニメーションを行い検出平面を表示する m_Animator.SetBool(k_FadeOffAnim, false); m_Animator.SetBool(k_FadeOnAnim, true); m_UpdatingPlane = true; // 検出平面表示を消すまでの残り時間をセットする m_ShowTime = k_TimeOut; }
void OnCurrentPlaneBoundaryChanged(ARPlaneBoundaryChangedEventArgs args) { if (m_currentARPlane != null) { m_wrldMapMask.parent.position = m_currentARPlane.transform.position; m_wrldMapMask.rotation = m_currentARPlane.transform.rotation; m_wrldMapMask.localScale = new Vector3(m_currentARPlane.size.x, 1f, m_currentARPlane.size.y); m_streamingCameraHandler.UpdateStreamingCamera(); } }
private void OnBoundaryChanged(ARPlaneBoundaryChangedEventArgs eventArgs) { // Unsuported plane alignment if (plane.alignment != UnityEngine.XR.ARSubsystems.PlaneAlignment.HorizontalUp) { return; } GenerateWallMesh(plane.boundary); }
unsafe void OnBoundaryChanged(ARPlaneBoundaryChangedEventArgs eventArgs) { var boundary = this.m_Plane.boundary; #if ENABLE_UNITY_COLLECTIONS_CHECKS try { NativeArray <Vector2> newBoundary = new NativeArray <Vector2>(boundary.Length, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); Vector2 *boundaryPointer = (Vector2 *)NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(boundary); UnsafeUtility.MemCpy(NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(newBoundary), boundaryPointer, boundary.Length * (long)UnsafeUtility.SizeOf <Vector2>()); boundary = newBoundary; #endif if (!ARPlaneMeshGenerators.GenerateMesh(this.mesh, new Pose(this.transform.localPosition, this.transform.localRotation), boundary)) { return; } var lineRenderer = this.GetComponent <LineRenderer>(); if (lineRenderer != null) { lineRenderer.positionCount = boundary.Length; for (int i = 0; i < boundary.Length; ++i) { var point2 = boundary[i]; lineRenderer.SetPosition(i, new Vector3(point2.x, 0, point2.y)); } } var meshFilter = this.GetComponent <MeshFilter>(); if (meshFilter != null) { meshFilter.sharedMesh = this.mesh; } var meshCollider = this.GetComponent <MeshCollider>(); if (meshCollider != null) { meshCollider.sharedMesh = this.mesh; } #if ENABLE_UNITY_COLLECTIONS_CHECKS } finally { boundary.Dispose(); } #endif }
void PlaneBoundaryChanged(ARPlaneBoundaryChangedEventArgs args) { //ARPlaneMeshGenerators var boundary = plane.boundary; var lineRenderer = GetComponent <LineRenderer>(); lineRenderer.positionCount = boundary.Length; for (int i = 0; i < boundary.Length; ++i) { var p = boundary[i]; var pos = new Vector3(p.x, 0, p.y); lineRenderer.SetPosition(i, new Vector3(p.x, 0, p.y)); } LogPlane(); //plane.vertexChangedThreshold // The largest value by which a plane's vertex may change before the mesh is regenerated. Units are in meters. //plane.pending // Pending means the trackable was added manually (usually via an AddTrackable-style method on its manager) but has not yet been reported as added. //plane.useGUILayout ???? what is this //Plane infinite_plane = plane.infinitePlane; //float distance_from_origin = infinite_plane.distance; //Plane flipped_copy = infinite_plane.flipped; //Vector3 plane_normal = infinite_plane.normal; //float hit_center; //bool ray_hit = infinite_plane.Raycast(new Ray(Vector3.zero,Vector3.up),out hit_center); //Vector3 dist3 = infinite_plane.ClosestPointOnPlane(Vector3.zero); //float dist = infinite_plane.GetDistanceToPoint(Vector3.zero); //Vector3 infinite_plane_center = plane.center; // any other way to get the center ? ARUtil.InvokePlaneBoundaryChange(index); }
void PlaneOnBoundaryChanged(ARPlaneBoundaryChangedEventArgs obj) { // Debug.Log("boundary changed"); debugText.text = "boundary changed"; }
void ARPlaneMeshVisualizer_meshUpdated(ARPlaneBoundaryChangedEventArgs planeMeshVisualizer) { GenerateBoundaryUVs(m_PlaneMeshVisualizer.mesh); }
void OnBoundaryChanged(ARPlaneBoundaryChangedEventArgs _) { OnBoundaryChanged(plane.boundary); }
void UpdateCube(ARPlaneBoundaryChangedEventArgs args) { sessionOrigin.MakeContentAppearAt(myCube.transform, myPlane.center, myCube.transform.rotation);//Repositions the cube whenever the plane is resized }
void onSinglePlaneUpdate(ARPlaneBoundaryChangedEventArgs args) { ARPlane updatedPlane = args.plane; }
// 平面の境界が変化した際に呼び出されるよう登録するコールバック void ARPlane_boundaryUpdated(ARPlaneBoundaryChangedEventArgs eventArgs) { // テクスチャを貼るためのUV座標を再計算する GenerateBoundaryUVs(m_PlaneMeshVisualizer.mesh); }
private void ARPlane_BoundaryChanged(ARPlaneBoundaryChangedEventArgs obj) { areaText.text = CalculatePlaneArea(arPlane).ToString(); }
void ARPlane_boundaryUpdated(ARPlaneBoundaryChangedEventArgs eventArgs) { GenerateBoundaryUVs(m_PlaneMeshVisualizer.mesh); }
void PlaneOnBoundaryChanged(ARPlaneBoundaryChangedEventArgs obj) { m_Animator.SetTrigger(FADEOFF_ANIM); }