GPUParticlesCollisionSDF3D

package
v0.0.0-...-546f9d4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package GPUParticlesCollisionSDF3D provides methods for working with GPUParticlesCollisionSDF3D 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
	AsGPUParticlesCollisionSDF3D() Instance
}

type Instance

A baked signed distance field 3D particle collision shape affecting [GPUParticles3D] nodes. Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than [GPUParticlesCollisionHeightField3D], but it requires a baking step. [b]Baking:[/b] The signed distance field texture can be baked by selecting the [GPUParticlesCollisionSDF3D] node in the editor, then clicking [b]Bake SDF[/b] at the top of the 3D viewport. Any [i]visible[/i] [MeshInstance3D]s within the [member size] will be taken into account for baking, regardless of their [member GeometryInstance3D.gi_mode]. [b]Note:[/b] Baking a [GPUParticlesCollisionSDF3D]'s [member texture] is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked [Texture3D]s into its [member texture] property in an exported project. [b]Note:[/b] [member ParticleProcessMaterial.collision_mode] must be [constant ParticleProcessMaterial.COLLISION_RIGID] or [constant ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work. [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D].

var Nil Instance

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

func New

func New() Instance

func (Instance) AsGPUParticlesCollision3D

func (self Instance) AsGPUParticlesCollision3D() GPUParticlesCollision3D.Instance

func (Instance) AsGPUParticlesCollisionSDF3D

func (self Instance) AsGPUParticlesCollisionSDF3D() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

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

func (Instance) AsVisualInstance3D

func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance

func (Instance) BakeMask

func (self Instance) BakeMask() int

func (Instance) GetBakeMaskValue

func (self Instance) GetBakeMaskValue(layer_number int) bool

Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [param layer_number] between 1 and 32.

func (Instance) Resolution

func (Instance) SetBakeMask

func (self Instance) SetBakeMask(value int)

func (Instance) SetBakeMaskValue

func (self Instance) SetBakeMaskValue(layer_number int, value bool)

Based on [param value], enables or disables the specified layer in the [member bake_mask], given a [param layer_number] between 1 and 32.

func (Instance) SetResolution

func (self Instance) SetResolution(value gdclass.GPUParticlesCollisionSDF3DResolution)

func (Instance) SetSize

func (self Instance) SetSize(value Vector3.XYZ)

func (Instance) SetTexture

func (self Instance) SetTexture(value [1]gdclass.Texture3D)

func (Instance) SetThickness

func (self Instance) SetThickness(value Float.X)

func (Instance) Size

func (self Instance) Size() Vector3.XYZ

func (Instance) Texture

func (self Instance) Texture() [1]gdclass.Texture3D

func (Instance) Thickness

func (self Instance) Thickness() Float.X

func (*Instance) UnsafePointer

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

func (Instance) Virtual

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

type Resolution

type Resolution = gdclass.GPUParticlesCollisionSDF3DResolution //gd:GPUParticlesCollisionSDF3D.Resolution
const (
	/*Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise.*/
	Resolution16 Resolution = 0
	/*Bake a 32×32×32 signed distance field.*/
	Resolution32 Resolution = 1
	/*Bake a 64×64×64 signed distance field.*/
	Resolution64 Resolution = 2
	/*Bake a 128×128×128 signed distance field.*/
	Resolution128 Resolution = 3
	/*Bake a 256×256×256 signed distance field.*/
	Resolution256 Resolution = 4
	/*Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise.*/
	Resolution512 Resolution = 5
	/*Represents the size of the [enum Resolution] enum.*/
	ResolutionMax Resolution = 6
)

Jump to

Keyboard shortcuts

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