Odamex
Setting the Standard in Multiplayer Doom
common/m_bbox.h
Go to the documentation of this file.
00001 // Emacs style mode select   -*- C++ -*- 
00002 //-----------------------------------------------------------------------------
00003 //
00004 // $Id: m_bbox.h 1788 2010-08-24 04:42:57Z russellrice $
00005 //
00006 // Copyright (C) 1993-1996 by id Software, Inc.
00007 // Copyright (C) 2006-2010 by The Odamex Team.
00008 //
00009 // This program is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU General Public License
00011 // as published by the Free Software Foundation; either version 2
00012 // of the License, or (at your option) any later version.
00013 //
00014 // This program is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // DESCRIPTION:
00020 //              Main loop menu stuff.
00021 //              Random number LUT.
00022 //              Default Config File.
00023 //              PCX Screenshots.
00024 //    
00025 //-----------------------------------------------------------------------------
00026 
00027 
00028 #ifndef __M_BBOX_H__
00029 #define __M_BBOX_H__
00030 
00031 #include "doomtype.h"
00032 #include "dobject.h"
00033 #include "m_fixed.h"
00034 
00035 
00036 // Bounding box coordinate storage.
00037 enum
00038 {
00039         BOXTOP,
00040         BOXBOTTOM,
00041         BOXLEFT,
00042         BOXRIGHT
00043 };              // bbox coordinates
00044 
00045 
00046 class DBoundingBox : public DObject
00047 {
00048         DECLARE_CLASS (DBoundingBox, DObject)
00049 public:
00050         DBoundingBox();
00051 
00052         void ClearBox ();
00053         void AddToBox (fixed_t x, fixed_t y);
00054 
00055         inline fixed_t Top () { return m_Box[BOXTOP]; }
00056         inline fixed_t Bottom () { return m_Box[BOXBOTTOM]; }
00057         inline fixed_t Left () { return m_Box[BOXLEFT]; }
00058         inline fixed_t Right () { return m_Box[BOXRIGHT]; }
00059 
00060 protected:
00061         fixed_t m_Box[4];
00062 };
00063 
00064 
00065 #endif //__M_BBOX_H__
00066 
00067 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends