struct
CrShader::Language::Types::Vec4
- CrShader::Language::Types::Vec4
- Struct
- Value
- Object
Overview
4-component single-precision floating-point vector (vec4).
Defined in:
crshader/language/types.crConstructors
- .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 = 1.0)
- .new(v3 : Vec3, w : Float32 = 1.0_f32)
Instance Method Summary
- #*(other : Vec4 | Float32) : Vec4
- #+(other : Vec4) : Vec4
- #-(other : Vec4) : Vec4
- #- : Vec4
- #/(other : Vec4 | Float32) : Vec4
- #a : Float32
- #b : Float32
- #g : Float32
-
#r : Float32
Component swizzles
- #rgb : Vec3
- #rgba : Vec4
- #w : Float32
- #w=(w : Float32)
- #x : Float32
- #x=(x : Float32)
- #xy : Vec2
- #xyz : Vec3
- #y : Float32
- #y=(y : Float32)
- #z : Float32
- #z=(z : Float32)
- #zw : Vec2
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)
#