1 /* bzflag
2  * Copyright (c) 1993-2021 Tim Riker
3  *
4  * This package is free software;  you can redistribute it and/or
5  * modify it under the terms of the license found in the file
6  * named COPYING that should have accompanied this file.
7  *
8  * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
9  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11  */
12 
13 #ifndef __OBSTACLESCENENODEGENERATOR_H__
14 #define __OBSTACLESCENENODEGENERATOR_H__
15 
16 class WallSceneNode;
17 
18 class ObstacleSceneNodeGenerator
19 {
20 public:
21     virtual     ~ObstacleSceneNodeGenerator();
22 
23     virtual WallSceneNode* getNextNode(float uRepeats, float vRepeats,
24                                        bool lod) = 0;
25 
26 protected:
27     ObstacleSceneNodeGenerator();
28     int         getNodeNumber() const;
29     int         incNodeNumber();
30 
31 private:
32     // no duplication
33     ObstacleSceneNodeGenerator(const
34                                ObstacleSceneNodeGenerator&);
35     ObstacleSceneNodeGenerator& operator=(const ObstacleSceneNodeGenerator&);
36 
37 private:
38     int         node;
39 };
40 
getNodeNumber()41 inline int      ObstacleSceneNodeGenerator::getNodeNumber() const
42 {
43     return node;
44 }
45 
incNodeNumber()46 inline int      ObstacleSceneNodeGenerator::incNodeNumber()
47 {
48     return ++node;
49 }
50 
51 
52 #endif
53 
54 // Local Variables: ***
55 // mode: C++ ***
56 // tab-width: 4 ***
57 // c-basic-offset: 4 ***
58 // indent-tabs-mode: nil ***
59 // End: ***
60 // ex: shiftwidth=4 tabstop=4
61