repeat

package
v0.42.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Circle

func Circle(times int, radius, revolutions float64) []trs.TRS

func CirclePoints

func CirclePoints(count int, radius float64) []vector3.Float64

func FibonacciSphere

func FibonacciSphere(samples int, radius float64) []trs.TRS

func FibonacciSpherePoints

func FibonacciSpherePoints(samples int, offsetRadius float64) []vector3.Float64

func FibonacciSpiral added in v0.22.1

func FibonacciSpiral(samples int, radius float64) []trs.TRS

func Mesh added in v0.18.0

func Mesh(mesh modeling.Mesh, transforms []trs.TRS) modeling.Mesh

func Polygon added in v0.26.0

func Polygon(times, sides int, radius float64) []trs.TRS

func RandomPointInSphere added in v0.36.0

func RandomPointInSphere(radius float64, rnd *rand.Rand) vector3.Float64

func RandomPointsInSphere added in v0.36.0

func RandomPointsInSphere(radius float64, count int, rnd *rand.Rand) []vector3.Float64

func Spline added in v0.18.0

func Spline(curve curves.Spline, inbetween int) []trs.TRS

func SplineExlusive added in v0.18.0

func SplineExlusive(curve curves.Spline, inbetween int) []trs.TRS

Like line, but we don't include meshes on the start and end points. Only the inbetween points

func TRS added in v0.22.1

func TRS(input, transforms []trs.TRS) ([]trs.TRS, error)

Types

type CircleNode added in v0.10.0

type CircleNode struct {
	Radius      nodes.Output[float64] `description:"Distance from the center to each point. Defaults to 0.5."`
	Revolutions nodes.Output[float64] `` /* 196-byte string literal not displayed */
	Times       nodes.Output[int]     `description:"How many copies to place evenly around the circle. Defaults to 1."`
}

func (CircleNode) Description added in v0.41.0

func (r CircleNode) Description() string

func (CircleNode) Out added in v0.10.0

func (r CircleNode) Out(out *nodes.StructOutput[[]trs.TRS])

type FibonacciSphereNode added in v0.22.1

type FibonacciSphereNode struct {
	Count  nodes.Output[int]     `description:"Number of points to place. Defaults to 10."`
	Radius nodes.Output[float64] `description:"Radius of the sphere the points sit on. Defaults to 1."`
}

func (FibonacciSphereNode) Description added in v0.41.0

func (fpnd FibonacciSphereNode) Description() string

func (FibonacciSphereNode) Out added in v0.32.0

func (fpnd FibonacciSphereNode) Out(out *nodes.StructOutput[[]trs.TRS])

type FibonacciSpiralNode added in v0.22.1

type FibonacciSpiralNode struct {
	Count  nodes.Output[int]     `description:"Number of points to place. Defaults to 10."`
	Radius nodes.Output[float64] `` /* 127-byte string literal not displayed */
}

func (FibonacciSpiralNode) Description added in v0.41.0

func (fpnd FibonacciSpiralNode) Description() string

func (FibonacciSpiralNode) Out added in v0.32.0

func (fpnd FibonacciSpiralNode) Out(out *nodes.StructOutput[[]trs.TRS])

type Grid added in v0.27.1

type Grid struct {
	Rows    int
	Columns int
	Width   float64
	Height  float64
}

func (Grid) TRS added in v0.27.1

func (g Grid) TRS() []trs.TRS

func (Grid) Vector2 added in v0.27.1

func (g Grid) Vector2() []vector2.Float64

func (Grid) Vector3 added in v0.27.1

func (g Grid) Vector3() []vector3.Float64

type GridNode added in v0.27.1

type GridNode struct {
	Rows    nodes.Output[int]     `description:"Number of rows (spread along Z). Defaults to 1, clamped to 0 minimum."`
	Columns nodes.Output[int]     `description:"Number of columns (spread along X). Defaults to 1, clamped to 0 minimum."`
	Width   nodes.Output[float64] `` /* 159-byte string literal not displayed */
	Height  nodes.Output[float64] `` /* 153-byte string literal not displayed */
}

func (GridNode) Description added in v0.41.0

func (g GridNode) Description() string

func (GridNode) TRS added in v0.27.1

func (g GridNode) TRS(out *nodes.StructOutput[[]trs.TRS])

func (GridNode) TRSDescription added in v0.41.0

func (g GridNode) TRSDescription() string

func (GridNode) Vector2 added in v0.27.1

func (g GridNode) Vector2(out *nodes.StructOutput[[]vector2.Float64])

func (GridNode) Vector3 added in v0.27.1

func (g GridNode) Vector3(out *nodes.StructOutput[[]vector3.Float64])

type Line added in v0.9.0

type Line struct {
	// Start of the line
	Start vector3.Float64

	// End of the line
	End vector3.Float64

	// How many TRS matrices to produce
	Samples int

	// If true, the line is split into Samples equal segments and a TRS is
	// placed at the center of each, so the start and end points are excluded
	Exclusive bool
}

func (Line) TRS added in v0.22.2

func (l Line) TRS() []trs.TRS

type LineBySpacing added in v0.42.0

type LineBySpacing struct {
	Line       geometry.Line3D
	MaxSpacing float64
}

func (LineBySpacing) TRS added in v0.42.0

func (l LineBySpacing) TRS() []trs.TRS

type LineBySpacingNode added in v0.42.0

