Noise

package
v0.0.0-...-7325ca5 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package Noise provides methods for working with Noise object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsNoise() Instance
}

type Instance

type Instance [1]gdclass.Noise

This class defines the interface for noise generation libraries to inherit from. A default [method get_seamless_image] implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from the [method get_image] method, reverses the quadrants of the image, then uses the strips of extra width to blend over the seams. Inheriting noise classes can optionally override this function to provide a more optimal algorithm.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsNoise

func (self Instance) AsNoise() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) GetImage

func (self Instance) GetImage(width int, height int) [1]gdclass.Image

Returns an [Image] containing 2D noise values. [b]Note:[/b] With [param normalize] set to [code]false[/code], the default implementation expects the noise generator to return values in the range [code]-1.0[/code] to [code]1.0[/code].

func (Instance) GetImage3d

func (self Instance) GetImage3d(width int, height int, depth int) [][1]gdclass.Image

Returns an [Array] of [Image]s containing 3D noise values for use with [method ImageTexture3D.create]. [b]Note:[/b] With [param normalize] set to [code]false[/code], the default implementation expects the noise generator to return values in the range [code]-1.0[/code] to [code]1.0[/code].

func (Instance) GetNoise1d

func (self Instance) GetNoise1d(x Float.X) Float.X

Returns the 1D noise value at the given (x) coordinate.

func (Instance) GetNoise2d

func (self Instance) GetNoise2d(x Float.X, y Float.X) Float.X

Returns the 2D noise value at the given position.

func (Instance) GetNoise2dv

func (self Instance) GetNoise2dv(v Vector2.XY) Float.X

Returns the 2D noise value at the given position.

func (Instance) GetNoise3d

func (self Instance) GetNoise3d(x Float.X, y Float.X, z Float.X) Float.X

Returns the 3D noise value at the given position.

func (Instance) GetNoise3dv

func (self Instance) GetNoise3dv(v Vector3.XYZ) Float.X

Returns the 3D noise value at the given position.

func (Instance) GetSeamlessImage

func (self Instance) GetSeamlessImage(width int, height int) [1]gdclass.Image

Returns an [Image] containing seamless 2D noise values. [b]Note:[/b] With [param normalize] set to [code]false[/code], the default implementation expects the noise generator to return values in the range [code]-1.0[/code] to [code]1.0[/code].

func (Instance) GetSeamlessImage3d

func (self Instance) GetSeamlessImage3d(width int, height int, depth int) [][1]gdclass.Image

Returns an [Array] of [Image]s containing seamless 3D noise values for use with [method ImageTexture3D.create]. [b]Note:[/b] With [param normalize] set to [code]false[/code], the default implementation expects the noise generator to return values in the range [code]-1.0[/code] to [code]1.0[/code].

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

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