fxengine/doc/man/man3/translate.h.3

183 lines
4.5 KiB
Groff

.TH "include/render/translate.h" 3 "Fri Aug 30 2019" "Version 0.0.1" "FxEngine" \" -*- nroff -*-
.ad l
.nh
.SH NAME
include/render/translate.h
.SH SYNOPSIS
.br
.PP
\fC#include <stdint\&.h>\fP
.br
\fC#include <render/parameters\&.h>\fP
.br
.SS "Data Structures"
.in +1c
.ti -1c
.RI "struct \fBrender_integer_position\fP"
.br
.RI "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 "
.ti -1c
.RI "struct \fBrender_floating_position\fP"
.br
.RI "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 "
.ti -1c
.RI "struct \fBrender_integer_point\fP"
.br
.RI "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\&. "
.in -1c
.SS "Typedefs"
.in +1c
.ti -1c
.RI "typedef struct \fBrender_integer_position\fP \fBrender_integer_position\fP"
.br
.ti -1c
.RI "typedef struct \fBrender_floating_position\fP \fBrender_floating_position\fP"
.br
.ti -1c
.RI "typedef struct \fBrender_integer_point\fP \fBrender_integer_point\fP"
.br
.in -1c
.SS "Functions"
.in +1c
.ti -1c
.RI "void \fBrender_translate\fP (\fBrender_integer_point\fP *point)"
.br
.RI "This function rotates and applies perspective on an integer point\&. "
.ti -1c
.RI "void \fBrender_set\fP (const double \fBdh\fP, const double \fBdv\fP, const double \fBroulis\fP, const \fBrender_integer_position\fP *\fBcamera\fP)"
.br
.RI "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() "
.ti -1c
.RI "double \fBmodulo_2pi\fP (double a)"
.br
.RI "Sets up an angle mesure between -pi and +pi\&. "
.ti -1c
.RI "double \fBcos\fP (double angle)"
.br
.RI "Homemade cosinus implementation, which is faster than casio provided cosinus function\&. "
.ti -1c
.RI "double \fBsin\fP (const double angle)"
.br
.RI "Homemade sinus implementation, which is faster than casio provided sinus function\&. "
.in -1c
.SS "Variables"
.in +1c
.ti -1c
.RI "const double \fBpi\fP"
.br
.ti -1c
.RI "const double \fBpi2\fP"
.br
.ti -1c
.RI "const double \fBpi_sur_2\fP"
.br
.in -1c
.SH "Typedef Documentation"
.PP
.SS "typedef struct \fBrender_floating_position\fP \fBrender_floating_position\fP"
.PP
Definition at line 29 of file translate\&.h\&.
.SS "typedef struct \fBrender_integer_point\fP \fBrender_integer_point\fP"
.PP
Definition at line 41 of file translate\&.h\&.
.SS "typedef struct \fBrender_integer_position\fP \fBrender_integer_position\fP"
.PP
Definition at line 17 of file translate\&.h\&.
.SH "Function Documentation"
.PP
.SS "double cos (double angle)"
.PP
Homemade cosinus implementation, which is faster than casio provided cosinus function\&.
.PP
\fBParameters:\fP
.RS 4
\fIangle\fP The angle (rad)
.RE
.PP
\fBReturns:\fP
.RS 4
cos angle
.RE
.PP
.SS "double modulo_2pi (double a)"
.PP
Sets up an angle mesure between -pi and +pi\&.
.PP
\fBParameters:\fP
.RS 4
\fIa\fP the angle (rad)
.RE
.PP
\fBReturns:\fP
.RS 4
angle mesure which respect the following contraint : -pi <= angle <= pi
.RE
.PP
.SS "void render_set (const double dh, const double dv, const double roulis, const \fBrender_integer_position\fP * camera)"
.PP
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()
.PP
\fBParameters:\fP
.RS 4
\fIdh\fP Camera's horizontal direction (rad)
.br
\fIdv\fP Camera's vertical direction (rad)
.br
\fIroulis\fP Optionnal rotation around the middle of the screen
.br
\fIcamera\fP The camera's coordinates, as an integer position
.RE
.PP
.SS "void render_translate (\fBrender_integer_point\fP * point)"
.PP
This function rotates and applies perspective on an integer point\&.
.PP
\fBParameters:\fP
.RS 4
\fIpoint\fP The point which needs to be translated
.RE
.PP
.SS "double sin (const double angle)"
.PP
Homemade sinus implementation, which is faster than casio provided sinus function\&.
.PP
\fBParameters:\fP
.RS 4
\fIangle\fP The angle (rad)
.RE
.PP
\fBReturns:\fP
.RS 4
sin angle
.RE
.PP
.SH "Variable Documentation"
.PP
.SS "const double pi"
mathematics constants
.SS "const double pi2"
.SS "const double pi_sur_2"
.SH "Author"
.PP
Generated automatically by Doxygen for FxEngine from the source code\&.