Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

rotate.cpp File Reference

#include "rotate.h"
#include "math.h"

Defines

#define PI   (3.14159)
#define CIRC_45   (PI/4)
#define CIRC_45H   (CIRC_45/2)
#define CIRC_F1   (CIRC_45H)
#define CIRC_F2   (CIRC_F1 + CIRC_45)
#define CIRC_F3   (CIRC_F2 + CIRC_45)
#define CIRC_F4   (CIRC_F3 + CIRC_45)
#define CIRC_B1   (-CIRC_45H)
#define CIRC_B2   (CIRC_B1 - CIRC_45)
#define CIRC_B3   (CIRC_B2 - CIRC_45)
#define CIRC_B4   (CIRC_B3 - CIRC_45)

Functions

void rotate_setup ()
void xy_scaling (int dir, float *x, float *y)
void xy_components (int dir, float speed, float *x, float *y)
int dir_opposite (int dir)
int dir_cwise (int dir)
int dir_ccwise (int dir)
int dir_after_rotations (int dir, int rot)
int dir_covered (int dir, int otherdir)
int xy_to_dir (float x, float y)

Variables

float x_scaling [DIR_SIZE]
float y_scaling [DIR_SIZE]
float dir_opposite_table [DIR_SIZE]
float dir_cwise_table [DIR_SIZE]
float dir_ccwise_table [DIR_SIZE]

Define Documentation

#define CIRC_45   (PI/4)
 

#define CIRC_45H   (CIRC_45/2)
 

#define CIRC_B1   (-CIRC_45H)
 

#define CIRC_B2   (CIRC_B1 - CIRC_45)
 

#define CIRC_B3   (CIRC_B2 - CIRC_45)
 

#define CIRC_B4   (CIRC_B3 - CIRC_45)
 

#define CIRC_F1   (CIRC_45H)
 

#define CIRC_F2   (CIRC_F1 + CIRC_45)
 

#define CIRC_F3   (CIRC_F2 + CIRC_45)
 

#define CIRC_F4   (CIRC_F3 + CIRC_45)
 

#define PI   (3.14159)
 


Function Documentation

int dir_after_rotations int    dir,
int    rot
 

int dir_ccwise int    dir
 

int dir_covered int    dir,
int    otherdir
 

see note below

int dir_cwise int    dir
 

int dir_opposite int    dir
 

void rotate_setup  
 

void xy_components int    dir,
float    speed,
float *    x,
float *    y
 

void xy_scaling int    dir,
float *    x,
float *    y
 

int xy_to_dir float    x,
float    y
 

uses atan2: slow


Variable Documentation

float dir_ccwise_table[ DIR_SIZE ] [static]
 

float dir_cwise_table[ DIR_SIZE ] [static]
 

float dir_opposite_table[ DIR_SIZE ] [static]
 

float x_scaling[ DIR_SIZE ] [static]
 

float y_scaling[ DIR_SIZE ] [static]
 


Generated on Sun Mar 2 18:50:27 2003 for eounicorn by doxygen1.3-rc3