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 ¶
- type Advanced
- type Any
- type Extension
- func (self *Extension[T]) AsMesh() Mesh.Instance
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsPlaneMesh() Instance
- func (self *Extension[T]) AsPrimitiveMesh() PrimitiveMesh.Instance
- func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
- func (self *Extension[T]) AsResource() Resource.Instance
- type ID
- type Instance
- func (self Instance) AsMesh() Mesh.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsPlaneMesh() Instance
- func (self Instance) AsPrimitiveMesh() PrimitiveMesh.Instance
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) CenterOffset() Vector3.XYZ
- func (self Instance) ID() ID
- func (self Instance) Orientation() Orientation
- func (self Instance) SetCenterOffset(value Vector3.XYZ)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetOrientation(value Orientation)
- func (self Instance) SetSize(value Vector2.XY)
- func (self Instance) SetSubdivideDepth(value int)
- func (self Instance) SetSubdivideWidth(value int)
- func (self Instance) Size() Vector2.XY
- func (self Instance) SubdivideDepth() int
- func (self Instance) SubdivideWidth() int
- func (self Instance) Virtual(name string) reflect.Value
- type Orientation
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 Extension ¶
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]) AsPlaneMesh ¶
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 ¶
type 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.
type Instance ¶
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 (Instance) AsPlaneMesh ¶
func (Instance) AsPrimitiveMesh ¶
func (self Instance) AsPrimitiveMesh() PrimitiveMesh.Instance
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) CenterOffset ¶
Offset of the generated plane. Useful for particles.
func (Instance) Orientation ¶
func (self Instance) Orientation() Orientation
Direction that the PlaneMesh is facing.
func (Instance) SetCenterOffset ¶
SetCenterOffset sets the property returned by [GetCenterOffset].
func (Instance) SetOrientation ¶
func (self Instance) SetOrientation(value Orientation)
SetOrientation sets the property returned by [GetOrientation].
func (Instance) SetSubdivideDepth ¶
SetSubdivideDepth sets the property returned by [GetSubdivideDepth].
func (Instance) SetSubdivideWidth ¶
SetSubdivideWidth sets the property returned by [GetSubdivideWidth].
func (Instance) SubdivideDepth ¶
Number of subdivision along the Z axis.
func (Instance) SubdivideWidth ¶
Number of subdivision along the X axis.
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 )