private void InvokeTapped(InteractionSource source, InteractionSourcePose sourcePose, Pose headPose, int tapCount) { var tappedEvent = TappedEvent; if (tappedEvent != null) { tappedEvent(source.m_SourceKind, tapCount, new Ray(headPose.position, headPose.rotation * Vector3.forward)); } var tapped = Tapped; if (tapped != null) { TappedEventArgs eventArgs; eventArgs.m_Source = source; eventArgs.m_SourcePose = sourcePose; eventArgs.m_HeadPose = headPose; eventArgs.m_TapCount = tapCount; tapped(eventArgs); } }
private void InvokeManipulationUpdated(InteractionSource source, InteractionSourcePose sourcePose, Pose headPose, Vector3 cumulativeDelta) { var manipulationUpdatedEvent = ManipulationUpdatedEvent; if (manipulationUpdatedEvent != null) { manipulationUpdatedEvent(source.m_SourceKind, cumulativeDelta, new Ray(headPose.position, headPose.rotation * Vector3.forward)); } var manipulationUpdated = ManipulationUpdated; if (manipulationUpdated != null) { ManipulationUpdatedEventArgs eventArgs; eventArgs.m_Source = source; eventArgs.m_SourcePose = sourcePose; eventArgs.m_HeadPose = headPose; eventArgs.m_CumulativeDelta = cumulativeDelta; manipulationUpdated(eventArgs); } }
private void InvokeNavigationUpdated(InteractionSource source, InteractionSourcePose sourcePose, Pose headPose, Vector3 normalizedOffset) { var navigationUpdatedEvent = NavigationUpdatedEvent; if (navigationUpdatedEvent != null) { navigationUpdatedEvent(source.m_SourceKind, normalizedOffset, new Ray(headPose.position, headPose.rotation * Vector3.forward)); } var navigationUpdated = NavigationUpdated; if (navigationUpdated != null) { NavigationUpdatedEventArgs eventArgs; eventArgs.m_Source = source; eventArgs.m_SourcePose = sourcePose; eventArgs.m_HeadPose = headPose; eventArgs.m_NormalizedOffset = normalizedOffset; navigationUpdated(eventArgs); } }