GPUParticlesCollisionHeightField3D

package
v0.0.0-...-a66c66c Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

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

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsGPUParticlesCollision3D

func (self *Extension[T]) AsGPUParticlesCollision3D() GPUParticlesCollision3D.Instance

func (*Extension[T]) AsGPUParticlesCollisionHeightField3D

func (self *Extension[T]) AsGPUParticlesCollisionHeightField3D() Instance

func (*Extension[T]) AsNode

func (self *Extension[T]) AsNode() Node.Instance

func (*Extension[T]) AsNode3D

func (self *Extension[T]) AsNode3D() Node3D.Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsVisualInstance3D

func (self *Extension[T]) AsVisualInstance3D() VisualInstance3D.Instance

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

A real-time heightmap-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than [GPUParticlesCollisionSDF3D], but it doesn't require a baking step. [GPUParticlesCollisionHeightField3D] can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes [GPUParticlesCollisionHeightField3D] a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, this class is limited since heightmaps cannot represent overhangs (e.g. indoors or caves). [b]Note:[/b] [member ParticleProcessMaterial.collision_mode] must be [code]true[/code] 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) AsGPUParticlesCollisionHeightField3D

func (self Instance) AsGPUParticlesCollisionHeightField3D() 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) FollowCameraEnabled

func (self Instance) FollowCameraEnabled() bool

func (Instance) GetHeightfieldMaskValue

func (self Instance) GetHeightfieldMaskValue(layer_number int) bool

Returns [code]true[/code] if the specified layer of the [member heightfield_mask] is enabled, given a [param layer_number] between [code]1[/code] and [code]20[/code], inclusive.

func (Instance) HeightfieldMask

func (self Instance) HeightfieldMask() int

func (Instance) ID

func (self Instance) ID() ID

func (Instance) Resolution

func (self Instance) Resolution() Resolution

func (Instance) SetFollowCameraEnabled

func (self Instance) SetFollowCameraEnabled(value bool)

func (Instance) SetHeightfieldMask

func (self Instance) SetHeightfieldMask(value int)

func (Instance) SetHeightfieldMaskValue

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

Based on [param value], enables or disables the specified layer in the [member heightfield_mask], given a [param layer_number] between [code]1[/code] and [code]20[/code], inclusive.

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetResolution

func (self Instance) SetResolution(value Resolution)

func (Instance) SetSize

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

func (Instance) SetUpdateMode

func (self Instance) SetUpdateMode(value UpdateMode)

func (Instance) Size

func (self Instance) Size() Vector3.XYZ

func (Instance) UpdateMode

func (self Instance) UpdateMode() UpdateMode

func (Instance) Virtual

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

type Resolution

type Resolution int //gd:GPUParticlesCollisionHeightField3D.Resolution
const (
	/*Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles.*/
	Resolution256 Resolution = 0
	/*Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles.*/
	Resolution512 Resolution = 1
	/*Generate a 1024×1024 heightmap. Intended for large scenes with distant particles.*/
	Resolution1024 Resolution = 2
	/*Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles.*/
	Resolution2048 Resolution = 3
	/*Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles.*/
	Resolution4096 Resolution = 4
	/*Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles.*/
	Resolution8192 Resolution = 5
	/*Represents the size of the [enum Resolution] enum.*/
	ResolutionMax Resolution = 6
)

type UpdateMode

type UpdateMode int //gd:GPUParticlesCollisionHeightField3D.UpdateMode
const (
	/*Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is [code]true[/code]. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction, or by calling [method RenderingServer.particles_collision_height_field_update].*/
	UpdateModeWhenMoved UpdateMode = 0
	/*Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay.*/
	UpdateModeAlways UpdateMode = 1
)

Jump to

Keyboard shortcuts

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