浏览代码

Remove multiple gizmo display (used for test)

/main
RSlysz 7 年前
当前提交
29adc88e
共有 1 个文件被更改,包括 10 次插入46 次删除
  1. 56
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Handles.cs

56
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Handles.cs


{
case ShapeType.Box:
{
blendBox.center = sp.target.center - (probeBlendDistancePositive - probeBlendDistanceNegative) * 0.5f;
blendBox.size = sp.target.size - probeBlendDistancePositive - probeBlendDistanceNegative;
alternativeBlendBox.center = sp.target.center - (probeBlendDistancePositive - probeBlendDistanceNegative) * 0.5f;
alternativeBlendBox.size = sp.target.size - probeBlendDistancePositive - probeBlendDistanceNegative;

Handles.color = k_GizmoThemeColorExtent;
Handles.color = color;
if(s.useNewGizmo)
{
alternativeBlendBox.DrawHandle();
}
else
{
blendBox.DrawHandle();
}
alternativeBlendBox.DrawHandle();
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(sp.target, "Modified Reflection Probe Influence");

var influenceSize = sp.target.size;
var diff = 2 * ((s.useNewGizmo?alternativeBlendBox.center:blendBox.center) - center);
var sum = influenceSize - (s.useNewGizmo?alternativeBlendBox.size:blendBox.size);
var diff = 2 * (alternativeBlendBox.center - center);
var sum = influenceSize - (alternativeBlendBox.size);
var positive = (sum - diff) * 0.5f;
var negative = (sum + diff) * 0.5f;
var blendDistancePositive = Vector3.Max(Vector3.zero, Vector3.Min(positive, influenceSize));

{
case ShapeType.Box:
{
if (s.useNewGizmo)
{
s.alternativeBoxInfluenceHandle.center = sp.target.center;
s.alternativeBoxInfluenceHandle.size = sp.target.size;
}
else
{
s.boxInfluenceHandle.center = sp.target.center;
s.boxInfluenceHandle.size = sp.target.size;
}
s.alternativeBoxInfluenceHandle.center = sp.target.center;
s.alternativeBoxInfluenceHandle.size = sp.target.size;
Handles.color = k_GizmoThemeColorExtent;
if (s.useNewGizmo)
{
s.alternativeBoxInfluenceHandle.DrawHandle();
}
else
{
s.boxInfluenceHandle.DrawHandle();
}
s.alternativeBoxInfluenceHandle.DrawHandle();
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(sp.target, "Modified Reflection Probe AABB");

Vector3 size;
if (s.useNewGizmo)
{
center = s.alternativeBoxInfluenceHandle.center;
size = s.alternativeBoxInfluenceHandle.size;
}
else
{
center = s.boxInfluenceHandle.center;
size = s.boxInfluenceHandle.size;
}
center = s.alternativeBoxInfluenceHandle.center;
size = s.alternativeBoxInfluenceHandle.size;
HDReflectionProbeEditorUtility.ValidateAABB(sp.target, ref center, ref size);

{
case ShapeType.Box:
{
if(e != null && e.m_UIState.useNewGizmo)
if(e != null)
{
box.DrawHull(isEdit);
}

{
case ShapeType.Box:
{
if(e != null && e.m_UIState.useNewGizmo)
if(e != null)
{
e.m_UIState.alternativeBoxInfluenceHandle.DrawHull(isEdit);
}

正在加载...
取消
保存