chore: sync workspace state

This commit is contained in:
2026-03-29 01:36:53 +08:00
parent eb5de3e3d4
commit e5cb79f3ce
4935 changed files with 35593 additions and 360696 deletions

View File

@@ -0,0 +1,43 @@
// SPDX-License-Identifier: MIT
using GaussianSplatting.Runtime;
using UnityEditor.EditorTools;
using UnityEngine;
namespace GaussianSplatting.Editor
{
abstract class GaussianTool : EditorTool
{
protected GaussianSplatRenderer GetRenderer()
{
var gs = target as GaussianSplatRenderer;
if (!gs || !gs.HasValidAsset || !gs.HasValidRenderSetup)
return null;
return gs;
}
protected bool CanBeEdited()
{
var gs = GetRenderer();
if (!gs)
return false;
return gs.asset.chunkData == null; // need to be lossless / non-chunked for editing
}
protected bool HasSelection()
{
var gs = GetRenderer();
if (!gs)
return false;
return gs.editSelectedSplats > 0;
}
protected Vector3 GetSelectionCenterLocal()
{
var gs = GetRenderer();
if (!gs || gs.editSelectedSplats == 0)
return Vector3.zero;
return gs.editSelectedBounds.center;
}
}
}