public void InitHologram(HologramType contentType) { HologramType = contentType; m_ManipulationSettings = GetComponent <ManipulatorSettings>(); if (m_ManipulationSettings == null) { m_ManipulationSettings = ManipulatorSettings.DefaultSetting; } if (!m_IsInitialized && m_ManipulationSettings != null) { SaveChildrenAndRenderers(); InitBoundaries(); SetHologramFaces(); SetParentGameObjects(); InitControllers(); UpdateParentPosition(transform.TransformPoint(m_BoundaryBox.Center)); AdjustBoundarySize(); UpdateParentPosition(transform.TransformPoint(m_BoundaryBox.BottomCenter)); UpdateHologramControllers(false); PlaceMenu(); SetHologramState(HologramState.Inactive); RegisterHologramInActiveHologramList(); m_IsInitialized = true; } }
public BoundaryBox(Transform target, HologramType hologramType) { HologramType = hologramType; Target = target; var collider = Target.EnsureComponent <BoxCollider>(); Collider = collider; collider.isTrigger = true; EdgePointsPosition = new Vector3[8]; switch (HologramType) { case HologramType._2D: ControllerPointsPosition = new Vector3[4]; break; case HologramType._3D: ControllerPointsPosition = new Vector3[8]; break; default: ControllerPointsPosition = new Vector3[8]; break; } }
public HologramData(string id, HologramType type, Vector3 position, Quaternion rotation, Vector3 scale) { Id = id; Type = type; Position = position; Rotation = rotation; Scale = scale; Content = string.Empty; }
private bool IsToggle(HologramType type) { HologramTypeChoiceButton button = GetChoice(type); if (button == null) { return(false); } return(button.ToggleButton.IsToggled); }
private HologramTypeChoice GetChoice(HologramType type) { HologramTypeChoice choice = Choices.FirstOrDefault(v => v.MyType == type); if (choice == null) { Debug.LogError("Missing HologramTypeChoice"); return(null); } return(choice); }
private HologramTypeChoiceButton GetChoice(HologramType type) { HologramTypeChoiceButton button = Buttons.FirstOrDefault(v => v.MyType == type); if (button == null) { Debug.LogError("Missing HologramTypeChoiceButton"); return(null); } return(button); }
public void NextHolo() { if (hologramType == HologramType.sampling) { hologramType = HologramType.sitescreening; } else { hologramType = HologramType.sampling; } RefreshMenuData(); }
public static HologramTypeDto Map(HologramType htype) { return(new HologramTypeDto { CreatedBy = htype.CreatedBy, DateCreated = htype.DateCreated, DateUpdated = htype.DateUpdated, Description = htype.Description, HologramTypeId = htype.HologramTypeId, Name = htype.Name, UpdatedBy = htype.UpdatedBy }); }
private void SetOnlyOneToggle(HologramType type) { _refuseEvent = true; foreach (var button in Buttons) { if (button.MyType == type) { button.ToggleButton.IsToggled = true; } else { button.ToggleButton.IsToggled = false; } } _refuseEvent = false; }
internal void SetCurrentType(HologramType type) { _currentType = type; }
internal GameObject GetSpecificPrefab(HologramType type) { return(GetChoice(type)?.HologramPrefab); }
// OnEnable always start on sampling holo private void OnEnable() { hologramType = HologramType.sampling; RefreshMenuData(); }
private GameObject GetSpecificPrefab(HologramType type) { return(MyHologramTypeSwitch.GetSpecificPrefab(type)); }
internal GameObject CreateNewHologramFromBatch(HologramType type) { return(CreateNewHologram(GetSpecificPrefab(type))); }
private void SetChoice(HologramType type) { MyHologramTypeSwitch.SetCurrentType(type); MyUserInteractions.ChoiceChange(); SetOnlyOneToggle(type); }