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 Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: GEO_PrimClassifier.h ( GEO Library, C++) 00015 * 00016 * COMMENTS: This routine classifies primitives according to what 00017 * meta-primitive they belong to. The exact definition of a 00018 * meta-primitive depends on the classification done. 00019 */ 00020 00021 #ifndef __GEO_PrimClassifier__ 00022 #define __GEO_PrimClassifier__ 00023 00024 #include "GEO_API.h" 00025 #include <UT/UT_IntArray.h> 00026 class GEO_Detail; 00027 class GEO_PointClassifier; 00028 class GB_PrimitiveGroup; 00029 00030 class GEO_API GEO_PrimClassifier 00031 { 00032 public: 00033 GEO_PrimClassifier(); 00034 virtual ~GEO_PrimClassifier(); 00035 00036 void classifyByVertexUV(const GEO_Detail &gdp, int attriboffset, 00037 const GB_PrimitiveGroup *exclude_prims=NULL); 00038 void classifyBySharedPoints(const GEO_Detail &gdp, 00039 const GEO_PointClassifier &classifier, 00040 const GB_PrimitiveGroup *exclude_prims=NULL); 00041 00042 int getClass(int idx) const { return myClasses((unsigned)idx); } 00043 int getNumClass() const { return myNumClass; } 00044 00045 protected: 00046 // Methods which collapse & search for classes... 00047 int findClass(int idx); 00048 00049 UT_IntArray myClasses; 00050 int myNumClass; 00051 }; 00052 00053 #endif 00054
1.5.9