FxEngine  0.0.1
3d engine for fx9860G calculators
Data Structures | Typedefs | Functions | Variables
translate.h File Reference
#include <stdint.h>
#include <render/parameters.h>

Go to the source code of this file.

Data Structures

struct  render_integer_position
 this struct is a point in 3d, which has coords save as uint32_t this is the recommended type for high performance rendering, because the sh3eb-elf architecture is 32 bits More...
 
struct  render_floating_position
 this struct is a point in 3d, which has coords save as double it is not recommended to use it for high performances rendering, because of the sh3eb-elf architecture, which does not support natively floating calculation More...
 
struct  render_integer_point
 This is a point which is used for 3d translations and rendering integer mode is the best solution to increase perfs, and that's why I didn't have implemented te floating_points yet. More...
 

Typedefs

typedef struct render_integer_position render_integer_position
 
typedef struct render_floating_position render_floating_position
 
typedef struct render_integer_point render_integer_point
 

Functions

void render_translate (render_integer_point *point)
 This function rotates and applies perspective on an integer point. More...
 
void render_set (const double dh, const double dv, const double roulis, const render_integer_position *camera)
 Sets up the translation matrices for a new rendering cycle There is no need to call this function if you have already called render_update() More...
 
double modulo_2pi (double a)
 Sets up an angle mesure between -pi and +pi. More...
 
double cos (double angle)
 Homemade cosinus implementation, which is faster than casio provided cosinus function. More...
 
double sin (const double angle)
 Homemade sinus implementation, which is faster than casio provided sinus function. More...
 

Variables

const double pi
 
const double pi2
 
const double pi_sur_2
 

Typedef Documentation

◆ render_floating_position

Definition at line 29 of file translate.h.

◆ render_integer_point

Definition at line 41 of file translate.h.

◆ render_integer_position

Definition at line 17 of file translate.h.

Function Documentation

◆ cos()

double cos ( double  angle)

Homemade cosinus implementation, which is faster than casio provided cosinus function.

Parameters
[in]angleThe angle (rad)
Returns
cos angle

◆ modulo_2pi()

double modulo_2pi ( double  a)

Sets up an angle mesure between -pi and +pi.

Parameters
[in]athe angle (rad)
Returns
angle mesure which respect the following contraint : -pi <= angle <= pi

◆ render_set()

void render_set ( const double  dh,
const double  dv,
const double  roulis,
const render_integer_position camera 
)

Sets up the translation matrices for a new rendering cycle There is no need to call this function if you have already called render_update()

Parameters
[in]dhCamera's horizontal direction (rad)
[in]dvCamera's vertical direction (rad)
[in]roulisOptionnal rotation around the middle of the screen
[in]cameraThe camera's coordinates, as an integer position

◆ render_translate()

void render_translate ( render_integer_point point)

This function rotates and applies perspective on an integer point.

Parameters
pointThe point which needs to be translated

◆ sin()

double sin ( const double  angle)

Homemade sinus implementation, which is faster than casio provided sinus function.

Parameters
[in]angleThe angle (rad)
Returns
sin angle

Variable Documentation

◆ pi

const double pi

mathematics constants

◆ pi2

const double pi2

◆ pi_sur_2

const double pi_sur_2