class Graphene::Vec4
- Graphene::Vec4
- Reference
- Object
Overview
A structure capable of holding a vector with four dimensions: x, y, z, and w.
The contents of the #graphene_vec4_t structure are private and should never be accessed directly.
Defined in:
auto/graphene-1.0/vec4.crConstructors
- .alloc : self
- .new(pointer : Pointer(Void), transfer : GICrystal::Transfer)
- .new(value : Graphene::Simd4F? = nil)
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
- .one : Graphene::Vec4
- .w_axis : Graphene::Vec4
- .x_axis : Graphene::Vec4
- .y_axis : Graphene::Vec4
- .z_axis : Graphene::Vec4
- .zero : Graphene::Vec4
Instance Method Summary
-
#==(other : self) : Bool
Returns
true
if this reference is the same as other. - #add(b : Graphene::Vec4) : Graphene::Vec4
- #divide(b : Graphene::Vec4) : Graphene::Vec4
- #dot(b : Graphene::Vec4) : Float32
- #equal(v2 : Graphene::Vec4) : Bool
- #finalize
- #free : Nil
- #init(x : Float32, y : Float32, z : Float32, w : Float32) : Graphene::Vec4
- #init_from_float(src : Enumerable(Float32)) : Graphene::Vec4
- #init_from_float(*src : Float32)
- #init_from_vec2(src : Graphene::Vec2, z : Float32, w : Float32) : Graphene::Vec4
- #init_from_vec3(src : Graphene::Vec3, w : Float32) : Graphene::Vec4
- #init_from_vec4(src : Graphene::Vec4) : Graphene::Vec4
- #interpolate(v2 : Graphene::Vec4, factor : Float64) : Graphene::Vec4
- #length : Float32
- #max(b : Graphene::Vec4) : Graphene::Vec4
- #min(b : Graphene::Vec4) : Graphene::Vec4
- #multiply(b : Graphene::Vec4) : Graphene::Vec4
- #near(v2 : Graphene::Vec4, epsilon : Float32) : Bool
- #negate : Graphene::Vec4
- #normalize : Graphene::Vec4
- #scale(factor : Float32) : Graphene::Vec4
- #subtract(b : Graphene::Vec4) : Graphene::Vec4
- #to_float(dest : Enumerable(Float32)) : Nil
- #to_float(*dest : Float32)
- #to_unsafe : Pointer(Void)
- #value : Graphene::Simd4F
- #value=(value : Graphene::Simd4F)
- #w : Float32
- #x : Float32
- #xy : Graphene::Vec2
- #xyz : Graphene::Vec3
- #y : Float32
- #z : Float32
Constructor Detail
Class Method Detail
Instance Method Detail
def ==(other : self) : Bool
#
Description copied from class Reference
Returns true
if this reference is the same as other. Invokes same?
.