optimizing math folder; ready to add translation functions !
This commit is contained in:
parent
f02b76dbd0
commit
146dbf762e
|
@ -9,7 +9,8 @@ static int frame_interval=0;
|
|||
|
||||
void FE_new_frame()
|
||||
{
|
||||
|
||||
// add frame changing -- with timeGR, wait answer on Planete Casio
|
||||
|
||||
FE_move(); // Not implemented yet !
|
||||
FE_zbuffer_clear(); // Not implemented yet !
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef FENG_H
|
||||
#define FENG_H
|
||||
|
||||
|
||||
#include "math/pos.h"
|
||||
#include "math/angle.h"
|
||||
|
||||
|
@ -11,8 +10,4 @@ extern FE_Position FE_user={0,0,0};
|
|||
void FE_new_frame(); // calls move function
|
||||
// int FE_get_fps();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -2,15 +2,13 @@
|
|||
|
||||
#include "angle.h"
|
||||
|
||||
void FE_Coord::calc()
|
||||
void FE_calc()
|
||||
{
|
||||
transformed=original-real;
|
||||
// rotate
|
||||
}
|
||||
|
||||
void FE_Coord::setMatrice(float dh,float dv, float roulis)
|
||||
void FE_set_matrice()
|
||||
{
|
||||
m_matrice[0]=(1)*(cos(dv)+sin(dv))*(cos(roulis)-sin(roulis));
|
||||
m_matrice[1]=(cos(dh)-sin(dh))*(1)*(sin(roulis)+cos(roulis));
|
||||
m_matrice[2]=(sin(dh)+cos(dh))*(cos(dv)-sin(dv))*(1)
|
||||
|
||||
}
|
|
@ -1,19 +1,22 @@
|
|||
#ifndef FE_COORD_H
|
||||
#define FE_COORD_H
|
||||
|
||||
#include "pos.h"
|
||||
|
||||
class FE_Coord
|
||||
typedef struct FE_position FE_position;
|
||||
struct FE_position
|
||||
{
|
||||
public:
|
||||
FE_Pos normal;
|
||||
FE_Pos transformed;
|
||||
void calc();
|
||||
static void setMatrice(float dh,float dv, float roulis);
|
||||
private:
|
||||
static float m_matrice[3];
|
||||
int x,y,z;
|
||||
};
|
||||
|
||||
typedef struct FE_point FE_point;
|
||||
struct FE_point
|
||||
{
|
||||
FE_position real,translated;
|
||||
};
|
||||
|
||||
void FE_calc(const FE_coord& coord);
|
||||
void FE_set_matrice()
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#include "pos.h"
|
||||
|
||||
void rien()
|
||||
{
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
#ifndef FE_POS_H
|
||||
#define FE_POS_H
|
||||
|
||||
typedef struct FE_position FE_position;
|
||||
struct FE_position
|
||||
{
|
||||
int x,y,z;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue