00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mark Elendt 00008 * Side Effects 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: Geometry library (C++) 00015 * 00016 * COMMENTS: Display cache for polygons 00017 */ 00018 00019 #ifndef __GU_PolyCache_H__ 00020 #define __GU_PolyCache_H__ 00021 00022 #include "GU_API.h" 00023 #include "GU_DisplayCache.h" 00024 00025 class GU_PrimPoly; 00026 class GU_PolyCacheParms; 00027 00028 00029 class GU_API GU_PolyCache : public GU_DisplayCache 00030 { 00031 public: 00032 GU_PolyCache(void); 00033 virtual ~GU_PolyCache(void); 00034 00035 // Build the cache. 00036 int refresh(GU_PolyCacheParms &parms); 00037 const unsigned short *getCommands() const { return myCommands; } 00038 00039 protected: 00040 // Clear the cache data and other related info: 00041 virtual void initializeData(void); 00042 00043 private: 00044 unsigned short *myCommands; 00045 int myCommandSize; 00046 }; 00047 00048 class GU_API GU_PolyCacheParms : public GU_CacheParms 00049 { 00050 public: 00051 GU_PolyCacheParms(void) { myMaxSides = 256; } 00052 virtual ~GU_PolyCacheParms(void); 00053 00054 void setPoly(GU_PrimPoly *poly) { myPoly = poly; } 00055 GU_PrimPoly *getPoly(void) const { return myPoly; } 00056 void setMaxSides(int sides) { myMaxSides = sides; } 00057 int getMaxSides() const { return myMaxSides; } 00058 00059 private: 00060 GU_PrimPoly *myPoly; 00061 int myMaxSides; 00062 }; 00063 00064 #endif
1.5.9