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 Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: GU_MetaCluster.h ( GU Library, C++) 00015 * 00016 * COMMENTS: Generates clusters of metaballs for better conversion 00017 * to polygons 00018 */ 00019 00020 #ifndef __GU_MetaCluster__ 00021 #define __GU_MetaCluster__ 00022 00023 #include "GU_API.h" 00024 class gu_MetaCluster; 00025 00026 class GU_API GU_MetaClusterParms { 00027 public: 00028 GU_MetaClusterParms(const char *group_prefix = "mcluster", 00029 int internal_groups = 1); 00030 ~GU_MetaClusterParms(); 00031 00032 void setGroupPrefix(const char *pfix) { myGroupPrefix = pfix; } 00033 void createInternalGroups(int onoff) { myInternalFlag = onoff; } 00034 00035 // Generate clusters of metaballs (i.e. mutually exclusive sets) 00036 void makeClusters(GU_Detail *gdp, GB_PrimitiveGroup *group = 0); 00037 00038 // After the clusters have been made, the following methods can be called. 00039 int getNClusters() { return (int)myClusters.entries(); } 00040 GB_PrimitiveGroup *getCluster(int i); 00041 const UT_BoundingBox &getClusterBox(int i); 00042 00043 private: 00044 void clearClusters(); 00045 00046 gu_MetaCluster *myRoot; 00047 const char *myGroupPrefix; 00048 int myInternalFlag; 00049 UT_PtrArray<gu_MetaCluster *> myClusters; 00050 }; 00051 00052 #endif 00053
1.5.9