Editor/Geometry/ArchCurveNode.cs
using System;
using System.Collections.Generic;
using System.Linq;
using Sandbox;
namespace Sunless.Architecture;
public enum ArchTangentMode {
Auto,
Linear,
Mirrored,
Split
}
public sealed class ArchCurveNode {
public int Id { get; set; }
public Vector3 Position { get; set; }
public Vector3 Normal { get; set; }
public Vector3 In { get; set; }
public Vector3 Out { get; set; }
public ArchTangentMode Mode { get; set; } = ArchTangentMode.Auto;
public float Roll { get; set; }
public float WidthScale { get; set; } = 1f;
public ArchCurveNode Copy() {
return new ArchCurveNode {
Id = Id,
Position = Position,
Normal = Normal,
In = In,
Out = Out,
Mode = Mode,
Roll = Roll,
WidthScale = WidthScale
};
}
public static ArchCurveNode At( Vector3 position ) => new() { Position = position };
}