Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
graphene-ray.h File Reference
#include "graphene-types.h"
#include "graphene-vec3.h"

Go to the source code of this file.

Data Structures

struct  _graphene_ray_t
 

Enumerations

enum  graphene_ray_intersection_kind_t { GRAPHENE_RAY_INTERSECTION_KIND_NONE , GRAPHENE_RAY_INTERSECTION_KIND_ENTER , GRAPHENE_RAY_INTERSECTION_KIND_LEAVE }
 

Functions

GRAPHENE_AVAILABLE_IN_1_4 graphene_ray_tgraphene_ray_alloc (void)
 
GRAPHENE_AVAILABLE_IN_1_4 void graphene_ray_free (graphene_ray_t *r)
 
GRAPHENE_AVAILABLE_IN_1_4 graphene_ray_tgraphene_ray_init (graphene_ray_t *r, const graphene_point3d_t *origin, const graphene_vec3_t *direction)
 
GRAPHENE_AVAILABLE_IN_1_4 graphene_ray_tgraphene_ray_init_from_ray (graphene_ray_t *r, const graphene_ray_t *src)
 
GRAPHENE_AVAILABLE_IN_1_4 graphene_ray_tgraphene_ray_init_from_vec3 (graphene_ray_t *r, const graphene_vec3_t *origin, const graphene_vec3_t *direction)
 
GRAPHENE_AVAILABLE_IN_1_4 void graphene_ray_get_origin (const graphene_ray_t *r, graphene_point3d_t *origin)
 
GRAPHENE_AVAILABLE_IN_1_4 void graphene_ray_get_direction (const graphene_ray_t *r, graphene_vec3_t *direction)
 
GRAPHENE_AVAILABLE_IN_1_4 void graphene_ray_get_position_at (const graphene_ray_t *r, float t, graphene_point3d_t *position)
 
GRAPHENE_AVAILABLE_IN_1_4 float graphene_ray_get_distance_to_point (const graphene_ray_t *r, const graphene_point3d_t *p)
 
GRAPHENE_AVAILABLE_IN_1_4 float graphene_ray_get_distance_to_plane (const graphene_ray_t *r, const graphene_plane_t *p)
 
GRAPHENE_AVAILABLE_IN_1_4 bool graphene_ray_equal (const graphene_ray_t *a, const graphene_ray_t *b)
 
GRAPHENE_AVAILABLE_IN_1_4 void graphene_ray_get_closest_point_to_point (const graphene_ray_t *r, const graphene_point3d_t *p, graphene_point3d_t *res)
 
GRAPHENE_AVAILABLE_IN_1_10 graphene_ray_intersection_kind_t graphene_ray_intersect_sphere (const graphene_ray_t *r, const graphene_sphere_t *s, float *t_out)
 
GRAPHENE_AVAILABLE_IN_1_10 bool graphene_ray_intersects_sphere (const graphene_ray_t *r, const graphene_sphere_t *s)
 
GRAPHENE_AVAILABLE_IN_1_10 graphene_ray_intersection_kind_t graphene_ray_intersect_box (const graphene_ray_t *r, const graphene_box_t *b, float *t_out)
 
GRAPHENE_AVAILABLE_IN_1_10 bool graphene_ray_intersects_box (const graphene_ray_t *r, const graphene_box_t *b)
 
GRAPHENE_AVAILABLE_IN_1_10 graphene_ray_intersection_kind_t graphene_ray_intersect_triangle (const graphene_ray_t *r, const graphene_triangle_t *t, float *t_out)
 
GRAPHENE_AVAILABLE_IN_1_10 bool graphene_ray_intersects_triangle (const graphene_ray_t *r, const graphene_triangle_t *t)
 

Enumeration Type Documentation

◆ graphene_ray_intersection_kind_t

graphene_ray_intersection_kind_t: @GRAPHENE_RAY_INTERSECTION_KIND_NONE: No intersection @GRAPHENE_RAY_INTERSECTION_KIND_ENTER: The ray is entering the intersected object @GRAPHENE_RAY_INTERSECTION_KIND_LEAVE: The ray is leaving the intersected object

The type of intersection.

Since: 1.10

