Added object distributuon calculationg
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user