From 00553b3f305d0e2217659993f237ff3da604ef85 Mon Sep 17 00:00:00 2001 From: yum Date: Tue, 17 Feb 2026 18:52:17 -0800 Subject: Fold: add plane to octahedron code --- Scripts/Fold/Editor/FoldPipelineBuilder.cs | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'Scripts/Fold/Editor/FoldPipelineBuilder.cs') diff --git a/Scripts/Fold/Editor/FoldPipelineBuilder.cs b/Scripts/Fold/Editor/FoldPipelineBuilder.cs index 2dc2291..731ceeb 100755 --- a/Scripts/Fold/Editor/FoldPipelineBuilder.cs +++ b/Scripts/Fold/Editor/FoldPipelineBuilder.cs @@ -60,6 +60,9 @@ public class FoldPipelineBuilder public const int HemiOctahedronToPlane = 10; public const int Scale = 11; public const int Translate = 12; + public const int PlaneToOctahedron = 13; + public const int OctahedronToPlane = 14; + public const int Rotate = 15; } FoldPipelineBuilder() { } @@ -133,6 +136,45 @@ public class FoldPipelineBuilder return this; } + public FoldPipelineBuilder PlaneToOctahedron(Vector3 p, Vector3 r, Vector3 s, float t) + { + slots.Add(new FoldSlot + { + opcode = Opcodes.PlaneToOctahedron, + vec0 = p, + vec1 = r, + vec2 = s, + float0 = t + }); + return this; + } + + public FoldPipelineBuilder OctahedronToPlane(Vector3 p, Vector3 r, Vector3 s, float t) + { + slots.Add(new FoldSlot + { + opcode = Opcodes.OctahedronToPlane, + vec0 = p, + vec1 = r, + vec2 = s, + float0 = t + }); + return this; + } + + public FoldPipelineBuilder Rotate(Vector3 center, Vector3 axis, float angle, float t) + { + slots.Add(new FoldSlot + { + opcode = Opcodes.Rotate, + vec0 = center, + vec1 = axis, + float0 = angle, + float1 = t + }); + return this; + } + public FoldPipelineBuilder HemiOctahedronToPlane(Vector3 p, Vector3 r, Vector3 s, float t) { slots.Add(new FoldSlot -- cgit v1.2.3