修改水
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
// Linter does not support mixing inheritdoc + defining own parameters.
|
||||
#pragma warning disable CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do)
|
||||
|
||||
namespace WaveHarmonic.Crest
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for an object that returns water surface displacement and height.
|
||||
/// </summary>
|
||||
public interface IFlowProvider : IQueryProvider
|
||||
{
|
||||
internal static NoneProvider None { get; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gives a stationary water (no horizontal flow).
|
||||
/// </summary>
|
||||
internal sealed class NoneProvider : IFlowProvider
|
||||
{
|
||||
public int Query(int _0, float _1, Vector3[] _2, Vector3[] result)
|
||||
{
|
||||
if (result != null) System.Array.Clear(result, 0, result.Length);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Query water flow data (horizontal motion) at a set of points.
|
||||
/// </summary>
|
||||
/// <param name="results">Water surface flow velocities at the query positions.</param>
|
||||
/// <inheritdoc cref="IQueryProvider.Query(int, float, Vector3[], int)" />
|
||||
int Query(int hash, float minimumLength, Vector3[] points, Vector3[] results);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c710a5a446bea43bdbd39db4be198f98
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
namespace WaveHarmonic.Crest
|
||||
{
|
||||
/// <summary>
|
||||
/// Samples horizontal motion of water volume
|
||||
/// </summary>
|
||||
sealed class FlowQuery : QueryBase, IFlowProvider
|
||||
{
|
||||
public FlowQuery(WaterRenderer water) : base(water) { }
|
||||
protected override int Kernel => 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a646106f5d35b4abea362416da973f83
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user