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

Go to the source code of this file.

Data Structures

struct  _graphene_point3d_t
 

Macros

#define GRAPHENE_POINT3D_INIT(_x, _y, _z)   (graphene_point3d_t) { .x = (_x), .y = (_y), .z = (_z) }
 
#define GRAPHENE_POINT3D_INIT_ZERO   GRAPHENE_POINT3D_INIT (0.f, 0.f, 0.f)
 

Functions

GRAPHENE_AVAILABLE_IN_1_0 graphene_point3d_tgraphene_point3d_alloc (void)
 
GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_free (graphene_point3d_t *p)
 
GRAPHENE_AVAILABLE_IN_1_0 graphene_point3d_tgraphene_point3d_init (graphene_point3d_t *p, float x, float y, float z)
 
GRAPHENE_AVAILABLE_IN_1_0 graphene_point3d_tgraphene_point3d_init_from_point (graphene_point3d_t *p, const graphene_point3d_t *src)
 
GRAPHENE_AVAILABLE_IN_1_0 graphene_point3d_tgraphene_point3d_init_from_vec3 (graphene_point3d_t *p, const graphene_vec3_t *v)
 
GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_to_vec3 (const graphene_point3d_t *p, graphene_vec3_t *v)
 
GRAPHENE_AVAILABLE_IN_1_0 bool graphene_point3d_equal (const graphene_point3d_t *a, const graphene_point3d_t *b)
 
GRAPHENE_AVAILABLE_IN_1_0 bool graphene_point3d_near (const graphene_point3d_t *a, const graphene_point3d_t *b, float epsilon)
 
GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_scale (const graphene_point3d_t *p, float factor, graphene_point3d_t *res)
 
GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_cross (const graphene_point3d_t *a, const graphene_point3d_t *b, graphene_point3d_t *res)
 
GRAPHENE_AVAILABLE_IN_1_0 float graphene_point3d_dot (const graphene_point3d_t *a, const graphene_point3d_t *b)
 
GRAPHENE_AVAILABLE_IN_1_0 float graphene_point3d_length (const graphene_point3d_t *p)
 
GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_normalize (const graphene_point3d_t *p, graphene_point3d_t *res)
 
GRAPHENE_AVAILABLE_IN_1_4 float graphene_point3d_distance (const graphene_point3d_t *a, const graphene_point3d_t *b, graphene_vec3_t *delta)
 
GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_interpolate (const graphene_point3d_t *a, const graphene_point3d_t *b, double factor, graphene_point3d_t *res)
 
GRAPHENE_AVAILABLE_IN_1_4 void graphene_point3d_normalize_viewport (const graphene_point3d_t *p, const graphene_rect_t *viewport, float z_near, float z_far, graphene_point3d_t *res)
 
GRAPHENE_AVAILABLE_IN_1_0 const graphene_point3d_tgraphene_point3d_zero (void)
 

Macro Definition Documentation

◆ GRAPHENE_POINT3D_INIT

#define GRAPHENE_POINT3D_INIT ( _x,
_y,
_z )   (graphene_point3d_t) { .x = (_x), .y = (_y), .z = (_z) }

GRAPHENE_POINT3D_INIT: @_x: the X coordinate @_y: the Y coordinate @_z: the Z coordinate

Initializes a graphene_point3d_t to the given coordinates when declaring it.

Since: 1.0

Definition at line 46 of file graphene-point3d.h.

◆ GRAPHENE_POINT3D_INIT_ZERO

#define GRAPHENE_POINT3D_INIT_ZERO   GRAPHENE_POINT3D_INIT (0.f, 0.f, 0.f)

GRAPHENE_POINT3D_INIT_ZERO:

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

Since: 1.0

Definition at line 55 of file graphene-point3d.h.

Function Documentation

◆ graphene_point3d_alloc()

GRAPHENE_AVAILABLE_IN_1_0 graphene_point3d_t * graphene_point3d_alloc ( void )

◆ graphene_point3d_cross()

GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_cross ( const graphene_point3d_t * a,
const graphene_point3d_t * b,
graphene_point3d_t * res )

◆ graphene_point3d_distance()

GRAPHENE_AVAILABLE_IN_1_4 float graphene_point3d_distance ( const graphene_point3d_t * a,
const graphene_point3d_t * b,
graphene_vec3_t * delta )

◆ graphene_point3d_dot()

GRAPHENE_AVAILABLE_IN_1_0 float graphene_point3d_dot ( const graphene_point3d_t * a,
const graphene_point3d_t * b )

◆ graphene_point3d_equal()

GRAPHENE_AVAILABLE_IN_1_0 bool graphene_point3d_equal ( const graphene_point3d_t * a,
const graphene_point3d_t * b )

◆ graphene_point3d_free()

GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_free ( graphene_point3d_t * p)

◆ graphene_point3d_init()

GRAPHENE_AVAILABLE_IN_1_0 graphene_point3d_t * graphene_point3d_init ( graphene_point3d_t * p,
float x,
float y,
float z )

◆ graphene_point3d_init_from_point()

GRAPHENE_AVAILABLE_IN_1_0 graphene_point3d_t * graphene_point3d_init_from_point ( graphene_point3d_t * p,
const graphene_point3d_t * src )

◆ graphene_point3d_init_from_vec3()

GRAPHENE_AVAILABLE_IN_1_0 graphene_point3d_t * graphene_point3d_init_from_vec3 ( graphene_point3d_t * p,
const graphene_vec3_t * v )

◆ graphene_point3d_interpolate()

GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_interpolate ( const graphene_point3d_t * a,
const graphene_point3d_t * b,
double factor,
graphene_point3d_t * res )

◆ graphene_point3d_length()

GRAPHENE_AVAILABLE_IN_1_0 float graphene_point3d_length ( const graphene_point3d_t * p)

◆ graphene_point3d_near()

GRAPHENE_AVAILABLE_IN_1_0 bool graphene_point3d_near ( const graphene_point3d_t * a,
const graphene_point3d_t * b,
float epsilon )

◆ graphene_point3d_normalize()

GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_normalize ( const graphene_point3d_t * p,
graphene_point3d_t * res )

◆ graphene_point3d_normalize_viewport()

GRAPHENE_AVAILABLE_IN_1_4 void graphene_point3d_normalize_viewport ( const graphene_point3d_t * p,
const graphene_rect_t * viewport,
float z_near,
float z_far,
graphene_point3d_t * res )

◆ graphene_point3d_scale()

GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_scale ( const graphene_point3d_t * p,
float factor,
graphene_point3d_t * res )

◆ graphene_point3d_to_vec3()

GRAPHENE_AVAILABLE_IN_1_0 void graphene_point3d_to_vec3 ( const graphene_point3d_t * p,
graphene_vec3_t * v )

◆ graphene_point3d_zero()

GRAPHENE_AVAILABLE_IN_1_0 const graphene_point3d_t * graphene_point3d_zero ( void )