summaryrefslogtreecommitdiffstats
path: root/Scripts/Fold/Editor/TubeToPlaneNode.cs
blob: 72f1b9dd7d643e2bedae15c083d7bad4eff74d49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using GraphProcessor;
using UnityEngine;

[System.Serializable, NodeMenuItem("Fold/TubeToPlane")]
public class TubeToPlaneNode : BaseFoldNode
{
  [Input(name = "p"), SerializeField, Tooltip("Origin point.")]
  public Vector4 p;

  [Input(name = "r"), SerializeField, Tooltip("Radial axis. Points along this line are not moved at all.")]
  public Vector4 r;

  [Input(name = "s"), SerializeField, Tooltip("Tangent axis. This line determines the axis around which the tube is unwrapped.")]
  public Vector4 s;

  [Input(name = "t"), SerializeField, Tooltip("Effect strength.")]
  public float t;

  public override string name => "Tube to Plane";

  public override FoldNodeSerialized Serialize()
  {
      return new FoldNodeSerialized { opcode = 1, float0 = t, vec0 = p, vec1 = r, vec2 = s };
  }
}