VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
groupGrid.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1999 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: grpGrid.h,v $ $Revision: 1.7 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef groupGrid_H_
10 #define groupGrid_H_
11 
12 #include "ctdb/ctdbDefines.h"
13 // \file grpGrid.h
14 // Contains the DtGroupGrid class declaration.
15 
16 // forward declarations
17 class DtGroup;
18 class DtTerrainReader;
19 
21 {
22 public:
23 
24  // default constructor
25  DtGroupGrid();
26 
27  // additional constructor
28  DtGroupGrid(int numWide, int numHigh, DtTerrainReader* reader);
29 
30  // destructor
31  virtual ~DtGroupGrid();
32 
33  // If a copy constructor is implemented, the assignment operator should
34  // also be implemented. Should generally implement both of them anyway to
35  // avoid memory problems due to inappropriate compiler provided defaults.
36  // Access varies so need to put proper access keyword above these
37  // declarations.
38 
39  virtual DtTerrainReader* reader() const;
40 
41  virtual void addToGroup(int x, int y, DtGroup* g);
42 
43 
44  virtual DtGroup* make_hierarchy();
45 
46 
47  virtual int grpnum_from_xy(int x, int y);
48 
49 public:
50 
51  static int div2roundup(int i);
52 
53 protected:
54 
55  // copy constructor
56  DtGroupGrid(const DtGroupGrid& orig);
57 
58  // assignment operator
59  DtGroupGrid& operator=(const DtGroupGrid& orig);
60 
61 
62 protected:
63 
64  int nwide;
65  int nhigh;
66  int ngrps;
67 
70 
71 };
72 
74 {
75  return myReader;
76 }
77 
78 #endif
Definition: group.h:28
#define DT_DLL_ctdb
Definition: ctdbDefines.h:23
int nhigh
Definition: groupGrid.h:65
int nwide
Definition: groupGrid.h:64
Definition: groupGrid.h:20
Definition: terrainReader.h:41
DtTerrainReader * myReader
Definition: groupGrid.h:69
int ngrps
Definition: groupGrid.h:66
DtGroup ** myGroup
Definition: groupGrid.h:68
virtual DtTerrainReader * reader() const
Definition: groupGrid.h:73

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)