class Mittsu::Color

Defined in:

mittsu/math/color.cr

Constructors

Instance Method Summary

Instance methods inherited from class Mittsu::Vector3

apply_axis_angle(axis, angle) apply_axis_angle, apply_euler(euler) apply_euler, apply_matrix3(m) apply_matrix3, apply_matrix4(m) apply_matrix4, apply_projection(m) apply_projection, apply_quaternion(q) apply_quaternion, cross(v) cross, cross_vectors(a, b) cross_vectors, distance_to_squared(v) distance_to_squared, dot(v) dot, from_attribute(attribute, index, offset = 0) from_attribute, length_manhattan length_manhattan, project(camera) project, set(x, y, z) set, set_from_matrix_column(index, matrix) set_from_matrix_column, set_from_matrix_position(m) set_from_matrix_position, set_from_matrix_scale(m) set_from_matrix_scale, transform_direction(m) transform_direction, unproject(camera) unproject, x x, x=(value) x=, y y, y=(value) y=, z z, z=(value) z=

Constructor methods inherited from class Mittsu::Vector3

new(x = 0, y = 0, z = 0) new

Instance methods inherited from class Mittsu::Vector

==(v) ==, [](index) [], []=(index, value) []=, add(v) add, add_scalar(s) add_scalar, add_vectors(a, b) add_vectors, angle_to(v) angle_to, ceil ceil, clamp(min, max) clamp, clamp_scalar(min, max) clamp_scalar, clone clone, copy(v) copy, dimensions : Int32 dimensions, distance_to(v) distance_to, divide(v) divide, divide_scalar(s) divide_scalar, each_dimension(&) each_dimension, elements : Array(Float64) elements, elements=(elements : Array(Float64)) elements=, floor floor, from_array(array, offset = 0) from_array, index index, index=(index) index=, length length, length_sq length_sq, lerp(v, alpha) lerp, lerp_vectors(v1, v2, alpha) lerp_vectors, max(v) max, min(v) min, multiply(v) multiply, multiply_scalar(s) multiply_scalar, multiply_vectors(a, b) multiply_vectors, negate negate, normalize normalize, project_on_plane(plane_normal) project_on_plane, project_on_vector(vector) project_on_vector, reflect(normal) reflect, round round, round_to_zero round_to_zero, set(elements : Array(Float64)) set, set_length(l) set_length, sub(v) sub, sub_scalar(s) sub_scalar, sub_vectors(a, b) sub_vectors, to_a(array = [] of Float64, offset = 0) to_a, to_array(array = [] of Float64, offset = 0) to_array, to_s to_s, uv uv, uv=(uv) uv=

Constructor methods inherited from class Mittsu::Vector

new(elements : Array(Float64)) new

Constructor Detail

def self.new(r = 0.0, g = 0.0, b = 0.0) #

[View source]

Instance Method Detail

def add_colors(a, b) #

alias :add_colors :add_vectors


[View source]
def b #

[View source]
def b=(value) #

[View source]
def convert_gamma_to_linear #

[View source]
def convert_linear_to_gamma #

[View source]
def copy_gamma_to_linear(color, gamma_factor = 2.0) #

[View source]
def copy_linear_to_gamma(color, gamma_factor = 2.0) #

[View source]
def g #

[View source]
def g=(value) #

[View source]
def hex #

[View source]
def hex_string #

[View source]
def hsl(target = nil) #

[View source]
def hue2rgb(p, q, t) #

[View source]
def offset_hsl(h, s, l) #

[View source]
def r #

[View source]
def r=(value) #

[View source]
def set(value) #

[View source]
def set_hex(hex) #

[View source]
def set_hsl(h, s, l) #

[View source]
def set_rgb(r, g, b) #

[View source]
def set_style(style) #

[View source]
def style #

[View source]