HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_PointClassifier.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GEO_PointClassifier.h ( GEO Library, C++)
7  *
8  * COMMENTS: This routine classifies points according to what
9  * meta-primitive they belong to. A meta primitive is all
10  * the primitives which share at least one point.
11  */
12 
13 #ifndef __GEO_PointClassifier__
14 #define __GEO_PointClassifier__
15 
16 #include "GEO_API.h"
17 #include <UT/UT_IntArray.h>
18 class GEO_Detail;
19 class GA_PointGroup;
20 class GA_PrimitiveGroup;
21 
23 {
24 public:
26  virtual ~GEO_PointClassifier();
27 
28  void classifyPoints(const GEO_Detail &gdp,
29  const GA_PrimitiveGroup *exclude_prims = NULL,
30  const GA_PointGroup *exclude_points = NULL);
31 
32  // This will only classify points within the given radius of the ptgroup
33  // and dump all others will be set to the class of -1.
34  void classifyPoints(const GEO_Detail &gdp,
35  const GA_PointGroup &ptgroup, float radius);
36 
37  int getClass(int ptidx) const { return myClasses((unsigned)ptidx); }
38  int getNumClass() const { return myNumClass; }
39 
40  int64 getMemoryUsage(bool inclusive) const
41  {
42  int64 mem = inclusive ? sizeof(*this) : 0;
43  mem += myClasses.getMemoryUsage(false);
44  return mem;
45  }
46 
47 protected:
48  // Methods which collapse & search for classes...
49  int findClass(int ptidx);
50 
53 };
54 
55 #endif
56 
int64 getMemoryUsage(bool inclusive) const
int getClass(int ptidx) const
#define GEO_API
Definition: GEO_API.h:14
long long int64
Definition: SYS_Types.h:116