Last change
on this file since 80 was
80,
checked in by Sam Hocevar, 12 years ago
|
- Adding the Golgotha source code. Not sure what's going to be interesting
in there, but since it's all public domain, there's certainly stuff to
pick up.
|
-
Property svn:keywords set to
Id
|
File size:
1.1 KB
|
Rev | Line | |
---|
[80] | 1 | /**********************************************************************
|
---|
| 2 | *<
|
---|
| 3 | FILE: shphier.h
|
---|
| 4 |
|
---|
| 5 | DESCRIPTION: Defines Shape Hierarchy Class
|
---|
| 6 |
|
---|
| 7 | CREATED BY: Tom Hudson
|
---|
| 8 |
|
---|
| 9 | HISTORY: created 30 December 1995
|
---|
| 10 |
|
---|
| 11 | *> Copyright (c) 1995, All Rights Reserved.
|
---|
| 12 | **********************************************************************/
|
---|
| 13 |
|
---|
| 14 | #ifndef __SHPHIER_H__
|
---|
| 15 |
|
---|
| 16 | #define __SHPHIER_H__
|
---|
| 17 |
|
---|
| 18 | // This class stores the hierarchy tree of a shape object, along with
|
---|
| 19 | // a bitarray with an entry for each polygon in the shape which indicates
|
---|
| 20 | // whether that polygon should be reversed in order to provide the proper
|
---|
| 21 | // clockwise/counterclockwise ordering for the nested shapes.
|
---|
| 22 |
|
---|
| 23 | class ShapeHierarchy {
|
---|
| 24 | public:
|
---|
| 25 | GenericHierarchy hier;
|
---|
| 26 | BitArray reverse;
|
---|
| 27 | ShapeHierarchy() {}
|
---|
| 28 | ShapeHierarchy(int polys) { New(polys); }
|
---|
| 29 | void New(int polys = 0) { hier.New(); reverse.SetSize(polys); reverse.ClearAll(); }
|
---|
| 30 | ShapeHierarchy &operator=(ShapeHierarchy &from) { hier=from.hier; reverse=from.reverse; return *this; }
|
---|
| 31 | };
|
---|
| 32 |
|
---|
| 33 | #endif // __SHPHIER_H__
|
---|
Note: See
TracBrowser
for help on using the repository browser.