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 standardvec!
macro. - dict
Deprecated - real
- A macro to coerce float-literals into the
real
type. - reals
- Array of
real
s. - swizzle
- Access vector components in different order.
- varray
- Constructs
VariantArray
literals, similar to Rust’s standardvec!
macro. - vdict
- Constructs
Dictionary
literals, close to Godot’s own syntax. - vslice
- Constructs a slice of
Variant
literals, useful for passing to vararg functions.
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.
- Color
Hsv - HSVA floating-number Color representation.
- Dictionary
- Godot’s
Dictionary
type. - GString
- Godot’s reference counted string type.
- Node
Path - A pre-parsed scene tree path.
- Packed
Array - Space-efficient array of
T
elements. - 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
- Untyped Godot signal.
- String
Name - 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.
- Variant
Operator - Godot enum name:
Variant.Operator
. - Variant
Type - 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§
- Color
Channel Order - 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.
- Encoding
- Specifies string encoding.
- Euler
Order - This enum is exhaustive; you should not expect future Godot versions to add new enumerators.
- Projection
Eye - The eye to create a projection for, when creating a projection adjusted for head-mounted displays.
- Projection
Plane - 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.
- Vector2
Axis - Enumerates the axes in a
Vector2
. - Vector3
Axis - Enumerates the axes in a
Vector3
. - Vector4
Axis - Enumerates the axes in a
Vector4
.
Traits§
- Real
Conv - Convenience conversion between
real
andf32
/f64
. - Rust
Callable - Represents a custom callable object defined in Rust.
- Xform
Inv - Applying inverse transforms.
Type Aliases§
- Packed
Byte Array - General-purpose byte buffer.
- Packed
Color Array - Packed
Float32 Array - Packed
Float64 Array - Packed
Int32 Array - Packed
Int64 Array - Packed
String Array - Packed
Vector2 Array - Packed
Vector3 Array - Packed
Vector4 Array since_api="4.3"
- Variant
Array - A Godot
Array
without an assigned type. - real
- Floating point type used for many structs and functions in Godot.