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

Go to the source code of this file.

Data Structures

struct  _graphene_point_t
 

Macros

#define GRAPHENE_POINT_INIT(_x, _y)   (graphene_point_t) { .x = (_x), .y = (_y) }
 
#define GRAPHENE_POINT_INIT_ZERO   GRAPHENE_POINT_INIT (0.f, 0.f)
 

Functions

GRAPHENE_AVAILABLE_IN_1_0 graphene_point_tgraphene_point_alloc (void)
 
GRAPHENE_AVAILABLE_IN_1_0 void graphene_point_free (graphene_point_t *p)
 
GRAPHENE_AVAILABLE_IN_1_0 graphene_point_tgraphene_point_init (graphene_point_t *p, float x, float y)
 
GRAPHENE_AVAILABLE_IN_1_0 graphene_point_tgraphene_point_init_from_point (graphene_point_t *p, const graphene_point_t *src)
 
GRAPHENE_AVAILABLE_IN_1_4 graphene_point_tgraphene_point_init_from_vec2 (graphene_point_t *p, const graphene_vec2_t *src)
 
GRAPHENE_AVAILABLE_IN_1_0 bool graphene_point_equal (const graphene_point_t *a, const graphene_point_t *b)
 
GRAPHENE_AVAILABLE_IN_1_0 float graphene_point_distance (const graphene_point_t *a, const graphene_point_t *b, float *d_x, float *d_y)
 
GRAPHENE_AVAILABLE_IN_1_0 bool graphene_point_near (const graphene_point_t *a, const graphene_point_t *b, float epsilon)
 
GRAPHENE_AVAILABLE_IN_1_0 void graphene_point_interpolate (const graphene_point_t *a, const graphene_point_t *b, double factor, graphene_point_t *res)
 
GRAPHENE_AVAILABLE_IN_1_4 void graphene_point_to_vec2 (const graphene_point_t *p, graphene_vec2_t *v)
 
GRAPHENE_AVAILABLE_IN_1_0 const graphene_point_tgraphene_point_zero (void)
 

Macro Definition Documentation

◆ GRAPHENE_POINT_INIT

#define GRAPHENE_POINT_INIT ( _x,
_y )   (graphene_point_t) { .x = (_x), .y = (_y) }

GRAPHENE_POINT_INIT: @_x: the X coordinate @_y: the Y coordinate

Initializes a graphene_point_t with the given coordinates when declaring it, e.g:

|[ graphene_point_t p = GRAPHENE_POINT_INIT (10.f, 10.f); ]|

Since: 1.0

Definition at line 50 of file graphene-point.h.

◆ GRAPHENE_POINT_INIT_ZERO

#define GRAPHENE_POINT_INIT_ZERO   GRAPHENE_POINT_INIT (0.f, 0.f)

GRAPHENE_POINT_INIT_ZERO:

Initializes a graphene_point_t to (0, 0) when declaring it.

Since: 1.0

Definition at line 59 of file graphene-point.h.

Function Documentation

◆ graphene_point_alloc()

GRAPHENE_AVAILABLE_IN_1_0 graphene_point_t * graphene_point_alloc ( void )

◆ graphene_point_distance()

GRAPHENE_AVAILABLE_IN_1_0 float graphene_point_distance ( const graphene_point_t * a,
const graphene_point_t * b,
float * d_x,
float * d_y )

◆ graphene_point_equal()

GRAPHENE_AVAILABLE_IN_1_0 bool graphene_point_equal ( const graphene_point_t * a,
const graphene_point_t * b )

◆ graphene_point_free()

GRAPHENE_AVAILABLE_IN_1_0 void graphene_point_free ( graphene_point_t * p)

◆ graphene_point_init()

GRAPHENE_AVAILABLE_IN_1_0 graphene_point_t * graphene_point_init ( graphene_point_t * p,
float x,
float y )

◆ graphene_point_init_from_point()

GRAPHENE_AVAILABLE_IN_1_0 graphene_point_t * graphene_point_init_from_point ( graphene_point_t * p,
const graphene_point_t * src )

◆ graphene_point_init_from_vec2()

GRAPHENE_AVAILABLE_IN_1_4 graphene_point_t * graphene_point_init_from_vec2 ( graphene_point_t * p,
const graphene_vec2_t * src )

◆ graphene_point_interpolate()

GRAPHENE_AVAILABLE_IN_1_0 void graphene_point_interpolate ( const graphene_point_t * a,
const graphene_point_t * b,
double factor,
graphene_point_t * res )

◆ graphene_point_near()

GRAPHENE_AVAILABLE_IN_1_0 bool graphene_point_near ( const graphene_point_t * a,
const graphene_point_t * b,
float epsilon )

◆ graphene_point_to_vec2()

GRAPHENE_AVAILABLE_IN_1_4 void graphene_point_to_vec2 ( const graphene_point_t * p,
graphene_vec2_t * v )

◆ graphene_point_zero()

GRAPHENE_AVAILABLE_IN_1_0 const graphene_point_t * graphene_point_zero ( void )