static void RenderGizmo(ReflectionProbe reflectionProbe, GizmoType gizmoType) { var e = GetEditorFor(reflectionProbe); if (e == null || !e.sceneViewEditing) { return; } var reflectionData = reflectionProbe.GetComponent <HDAdditionalReflectionData>(); var mat = reflectionProbe.transform.localToWorldMatrix; switch (EditMode.editMode) { // Influence editing case EditMode.SceneViewEditMode.ReflectionProbeBox: InfluenceVolumeUI.DrawGizmos(e.m_UIState.influenceVolume, reflectionData.influenceVolume, mat, InfluenceVolumeUI.HandleType.Base, InfluenceVolumeUI.HandleType.All); break; // Influence fade editing case EditMode.SceneViewEditMode.GridBox: InfluenceVolumeUI.DrawGizmos(e.m_UIState.influenceVolume, reflectionData.influenceVolume, mat, InfluenceVolumeUI.HandleType.Influence, InfluenceVolumeUI.HandleType.All); break; // Influence normal fade editing case EditMode.SceneViewEditMode.Collider: InfluenceVolumeUI.DrawGizmos(e.m_UIState.influenceVolume, reflectionData.influenceVolume, mat, InfluenceVolumeUI.HandleType.InfluenceNormal, InfluenceVolumeUI.HandleType.All); break; default: InfluenceVolumeUI.DrawGizmos(e.m_UIState.influenceVolume, reflectionData.influenceVolume, mat, InfluenceVolumeUI.HandleType.None, InfluenceVolumeUI.HandleType.Base); break; } }
static void DrawSelectedGizmo(ReflectionProbe reflectionProbe, GizmoType gizmoType) { var e = GetEditorFor(reflectionProbe); if (e == null) { return; } var reflectionData = reflectionProbe.GetComponent <HDAdditionalReflectionData>(); if (reflectionProbe == e.target) { //will draw every preview, thus no need to do it multiple times Gizmos_CapturePoint(e); } var mat = Matrix4x4.TRS(reflectionProbe.transform.position, reflectionProbe.transform.rotation, Vector3.one); InfluenceVolumeUI.DrawGizmos(e.m_UIState.influenceVolume, reflectionData.influenceVolume, mat, InfluenceVolumeUI.HandleType.None, InfluenceVolumeUI.HandleType.Base); if (!e.sceneViewEditing) { return; } DrawVerticalRay(reflectionProbe.transform); }
internal static void DrawGizmos(HDProbe d, GizmoType gizmoType) { HDProbeUI s; if (!HDProbeEditor.TryGetUIStateFor(d, out s)) { return; } var mat = Matrix4x4.TRS(d.transform.position, d.transform.rotation, Vector3.one); switch (EditMode.editMode) { case EditBaseShape: InfluenceVolumeUI.DrawGizmos( s.influenceVolume, d.influenceVolume, mat, InfluenceVolumeUI.HandleType.Base, InfluenceVolumeUI.HandleType.All); break; case EditInfluenceShape: InfluenceVolumeUI.DrawGizmos( s.influenceVolume, d.influenceVolume, mat, InfluenceVolumeUI.HandleType.Influence, InfluenceVolumeUI.HandleType.All); break; case EditInfluenceNormalShape: InfluenceVolumeUI.DrawGizmos( s.influenceVolume, d.influenceVolume, mat, InfluenceVolumeUI.HandleType.InfluenceNormal, InfluenceVolumeUI.HandleType.All); break; default: { var showedHandles = s.influenceVolume.showInfluenceHandles ? InfluenceVolumeUI.HandleType.All : InfluenceVolumeUI.HandleType.Base | InfluenceVolumeUI.HandleType.Influence; InfluenceVolumeUI.DrawGizmos( s.influenceVolume, d.influenceVolume, mat, InfluenceVolumeUI.HandleType.None, showedHandles); break; } } if (d.proxyVolume != null) { ReflectionProxyVolumeComponentUI.DrawGizmos_EditNone(d.proxyVolume); } }
static void DrawSelectedGizmo(PlanarReflectionProbe probe, GizmoType gizmoType) { var e = (PlanarReflectionProbeEditor)GetEditorFor(probe); if (e == null) { return; } var mat = Matrix4x4.TRS(probe.transform.position, probe.transform.rotation, Vector3.one); InfluenceVolumeUI.DrawGizmos( probe.influenceVolume, mat, InfluenceVolumeUI.HandleType.None, InfluenceVolumeUI.HandleType.Base | InfluenceVolumeUI.HandleType.Influence ); DrawCapturePositionGizmo(probe); }
static void DrawSelectedGizmo(ReflectionProbe reflectionProbe, GizmoType gizmoType) { var e = (HDReflectionProbeEditor)GetEditorFor(reflectionProbe); if (e == null) { return; } var mat = Matrix4x4.TRS(reflectionProbe.transform.position, reflectionProbe.transform.rotation, Vector3.one); var hdprobe = reflectionProbe.GetComponent <HDAdditionalReflectionData>(); InfluenceVolumeUI.DrawGizmos( hdprobe.influenceVolume, mat, InfluenceVolumeUI.HandleType.None, InfluenceVolumeUI.HandleType.Base | InfluenceVolumeUI.HandleType.Influence ); Gizmos_CapturePoint(reflectionProbe); }
public static void DrawGizmos(PlanarReflectionProbe d, GizmoType gizmoType) { PlanarReflectionProbeUI s; if (!PlanarReflectionProbeEditor.TryGetUIStateFor(d, out s)) { return; } var mat = d.transform.localToWorldMatrix; switch (EditMode.editMode) { case EditBaseShape: InfluenceVolumeUI.DrawGizmos( s.influenceVolume, d.influenceVolume, mat, InfluenceVolumeUI.HandleType.Base, InfluenceVolumeUI.HandleType.All); break; case EditInfluenceShape: InfluenceVolumeUI.DrawGizmos( s.influenceVolume, d.influenceVolume, mat, InfluenceVolumeUI.HandleType.Influence, InfluenceVolumeUI.HandleType.All); break; case EditInfluenceNormalShape: InfluenceVolumeUI.DrawGizmos( s.influenceVolume, d.influenceVolume, mat, InfluenceVolumeUI.HandleType.InfluenceNormal, InfluenceVolumeUI.HandleType.All); break; default: { var showedHandles = s.influenceVolume.showInfluenceHandles ? InfluenceVolumeUI.HandleType.All : InfluenceVolumeUI.HandleType.Base; InfluenceVolumeUI.DrawGizmos( s.influenceVolume, d.influenceVolume, mat, InfluenceVolumeUI.HandleType.None, showedHandles); break; } } if (d.proxyVolumeReference != null) { ReflectionProxyVolumeComponentUI.DrawGizmos_EditNone(s.reflectionProxyVolume, d.proxyVolumeReference); } var showFrustrum = s.showCaptureHandles || EditMode.editMode == EditCenter; var showCaptureMirror = d.useMirrorPlane || EditMode.editMode == EditMirrorPosition || EditMode.editMode == EditMirrorRotation; if (showFrustrum) { DrawGizmos_CaptureFrustrum(s, d); } if (showCaptureMirror) { DrawGizmos_CaptureMirror(s, d); } }