shphier.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: shphier.h
00004 
00005     DESCRIPTION:  Defines Shape Hierarchy Class
00006 
00007     CREATED BY: Tom Hudson
00008 
00009     HISTORY: created 30 December 1995
00010 
00011  *> Copyright (c) 1995, All Rights Reserved.
00012  **********************************************************************/
00013 
00014 #pragma once
00015 #include "maxheap.h"
00016 #include "genhier.h"
00017 #include "bitarray.h"
00018 
00019 // This class stores the hierarchy tree of a shape object, along with
00020 // a bitarray with an entry for each polygon in the shape which indicates
00021 // whether that polygon should be reversed in order to provide the proper
00022 // clockwise/counterclockwise ordering for the nested shapes.
00023 
00042 class ShapeHierarchy: public MaxHeapOperators {
00043     public:
00044         GenericHierarchy hier;
00045         BitArray reverse;
00047         ShapeHierarchy() {}
00054         ShapeHierarchy(int polys) { New(polys); }
00062         void New(int polys = 0) { hier.New(); reverse.SetSize(polys); reverse.ClearAll(); }
00067         ShapeHierarchy &operator=(ShapeHierarchy &from) { hier=from.hier; reverse=from.reverse; return *this; }
00068     };
00069