struct
Godot::Quaternion
- Godot::Quaternion
- Struct
- Value
- Object
Overview
4-element structure that represents a 3D rotation with hypercomplex numbers (x, y, z, w).
Defined in:
libgodot/types/quaternion.crConstant Summary
-
IDENTITY =
Quaternion.new(0.0_f32, 0.0_f32, 0.0_f32, 1.0_f32)
Constructors
- .from_axis_angle(axis : Vector3, angle : Number) : Quaternion
- .new(x : Float32 = 0.0_f32, y : Float32 = 0.0_f32, z : Float32 = 0.0_f32, w : Float32 = 1.0_f32)
- .new(x : Number, y : Number, z : Number, w : Number)
- .new(axis : Vector3, angle : Number)
- .new(pointer : Pointer(Void))
Instance Method Summary
- #!=(other : Quaternion) : Bool
- #*(scalar : Number) : Quaternion
- #*(other : Quaternion) : Quaternion
- #*(vec : Vector3) : Vector3
- #+(other : Quaternion) : Quaternion
- #-(other : Quaternion) : Quaternion
- #- : Quaternion
- #/(scalar : Number) : Quaternion
- #==(other : Quaternion) : Bool
- #dot(other : Quaternion) : Float32
- #get_angle : Float32
- #get_axis : Vector3
- #inverse : Quaternion
- #is_equal_approx(other : Quaternion) : Bool
- #is_finite? : Bool
- #is_normalized? : Bool
- #length : Float32
- #length_squared : Float32
- #normalized : Quaternion
- #slerp(to : Quaternion, weight : Number) : Quaternion
-
#to_s(io : IO) : Void
Same as
#inspect(io). - #w : Float32
- #w=(w : Float32)
- #x : Float32
- #x=(x : Float32)
- #y : Float32
- #y=(y : Float32)
- #z : Float32
- #z=(z : Float32)
Constructor Detail
def self.new(x : Float32 = 0.0_f32, y : Float32 = 0.0_f32, z : Float32 = 0.0_f32, w : Float32 = 1.0_f32)
#