Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

2points.h

Go to the documentation of this file.
00001  /*
00002   * plint/data/2points.h : 2D point pairs data structures
00003   * 
00004   * Time-stamp: <2002-10-07 04:39:31 gseba>
00005   * 
00006   * Copyright (C) Sebastian Glita, email: gseba@users.sourceforge.net
00007   * 
00008   * This file is part of plint.
00009   * 
00010   * plint is free software; you can  redistribute it and/or modify it under the
00011   * terms of the  GNU General Public License as published  by the Free Software
00012   * Foundation; either version 2, or (at your option) any later version.
00013   *
00014   * plint  is distributed  in the  hope  that it  will be  useful, but  WITHOUT
00015   * ANY  WARRANTY; without  even  the implied  warranty  of MERCHANTABILITY  or
00016   * FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU  General Public License for
00017   * more details.
00018   * 
00019   * You should  have received a  copy of the  GNU General Public  License along
00020   * with  plint; see  the file  COPYING.  If  not, write  to the  Free Software
00021   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA USA.
00022   *
00023   */
00024 
00025 #ifndef PLINT_DATA_TYPE_H
00026 #error Dont include me directly, but through data/type.h
00027 #endif
00028 
00044 union _plint_2pt
00045 {
00046   struct
00047   {
00048     plint_pnt_t TopLeft, BotRight;
00049   } rect;                       
00051   struct
00052   {
00053     plint_pnt_t I, Z;
00054   } P;                          
00056   plint_pnt_t PP[2];            
00058 #define PLINT_2pt_INIT(__1__, __2__) { PP:{ __1__, __2__ } }
00059 #define PLINT_2pt_INIT_NUL PLINT_2pt_INIT(PLINT_pnt_INIT_NUL, PLINT_pnt_INIT_NUL)
00060 
00061 #define plint_2pt_new(__x__, __y__) ({ plint_2pt_t _tmp = { PP:{ __x__, __y__ } }; _tmp; })
00062 #define plint_2pt_TopLeft(__2pt__) (__2pt__).rect.TopLeft
00063 #define plint_2pt_BotRight(__2pt__) (__2pt__).rect.BotRight
00064 #define plint_2pt_P1 plint_2pt_TopLeft
00065 #define plint_2pt_P2 plint_2pt_BotRight
00066 
00067 };
00068 
00069 __BEGIN_DECLS
00070 
00071 inline plint_2pt_t plint_2pt_canonic(plint_2pt_t ZPOINTS);
00072 inline plint_2pt_t plint_2pt_switch(plint_2pt_t ZPOINTS);
00073 inline plint_2pt_t plint_2pt_cross(plint_2pt_t ZPOINTS);
00074 
00075 __END_DECLS
00076 

Generated on Thu Jan 9 19:02:37 2003 for plint by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002