struct Graphene::Ray

Overview

A ray emitted from an origin in a given direction.

The contents of the graphene_::ray_t structure are private, and should not be modified directly.

Defined in:

lib/gi-crystal/src/auto/graphene-1.0/ray.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

def self.new(data : LibGraphene::Ray, _transfer : GICrystal::Transfer) #

def self.new(origin : Graphene::Vec3? = nil, direction : Graphene::Vec3? = nil) #

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


Instance Method Detail

def ==(other : self) : Bool #

def closest_point_to_point(p : Graphene::Point3D) : Graphene::Point3D #

def direction : Graphene::Vec3 #

def direction(*args, **options) #

def direction(*args, **options, &) #

def direction=(arg) #

def distance_to_plane(p : Graphene::Plane) : Float32 #

def distance_to_point(p : Graphene::Point3D) : Float32 #

def equal(b : Graphene::Ray) : Bool #

def free : Nil #

def init(origin : Graphene::Point3D?, direction : Graphene::Vec3?) : Graphene::Ray #

def init_from_ray(src : Graphene::Ray) : Graphene::Ray #

def init_from_vec3(origin : Graphene::Vec3?, direction : Graphene::Vec3?) : Graphene::Ray #

def intersect_box(b : Graphene::Box, t_out : Float32) : Graphene::RayIntersectionKind #

def intersect_sphere(s : Graphene::Sphere, t_out : Float32) : Graphene::RayIntersectionKind #

def intersect_triangle(t : Graphene::Triangle, t_out : Float32) : Graphene::RayIntersectionKind #

def intersects_box(b : Graphene::Box) : Bool #

def intersects_sphere(s : Graphene::Sphere) : Bool #

def intersects_triangle(t : Graphene::Triangle) : Bool #

def origin : Graphene::Point3D #

def origin(*args, **options) #

def origin(*args, **options, &) #

def origin=(arg) #

def position_at(t : Float32) : Graphene::Point3D #