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 * Jeff Lait 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_PointClassifier.h ( GEO Library, C++) 00015 * 00016 * COMMENTS: This routine classifies points according to what 00017 * meta-primitive they belong to. A meta primitive is all 00018 * the primitives which share at least one point. 00019 */ 00020 00021 #ifndef __GEO_PointClassifier__ 00022 #define __GEO_PointClassifier__ 00023 00024 #include "GEO_API.h" 00025 #include <UT/UT_IntArray.h> 00026 class GEO_Detail; 00027 class GA_PointGroup; 00028 class GA_PrimitiveGroup; 00029 00030 class GEO_API GEO_PointClassifier 00031 { 00032 public: 00033 GEO_PointClassifier(); 00034 virtual ~GEO_PointClassifier(); 00035 00036 void classifyPoints(const GEO_Detail &gdp, 00037 const GA_PrimitiveGroup *exclude_prims = NULL); 00038 00039 // This will only classify points within the given radius of the ptgroup 00040 // and dump all others will be set to the class of -1. 00041 void classifyPoints(const GEO_Detail &gdp, 00042 const GA_PointGroup &ptgroup, float radius); 00043 00044 int getClass(int ptidx) const { return myClasses((unsigned)ptidx); } 00045 int getNumClass() const { return myNumClass; } 00046 00047 protected: 00048 // Methods which collapse & search for classes... 00049 int findClass(int ptidx); 00050 00051 UT_IntArray myClasses; 00052 int myNumClass; 00053 }; 00054 00055 #endif 00056
1.5.9