Enumerator
GRAPHENE_RAY_INTERSECTION_KIND_NONE 
GRAPHENE_RAY_INTERSECTION_KIND_ENTER 
GRAPHENE_RAY_INTERSECTION_KIND_LEAVE 

Definition at line 66 of file graphene-ray.h.

Function Documentation

◆ graphene_ray_alloc()

GRAPHENE_AVAILABLE_IN_1_4 graphene_ray_t * graphene_ray_alloc ( void )

◆ graphene_ray_equal()

GRAPHENE_AVAILABLE_IN_1_4 bool graphene_ray_equal ( const graphene_ray_t * a,
const graphene_ray_t * b )

◆ graphene_ray_free()

GRAPHENE_AVAILABLE_IN_1_4 void graphene_ray_free ( graphene_ray_t * r)

◆ graphene_ray_get_closest_point_to_point()

GRAPHENE_AVAILABLE_IN_1_4 void graphene_ray_get_closest_point_to_point ( const graphene_ray_t * r,
const graphene_point3d_t * p,
graphene_point3d_t * res )

◆ graphene_ray_get_direction()

GRAPHENE_AVAILABLE_IN_1_4 void graphene_ray_get_direction ( const graphene_ray_t * r,
graphene_vec3_t * direction )

◆ graphene_ray_get_distance_to_plane()

GRAPHENE_AVAILABLE_IN_1_4 float graphene_ray_get_distance_to_plane ( const graphene_ray_t * r,
const graphene_plane_t * p )

◆ graphene_ray_get_distance_to_point()

GRAPHENE_AVAILABLE_IN_1_4 float graphene_ray_get_distance_to_point ( const graphene_ray_t * r,
const graphene_point3d_t * p )

◆ graphene_ray_get_origin()

GRAPHENE_AVAILABLE_IN_1_4 void graphene_ray_get_origin ( const graphene_ray_t * r,
graphene_point3d_t * origin )

◆ graphene_ray_get_position_at()

GRAPHENE_AVAILABLE_IN_1_4 void graphene_ray_get_position_at ( const graphene_ray_t * r,
float t,
graphene_point3d_t * position )

◆ graphene_ray_init()

GRAPHENE_AVAILABLE_IN_1_4 graphene_ray_t * graphene_ray_init ( graphene_ray_t * r,
const graphene_point3d_t * origin,
const graphene_vec3_t * direction )

◆ graphene_ray_init_from_ray()

GRAPHENE_AVAILABLE_IN_1_4 graphene_ray_t * graphene_ray_init_from_ray ( graphene_ray_t * r,
const graphene_ray_t * src )

◆ graphene_ray_init_from_vec3()

GRAPHENE_AVAILABLE_IN_1_4 graphene_ray_t * graphene_ray_init_from_vec3 ( graphene_ray_t * r,
const graphene_vec3_t * origin,
const graphene_vec3_t * direction )

◆ graphene_ray_intersect_box()

GRAPHENE_AVAILABLE_IN_1_10 graphene_ray_intersection_kind_t graphene_ray_intersect_box ( const graphene_ray_t * r,
const graphene_box_t * b,
float * t_out )

◆ graphene_ray_intersect_sphere()

GRAPHENE_AVAILABLE_IN_1_10 graphene_ray_intersection_kind_t graphene_ray_intersect_sphere ( const graphene_ray_t * r,
const graphene_sphere_t * s,
float * t_out )

◆ graphene_ray_intersect_triangle()

GRAPHENE_AVAILABLE_IN_1_10 graphene_ray_intersection_kind_t graphene_ray_intersect_triangle ( const graphene_ray_t * r,
const graphene_triangle_t * t,
float * t_out )

◆ graphene_ray_intersects_box()

GRAPHENE_AVAILABLE_IN_1_10 bool graphene_ray_intersects_box ( const graphene_ray_t * r,
const graphene_box_t * b )

◆ graphene_ray_intersects_sphere()

GRAPHENE_AVAILABLE_IN_1_10 bool graphene_ray_intersects_sphere ( const graphene_ray_t * r,
const graphene_sphere_t * s )

◆ graphene_ray_intersects_triangle()

GRAPHENE_AVAILABLE_IN_1_10 bool graphene_ray_intersects_triangle ( const graphene_ray_t * r,
const graphene_triangle_t * t )