struct Rosegold::Vec3f

Included Modules

Defined in:

rosegold/world/vec3.cr

Constant Summary

ORIGIN = self.new(0, 0, 0)

Instance Method Summary

Instance methods inherited from module Rosegold::Vec3(Float32)

&*(scalar : T) : self &*, *(scalar : T) : self *, +(vec : self) : self
+(face : BlockFace) : Vec3d
+
, -(vec : self) : self
- : self
-
, /(scalar : T) : self /, ==(vec : Vec3(T)) : Bool ==, [](i : Number) : T [], almost_eq(other : self, closer_than = 0.01) : Bool almost_eq, axis(face : BlockFace) : T axis, block : Vec3i block, centered_3d : Vec3d centered_3d, centered_floor : Vec3d centered_floor, dist(other : self) : T dist, dist_sq(other : self) : T dist_sq, down(len : T = 1) : self down, east(len : T = 1) : self east, floored : Vec3d floored, inspect(io) inspect, join(sep = ", ") join, len_sq : T len_sq, length : Float64 length, map(block : T -> T) : self map, minus(dx : T, dy : T, dz : T) : self minus, normed : self normed, north(len : T = 1) : self north, plus(dx : T, dy : T, dz : T) : self plus, project_onto_line(start : self, direction : self) : self project_onto_line, projected_factor_along_line(start : self, direction : self) : T projected_factor_along_line, rounded : self rounded, south(len : T = 1) : self south, to_f32 : Vec3f to_f32, to_f64 : Vec3d to_f64, to_s(io, sep = ", ") to_s, up(len : T = 1) : self up, west(len : T = 1) : self west, with_axis(face : BlockFace, value : T) : self with_axis, with_length(length : Float64) : Vec3d with_length, with_x(x : T) : self with_x, with_y(y : T) : self with_y, with_z(z : T) : self with_z, x : T x, xz_dist(other : self) : T xz_dist, y : T y, z : T z

Constructor methods inherited from module Rosegold::Vec3(Float32)

new(x : T, y : T, z : T) new

Instance Method Detail

def +(vec : Vec3d) : Vec3d #

[View source]
def -(vec : Vec3d) : Vec3d #

[View source]
def to_f32 #

[View source]