Added object distributuon calculationg

This commit is contained in:
Misaki
2024-09-22 00:11:03 +09:00
parent 77d16fbffa
commit df0194ff9c
22 changed files with 375 additions and 100 deletions

View File

@@ -6,29 +6,13 @@ namespace Misaki.ArtTool
{
public abstract class FieldBase : MonoBehaviour
{
public RemappingSetting remappingSetting = new();
public EventHandler propertyChanged;
public virtual void Initialize()
{
}
public abstract float Operate(float3 position);
protected float Remapping(float weight)
{
if (!remappingSetting.enable)
{
return weight;
}
weight = math.saturate(weight / (1.0f - remappingSetting.innerOffset));
weight = math.lerp(remappingSetting.min, remappingSetting.max, weight);
weight = remappingSetting.invert ? 1.0f - weight : weight;
weight *= remappingSetting.strength;
return weight;
}
public abstract float Operate(float3 position, float weight);
private void Update()
{