type LineBySpacingNode struct {
	Line       nodes.LiftedPort[geometry.Line3D]
	MaxSpacing nodes.LiftedPort[float64] `description:"Largest allowed gap between neighbouring transforms. Gaps are equal and never larger."`
}

func (LineBySpacingNode) Description added in v0.42.0

func (LineBySpacingNode) Description() string

func (LineBySpacingNode) Out added in v0.42.0

func (r LineBySpacingNode) Out(out *nodes.Lifted[[]trs.TRS])

type LineNode added in v0.18.0

type LineNode struct {
	Start     nodes.LiftedPort[vector3.Float64] `description:"Position of the first sample. Defaults to the origin."`
	End       nodes.LiftedPort[vector3.Float64] `description:"Position of the last sample. Defaults to the origin."`
	Samples   nodes.LiftedPort[int]             `` /* 214-byte string literal not displayed */
	Exclusive nodes.LiftedPort[bool]            `` /* 158-byte string literal not displayed */
}

func (LineNode) Description added in v0.41.0

func (r LineNode) Description() string

func (LineNode) Out added in v0.32.0

func (r LineNode) Out(out *nodes.Lifted[[]trs.TRS])

type MeshNode added in v0.18.0

type MeshNode struct {
	Mesh       nodes.Output[modeling.Mesh] `description:"The mesh to duplicate. Empty mesh if unconnected."`
	Transforms nodes.Output[[]trs.TRS]     `description:"One transform per copy to place. If unconnected, Mesh passes through unchanged (one copy, untransformed)."`
}

func (MeshNode) Description added in v0.32.0

func (rnd MeshNode) Description() string

func (MeshNode) Out added in v0.32.0

func (rnd MeshNode) Out(out *nodes.StructOutput[modeling.Mesh])

type MeshSurface added in v0.27.0

type MeshSurface struct {
	Mesh      modeling.Mesh
	Attribute string
	Samples   int
	Seed      int
}

func (MeshSurface) TRS added in v0.27.0

func (ms MeshSurface) TRS() []trs.TRS

type RandomPointsInSphereNode added in v0.36.0

type RandomPointsInSphereNode struct {
	Radius nodes.Output[float64] `description:"Radius of the sphere containing the random points. Defaults to 0.5."`
	Points nodes.Output[int]     `description:"number of points to generate. Defaults to 1. Must not be negative."`
	Seed   nodes.Output[int]     `description:"The same seed always produces the same scatter. Defaults to 0."`
}

func (RandomPointsInSphereNode) Description added in v0.41.0

func (g RandomPointsInSphereNode) Description() string

func (RandomPointsInSphereNode) TRS added in v0.36.0

func (RandomPointsInSphereNode) Vector3 added in v0.36.0

type SampleMeshSurfaceNode added in v0.27.1

type SampleMeshSurfaceNode struct {
	Mesh      nodes.Output[modeling.Mesh] `description:"The mesh to scatter points across. Must have triangle topology."`
	Attribute nodes.Output[string]        `` /* 126-byte string literal not displayed */
	Samples   nodes.Output[int]           `` /* 163-byte string literal not displayed */
	Seed      nodes.Output[int]           `description:"The same seed always produces the same scatter. Defaults to 0."`
}

func (SampleMeshSurfaceNode) Description added in v0.41.0

func (rnd SampleMeshSurfaceNode) Description() string

func (SampleMeshSurfaceNode) Out added in v0.27.1

func (rnd SampleMeshSurfaceNode) Out(out *nodes.StructOutput[[]trs.TRS])

type SplineNode added in v0.18.0

type SplineNode struct {
	Curve nodes.Output[curves.Spline] `description:"The curve to sample along."`
	Times nodes.Output[int]           `description:"How many transforms to produce along the curve's length, including its start and end points."`
}

func (SplineNode) Description added in v0.32.0

func (rnd SplineNode) Description() string

func (SplineNode) Out added in v0.32.0

func (r SplineNode) Out(out *nodes.StructOutput[[]trs.TRS])

type TRSNode added in v0.22.1

type TRSNode struct {
	Input      nodes.Output[[]trs.TRS] `description:"The parent transforms. Empty output if unconnected."`
	Transforms nodes.Output[[]trs.TRS] `` /* 172-byte string literal not displayed */
}

func (TRSNode) Description added in v0.32.0

func (rnd TRSNode) Description() string

func (TRSNode) Out added in v0.32.0

func (rnd TRSNode) Out(out *nodes.StructOutput[[]trs.TRS])

type Transformation added in v0.22.2

type Transformation struct {
	Initial        trs.TRS
	Transformation trs.TRS
	Samples        int
}

func (Transformation) TRS added in v0.22.2

func (t Transformation) TRS() ([]trs.TRS, error)

type TransformationNode added in v0.22.2

type TransformationNode struct {
	Initial        nodes.Output[trs.TRS] `description:"Starting transform (the first copy's placement before any repetition is applied). Defaults to identity."`
	Transformation nodes.Output[trs.TRS] `` /* 225-byte string literal not displayed */
	Samples        nodes.Output[int]     `description:"How many copies to produce. Defaults to 0."`
}

func (TransformationNode) Description added in v0.41.0

func (rnd TransformationNode) Description() string

func (TransformationNode) Out added in v0.32.0

func (rnd TransformationNode) Out(out *nodes.StructOutput[[]trs.TRS])

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL