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) #

[View source]
def self.new(data : LibGraphene::Ray, _transfer : GICrystal::Transfer) #

[View source]
def self.new(origin : Graphene::Vec3 | Nil = nil, direction : Graphene::Vec3 | Nil = nil) #

[View source]

Class Method Detail

def self.g_type : UInt64 #

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


[View source]

Instance Method Detail

def ==(other : self) : Bool #

[View source]
def closest_point_to_point(p : Graphene::Point3D) : Graphene::Point3D #

[View source]
def direction : Graphene::Vec3 #

[View source]
def direction(*args, **options) #

[View source]
def direction(*args, **options, &) #

[View source]
def direction=(arg) #

[View source]
def distance_to_plane(p : Graphene::Plane) : Float32 #

[View source]
def distance_to_point(p : Graphene::Point3D) : Float32 #

[View source]
def equal(b : Graphene::Ray) : Bool #

[View source]
def free : Nil #

[View source]
def init(origin : Graphene::Point3D | Nil, direction : Graphene::Vec3 | Nil) : Graphene::Ray #

[View source]
def init_from_ray(src : Graphene::Ray) : Graphene::Ray #

[View source]
def init_from_vec3(origin : Graphene::Vec3 | Nil, direction : Graphene::Vec3 | Nil) : Graphene::Ray #

[View source]
def intersect_box(b : Graphene::Box, t_out : Float32) : Graphene::RayIntersectionKind #

[View source]
def intersect_sphere(s : Graphene::Sphere, t_out : Float32) : Graphene::RayIntersectionKind #

[View source]
def intersect_triangle(t : Graphene::Triangle, t_out : Float32) : Graphene::RayIntersectionKind #

[View source]
def intersects_box(b : Graphene::Box) : Bool #

[View source]
def intersects_sphere(s : Graphene::Sphere) : Bool #

[View source]
def intersects_triangle(t : Graphene::Triangle) : Bool #

[View source]
def origin : Graphene::Point3D #

[View source]
def origin(*args, **options) #

[View source]
def origin(*args, **options, &) #

[View source]
def origin=(arg) #

[View source]
def position_at(t : Float32) : Graphene::Point3D #

[View source]