HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 
31  // This will only classify points within the given radius of the ptgroup
32  // and dump all others will be set to the class of -1.
33  void classifyPoints(const GEO_Detail &gdp,
34  const GA_PointGroup &ptgroup, float radius);
35 
36  int getClass(int ptidx) const { return myClasses((unsigned)ptidx); }
37  int getNumClass() const { return myNumClass; }
38 
39  int64 getMemoryUsage(bool inclusive) const
40  {
41  int64 mem = inclusive ? sizeof(*this) : 0;
42  mem += myClasses.getMemoryUsage(false);
43  return mem;
44  }
45 
46 protected:
47  // Methods which collapse & search for classes...
48  int findClass(int ptidx);
49 
52 };
53 
54 #endif
55 
int64 getMemoryUsage(bool inclusive) const
long long int64
Definition: SYS_Types.h:100
int getClass(int ptidx) const
#define GEO_API
Definition: GEO_API.h:10