/*
    ANTLand simulation
    (C) 2004 justin_sane

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

    Contact: justinsanemsu@msu.edu

    FILE: point.h
    Authors: justin_sane
*/


#ifndef pointH
#define pointH

// the point type
typedef struct
{
    float x, y;
} point;

// the integer point type
typedef struct
{
    int x, y;
} intpoint;




// the point3d type
typedef struct
{
    float x, y, z;    // base cords
    float rx, ry, rz; // rotated cords

    int sx, sy;
    bool valid;

} point3d;


typedef struct
{
    point3d *v[4];       // ponters to the vertices
    TColor color;
    float depth;
} face;


face make_face( point3d *p1, point3d *p2,  point3d *p3,  point3d *p4, TColor c);

point operator+ (point a, point b);
point operator- (point a, point b);

point  __fastcall get_point (float x, float y);

intpoint  __fastcall get_intpoint (int x, int y);

point3d  __fastcall get_point_3d (float x, float y, float z);


//float __fastcall deg_to_rad(float d);
//float __fastcall fast_sin(int a);
//float __fastcall fast_cos(int a);

#endif
