Module builtin

Expand description

Built-in types like Vector2, GString and Variant.

Please read the book chapter about builtin types.

§API design

API design behind the builtin types (and some wider parts of the library) is elaborated in the extended documentation page.

Modules§

iter
Iterator types for arrays and dictionaries.
math
Math-related functions and traits like ApproxEq.
strings
Specialized types related to Godot’s various string implementations.

Macros§

array
Constructs Array literals, similar to Rust’s standard vec! macro.
dict
Constructs Dictionary literals, close to Godot’s own syntax.
real
A macro to coerce float-literals into the real type.
reals
Array of reals.
swizzle
Access vector components in different order.
varray
Constructs VariantArray literals, similar to Rust’s standard vec! macro.

Structs§

Aabb
Axis-aligned bounding box in 3D space.
Array
Godot’s Array type.
Basis
A 3x3 matrix, typically used as an orthogonal basis for Transform3D.
Callable
A Callable represents a function in Godot.
Color
Color built-in type, in floating-point RGBA format.
ColorHsv
HSVA floating-number Color representation.
Dictionary
Godot’s Dictionary type.
GString
Godot’s reference counted string type.
NodePath
A pre-parsed scene tree path.
PackedByteArray
Implements Godot’s PackedByteArray type, which is a space-efficient array of u8s.
PackedColorArray
Implements Godot’s PackedColorArray type, which is a space-efficient array of Colors.
PackedFloat32Array
Implements Godot’s PackedFloat32Array type, which is a space-efficient array of f32s.
PackedFloat64Array
Implements Godot’s PackedFloat64Array type, which is a space-efficient array of f64s.
PackedInt32Array
Implements Godot’s PackedInt32Array type, which is a space-efficient array of i32s.
PackedInt64Array
Implements Godot’s PackedInt64Array type, which is a space-efficient array of i64s.
PackedStringArray
Implements Godot’s PackedStringArray type, which is a space-efficient array of GStrings.
PackedVector2Array
Implements Godot’s PackedVector2Array type, which is a space-efficient array of Vector2s.
PackedVector3Array
Implements Godot’s PackedVector3Array type, which is a space-efficient array of Vector3s.
PackedVector4Array
Implements Godot’s PackedVector4Array type, which is a space-efficient array of Vector4s.
Plane
3D plane in Hessian normal form.
Projection
A 4x4 matrix used for 3D projective transformations.
Quaternion
Unit quaternion to represent 3D rotations.
Rect2
2D axis-aligned bounding box.
Rect2i
2D axis-aligned integer bounding box.
Signal
A Signal represents a signal of an Object instance in Godot.
StringName
A string optimized for unique names.
Transform2D
Affine 2D transform (2x3 matrix).
Transform3D
Affine 3D transform (3x4 matrix).
Variant
Godot variant type, able to store a variety of different types.
VariantOperator
Godot enum name: Variant.Operator.
VariantType
Godot enum name: Variant.Type.
Vector2
Vector used for 2D math using floating point coordinates.
Vector3
Vector used for 3D math using floating point coordinates.
Vector4
Vector used for 4D math using floating point coordinates.
Vector2i
Vector used for 2D math using integer coordinates.
Vector3i
Vector used for 3D math using integer coordinates.
Vector4i
Vector used for 4D math using integer coordinates.

Enums§

ColorChannelOrder
Defines how individual color channels are laid out in memory.
Corner
This enum is exhaustive; you should not expect future Godot versions to add new enumerators.
EulerOrder
This enum is exhaustive; you should not expect future Godot versions to add new enumerators.
ProjectionEye
The eye to create a projection for, when creating a projection adjusted for head-mounted displays.
ProjectionPlane
A projection’s clipping plane.
Rid
A RID (“resource ID”) is an opaque handle that refers to a Godot Resource.
Side
This enum is exhaustive; you should not expect future Godot versions to add new enumerators.
Vector2Axis
Enumerates the axes in a Vector2.
Vector3Axis
Enumerates the axes in a Vector3.
Vector4Axis
Enumerates the axes in a Vector4.

Traits§

RealConv
Convenience conversion between real and f32/f64.
RustCallable
Represents a custom callable object defined in Rust.

Type Aliases§

VariantArray
A Godot Array without an assigned type.
real
Floating point type used for many structs and functions in Godot.