183 lines
4.2 KiB
Groff
183 lines
4.2 KiB
Groff
.TH "include/render/translate.h" 3 "Thu Aug 29 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 \fBFE_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 \fBFE_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 \fBFE_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 \fBFE_integer_position\fP \fBFE_integer_position\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "typedef struct \fBFE_floating_position\fP \fBFE_floating_position\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "typedef struct \fBFE_integer_point\fP \fBFE_integer_point\fP"
|
|
.br
|
|
.in -1c
|
|
.SS "Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "void \fBrender_translate\fP (\fBFE_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 dh, const double dv, const double roulis, const \fBFE_integer_position\fP *camera)"
|
|
.br
|
|
.RI "Sets up the translation matrices for a new rendering cycle\&. "
|
|
.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 \fBFE_floating_position\fP \fBFE_floating_position\fP"
|
|
|
|
.PP
|
|
Definition at line 29 of file translate\&.h\&.
|
|
.SS "typedef struct \fBFE_integer_point\fP \fBFE_integer_point\fP"
|
|
|
|
.PP
|
|
Definition at line 41 of file translate\&.h\&.
|
|
.SS "typedef struct \fBFE_integer_position\fP \fBFE_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 \fBFE_integer_position\fP * camera)"
|
|
|
|
.PP
|
|
Sets up the translation matrices for a new rendering cycle\&.
|
|
.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 (\fBFE_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\&.
|