Nilorea Library
C utilities for networking, threading, graphics
n_3d.c File Reference

3D helpers, vector More...

#include "nilorea/n_3d.h"
#include "math.h"
+ Include dependency graph for n_3d.c:

Go to the source code of this file.

Functions

double distance (VECTOR3D *p1, VECTOR3D *p2)
 compute the distance between two VECTOR3D points More...
 
static int same_sign (double a, double b)
 Quickly check if two walue are the same sign or not. More...
 
int update_physics_position (PHYSICS *object, double delta_t)
 Update object position, reversed. More...
 
int update_physics_position_nb (PHYSICS *object, int it, double delta_t)
 Update object position componant. More...
 
int update_physics_position_reverse (PHYSICS *object, double delta_t)
 Update object position, reversed. More...
 
int update_physics_position_reverse_nb (PHYSICS *object, int it, double delta_t)
 Update object position componant, reversed. More...
 
double vector_angle_between (VECTOR3D *vec1, VECTOR3D *vec2)
 Compute angle beteen two VECTOR3D. More...
 
double vector_dot_product (VECTOR3D *vec1, VECTOR3D *vec2)
 Compute the dot product of two VECTOR3D. More...
 
int vector_intersect (VECTOR3D *p1, VECTOR3D *p2, VECTOR3D *p3, VECTOR3D *p4, VECTOR3D *px)
 Compute if two vectors are intersecting or not. More...
 
double vector_normalize (VECTOR3D *vec)
 Return the normalized value of vec. More...
 

Detailed Description

3D helpers, vector

Author
Castagnier Mickael
Version
1.0
Date
30/04/2014

Definition in file n_3d.c.

Function Documentation

◆ same_sign()

int same_sign ( double  a,
double  b 
)
static

Quickly check if two walue are the same sign or not.

Parameters
afirst value
bsecond value
Returns
TRUE or FALSE

Definition at line 116 of file n_3d.c.

Referenced by vector_intersect().

+ Here is the caller graph for this function: