struct CrShader::Language::Types::Vec3

Overview

3-component single-precision floating-point vector (vec3).

Defined in:

crshader/language/types.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(x : Float32 = 0.0_f32, y : Float32 = 0.0_f32, z : Float32 = 0.0_f32) #

def self.new(x : Number, y : Number, z : Number) #

def self.new(v2 : Vec2, z : Float32 = 0.0_f32) #

Instance Method Detail

def *(other : Vec3 | Float32) : Vec3 #

def +(other : Vec3) : Vec3 #

def -(other : Vec3) : Vec3 #

def - : Vec3 #

def /(other : Vec3 | Float32) : Vec3 #

def b : Float32 #

def bgr : Vec3 #

def g : Float32 #

def r : Float32 #

Component swizzles


def rgb : Vec3 #

def x : Float32 #

def x=(x : Float32) #

def xy : Vec2 #

def xz : Vec2 #

def y : Float32 #

def y=(y : Float32) #

def yz : Vec2 #

def yzx : Vec3 #

def z : Float32 #

def z=(z : Float32) #

def zyx : Vec3 #