PlaneMesh

package
v0.0.0-...-c101f7d Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Class representing a planar PrimitiveMesh. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, change Orientation to FaceZ.

Note: When using a large textured PlaneMesh (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase SubdivideDepth and SubdivideWidth until you no longer notice UV jittering.

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
	AsPlaneMesh() 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]) AsMesh

func (self *Extension[T]) AsMesh() Mesh.Instance

func (*Extension[T]) AsObject

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

func (*Extension[T]) AsPlaneMesh

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

func (*Extension[T]) AsPrimitiveMesh

func (self *Extension[T]) AsPrimitiveMesh() PrimitiveMesh.Instance

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.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

type Instance [1]gdclass.PlaneMesh

Instance of the class with convieniently typed arguments and results.

var Nil Instance

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

func New

func New() Instance

func (Instance) AsMesh

func (self Instance) AsMesh() Mesh.Instance

func (Instance) AsObject

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

func (Instance) AsPlaneMesh

func (self Instance) AsPlaneMesh() Instance

func (Instance) AsPrimitiveMesh

func (self Instance) AsPrimitiveMesh() PrimitiveMesh.Instance

func (Instance) AsRefCounted

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

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) CenterOffset

func (self Instance) CenterOffset() Vector3.XYZ

Offset of the generated plane. Useful for particles.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) Orientation

func (self Instance) Orientation() Orientation

Direction that the PlaneMesh is facing.

func (Instance) SetCenterOffset

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

SetCenterOffset sets the property returned by [GetCenterOffset].

func (*Instance) SetObject

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

func (Instance) SetOrientation

func (self Instance) SetOrientation(value Orientation)

SetOrientation sets the property returned by [GetOrientation].

func (Instance) SetSize

func (self Instance) SetSize(value Vector2.XY)

SetSize sets the property returned by [GetSize].

func (Instance) SetSubdivideDepth

func (self Instance) SetSubdivideDepth(value int)

SetSubdivideDepth sets the property returned by [GetSubdivideDepth].

func (Instance) SetSubdivideWidth

func (self Instance) SetSubdivideWidth(value int)

SetSubdivideWidth sets the property returned by [GetSubdivideWidth].

func (Instance) Size

func (self Instance) Size() Vector2.XY

Size of the generated plane.

func (Instance) SubdivideDepth

func (self Instance) SubdivideDepth() int

Number of subdivision along the Z axis.

func (Instance) SubdivideWidth

func (self Instance) SubdivideWidth() int

Number of subdivision along the X axis.

func (Instance) Virtual

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

type Orientation

type Orientation int //gd:PlaneMesh.Orientation
const (
	// [PlaneMesh] will face the positive X-axis.
	//
	// [PlaneMesh]: https://pkg.go.dev/graphics.gd/classdb/PlaneMesh
	FaceX Orientation = 0
	// [PlaneMesh] will face the positive Y-axis. This matches the behavior of the [PlaneMesh] in Godot 3.x.
	//
	// [PlaneMesh]: https://pkg.go.dev/graphics.gd/classdb/PlaneMesh
	FaceY Orientation = 1
	// [PlaneMesh] will face the positive Z-axis. This matches the behavior of the QuadMesh in Godot 3.x.
	//
	// [PlaneMesh]: https://pkg.go.dev/graphics.gd/classdb/PlaneMesh
	FaceZ Orientation = 2
)

Jump to

Keyboard shortcuts

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