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 * Ondrej Kos 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: UV display cache for polygons 00017 */ 00018 00019 #ifndef __GU_PolyCacheUV_H__ 00020 #define __GU_PolyCacheUV_H__ 00021 00022 #include "GU_API.h" 00023 #include "GU_DisplayCache.h" 00024 00025 class GU_PrimPoly; 00026 class GU_PolyCacheParmsUV; 00027 00028 00029 class GU_API GU_PolyCacheUV : public GU_DisplayCache 00030 { 00031 public: 00032 GU_PolyCacheUV(void); 00033 virtual ~GU_PolyCacheUV(void); 00034 00035 // Build the cache. 00036 int refresh(GU_PolyCacheParmsUV &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_PolyCacheParmsUV : public GU_CacheParms 00049 { 00050 public: 00051 GU_PolyCacheParmsUV(void) { myMaxSides = 256; } 00052 virtual ~GU_PolyCacheParmsUV(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 void setOffset(int offset, bool is_vertex) 00059 { myOffset = offset; myIsVertexAttrib = is_vertex; } 00060 bool isVertexAttrib() const { return myIsVertexAttrib; } 00061 int getOffset() const { return myOffset; } 00062 00063 private: 00064 GU_PrimPoly *myPoly; 00065 int myMaxSides; 00066 int myOffset; 00067 bool myIsVertexAttrib; 00068 }; 00069 00070 #endif
1.5.9