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 * Cristin Barghiel 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 meta surfaces. 00017 * 00018 */ 00019 00020 #ifndef __GU_MetaSurfCache_H__ 00021 #define __GU_MetaSurfCache_H__ 00022 00023 #include "GU_API.h" 00024 #include <GB/GB_Attribute.h> 00025 #include "GU_DisplayCache.h" 00026 00027 class GU_Detail; 00028 class GU_MetaSurfCacheParms; 00029 00030 class GU_API GU_MetaSurfCache : public GU_DisplayCache 00031 { 00032 public: 00033 GU_MetaSurfCache(void); 00034 virtual ~GU_MetaSurfCache(void); 00035 00036 // Build the cache. 00037 int refresh(GU_MetaSurfCacheParms &parms); 00038 00039 // Find out how the cache was built: wire or shaded. 00040 GU_CacheMode builtAs(void) const { return theMode; } 00041 00042 const GU_Detail &geometry(void) const { return theGDP; } 00043 GU_Detail &geometry(void) { return theGDP; } 00044 00045 protected: 00046 private: 00047 GU_Detail theGDP; 00048 GU_CacheMode theMode; 00049 GB_AttributeRef theColorOffset; // color offset in attrib list. 00050 GB_AttributeRef theNormalOffset; // nml offset in attrib list. 00051 }; 00052 00053 class GU_API GU_MetaSurfCacheParms : public GU_CacheParms 00054 { 00055 public: 00056 GU_MetaSurfCacheParms(void) {} 00057 virtual ~GU_MetaSurfCacheParms(void); 00058 00059 void geometry(GU_Detail *gdp) { theGDP = gdp; } 00060 GU_Detail *geometry(void) const { return theGDP; } 00061 00062 private: 00063 GU_Detail *theGDP; 00064 }; 00065 00066 #endif
1.5.9