Documentation
¶
Index ¶
- func QuadSphere(radius float64, cube Cube, welded bool, dewarpUVs bool) modeling.Mesh
- func SinArcLength(t1, t2 float64) float64
- func UVSphere(radius float64, rows, columns int) modeling.Mesh
- func UVSphereUnwelded(radius float64, rows, columns int) modeling.Mesh
- func UnitCube() modeling.Mesh
- type Circle
- type CircleNode
- type CircleUVs
- type CircleUVsNode
- type Cone
- type ConeNode
- type Cube
- type CubeNode
- type CubeUVs
- type CubeUVsNode
- type Cylinder
- type CylinderNode
- type CylinderUVs
- type CylinderUVsNode
- type EuclideanUVSpace
- type Hemisphere
- type HemisphereNode
- type PolarUVSpace
- type Quad
- type QuadNode
- type QuadSphereNode
- type QuadSphereWarpUV
- type StanfordBunny
- type StripUVs
- func (suv StripUVs) At(time float64) vector2.Float64
- func (suv StripUVs) AtXY(p vector2.Float64) vector2.Float64
- func (suv StripUVs) AtXYs(xys []vector2.Float64) []vector2.Float64
- func (suv StripUVs) Dir() vector2.Float64
- func (suv StripUVs) EndLeft() vector2.Float64
- func (suv StripUVs) EndRight() vector2.Float64
- func (suv StripUVs) LeftToRight() vector2.Float64
- func (suv StripUVs) StartLeft() vector2.Float64
- func (suv StripUVs) StartRight() vector2.Float64
- type StripUVsNode
- type Torus
- type TorusNode
- type TorusUVNode
- type TorusUVs
- type TruncatedCone
- type UvSphereNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QuadSphere ¶ added in v0.35.0
func SinArcLength ¶ added in v0.35.0
SinArcLength computes the arc length of y = sin(x) between x = t1 and x = t2 using numerical integration.
func UVSphereUnwelded ¶ added in v0.9.0
Types ¶
type CircleNode ¶ added in v0.21.1
type CircleNode struct {
Radius nodes.Output[float64]
Sides nodes.Output[int]
UVs nodes.Output[CircleUVs]
}
func (CircleNode) Out ¶ added in v0.32.0
func (c CircleNode) Out(out *nodes.StructOutput[modeling.Mesh])
type CircleUVsNode ¶ added in v0.21.1
func (CircleUVsNode) Out ¶ added in v0.32.0
func (c CircleUVsNode) Out(out *nodes.StructOutput[CircleUVs])
type ConeNode ¶ added in v0.21.2
type Cube ¶
func (Cube) UnweldedQuads ¶ added in v0.9.0
Builds a cube
The Cube Indices:
3 ------- 7 / | / |
2 | 6 | | 1 | 5 | / | / 0 ------ 4
type CubeNode ¶ added in v0.18.0
type CubeUVs ¶ added in v0.9.0
type CubeUVs struct {
Top EuclideanUVSpace
Bottom EuclideanUVSpace
Left EuclideanUVSpace
Right EuclideanUVSpace
Front EuclideanUVSpace
Back EuclideanUVSpace
}
func DefaultCubeUVs ¶ added in v0.9.0
func DefaultCubeUVs() *CubeUVs
type CubeUVsNode ¶ added in v0.24.0
type CubeUVsNode struct {
Top nodes.Output[StripUVs]
Bottom nodes.Output[StripUVs]
Left nodes.Output[StripUVs]
Right nodes.Output[StripUVs]
Front nodes.Output[StripUVs]
Back nodes.Output[StripUVs]
}
func (CubeUVsNode) Uv ¶ added in v0.32.0
func (cnd CubeUVsNode) Uv(out *nodes.StructOutput[CubeUVs])
type Cylinder ¶
type Cylinder struct {
Sides int
Height float64
Radius float64
NoTop, NoBottom bool // Optionally turn off generation of top and/or bottom and turn the cylinder into pipe
UVs *CylinderUVs
}
type CylinderNode ¶ added in v0.17.0
type CylinderNode struct {
Sides nodes.Output[int]
Height nodes.Output[float64]
Radius nodes.Output[float64]
Radius2 nodes.Output[float64]
Top nodes.Output[bool]
Bottom nodes.Output[bool]
UVs nodes.Output[CylinderUVs]
}
func (CylinderNode) Out ¶ added in v0.32.0
func (hnd CylinderNode) Out(out *nodes.StructOutput[modeling.Mesh])
type CylinderUVs ¶ added in v0.9.0
type CylinderUVsNode ¶ added in v0.36.0
type CylinderUVsNode struct {
Top nodes.Output[CircleUVs]
Bottom nodes.Output[CircleUVs]
Side nodes.Output[StripUVs]
}
func (CylinderUVsNode) Out ¶ added in v0.36.0
func (n CylinderUVsNode) Out(out *nodes.StructOutput[CylinderUVs])
type EuclideanUVSpace ¶ added in v0.35.0
type Hemisphere ¶ added in v0.17.0
type HemisphereNode ¶ added in v0.17.0
type HemisphereNode struct {
Rows nodes.Output[int]
Columns nodes.Output[int]
Radius nodes.Output[float64]
Height nodes.Output[float64]
Capped nodes.Output[bool]
}
func (HemisphereNode) Out ¶ added in v0.32.0
func (hnd HemisphereNode) Out(out *nodes.StructOutput[modeling.Mesh])
type PolarUVSpace ¶ added in v0.35.0
type Quad ¶ added in v0.9.0
type Quad struct {
Width float64
Depth float64
Columns int
Rows int
UVs EuclideanUVSpace
}
type QuadNode ¶ added in v0.21.1
type QuadSphereNode ¶ added in v0.35.0
type QuadSphereNode struct {
Radius nodes.Output[float64]
Weld nodes.Output[bool]
DewarpUVs nodes.Output[bool]
Resolution nodes.Output[int]
UVs nodes.Output[CubeUVs]
}
func (QuadSphereNode) Out ¶ added in v0.35.0
func (c QuadSphereNode) Out(out *nodes.StructOutput[modeling.Mesh])
type QuadSphereWarpUV ¶ added in v0.35.0
type QuadSphereWarpUV struct {
// contains filtered or unexported fields
}
type StanfordBunny ¶ added in v0.32.1
type StanfordBunny struct {
}
func (StanfordBunny) Bunny ¶ added in v0.32.1
func (c StanfordBunny) Bunny(out *nodes.StructOutput[modeling.Mesh])
type StripUVs ¶ added in v0.9.0
func (StripUVs) AtXY ¶ added in v0.26.0
This is slow, shouldn't really use it if you're gonna be calling it a bunch
func (StripUVs) LeftToRight ¶ added in v0.17.0
func (StripUVs) StartRight ¶ added in v0.9.0
type StripUVsNode ¶ added in v0.17.0
type StripUVsNode struct {
Width nodes.Output[float64]
Start nodes.Output[vector2.Float64]
End nodes.Output[vector2.Float64]
}
func (StripUVsNode) Out ¶ added in v0.32.0
func (sund StripUVsNode) Out(out *nodes.StructOutput[StripUVs])
type Torus ¶ added in v0.33.0
type TorusNode ¶ added in v0.33.0
type TorusUVNode ¶ added in v0.33.0
type TorusUVNode struct {
MajorOffset nodes.Output[float64]
MinorOffset nodes.Output[float64]
Strip nodes.Output[StripUVs]
}
func (TorusUVNode) Out ¶ added in v0.33.0
func (c TorusUVNode) Out(out *nodes.StructOutput[TorusUVs])
type TorusUVs ¶ added in v0.33.0
type TorusUVs struct {
MajorOffset float64
MinorOffset float64
Strip EuclideanUVSpace
}
type TruncatedCone ¶ added in v0.36.0
type TruncatedCone struct {
Sides int
Height float64
TopRadius float64
BottomRadius float64
NoTop, NoBottom bool // Optionally turn off generation of top and/or bottom and turn the cylinder into pipe
UVs *CylinderUVs
}
func (TruncatedCone) ToMesh ¶ added in v0.36.0
func (c TruncatedCone) ToMesh() modeling.Mesh
type UvSphereNode ¶ added in v0.21.1
type UvSphereNode struct {
Radius nodes.Output[float64]
Rows nodes.Output[int]
Columns nodes.Output[int]
Weld nodes.Output[bool]
}
func (UvSphereNode) Description ¶ added in v0.32.0
func (c UvSphereNode) Description() string
func (UvSphereNode) Out ¶ added in v0.32.0
func (c UvSphereNode) Out(out *nodes.StructOutput[modeling.Mesh])
Click to show internal directories.
Click to hide internal directories.