HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_PointTree.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: SIM_PointTree.h ( SIM Library, C++)
7  *
8  * COMMENTS:
9  * This class builds a GEO_PointTree of the given Geometry
10  * as an alternative representation, allowing one to cache
11  * this useful structure.
12  */
13 
14 #ifndef __SIM_PointTree_H__
15 #define __SIM_PointTree_H__
16 
17 #include "SIM_API.h"
18 
19 #include "SIM_Data.h"
20 #include "SIM_DataUtils.h"
21 
22 #include "SIM_Utils.h"
23 
24 class GEO_PointTree;
25 
26 /// This class holds a GEO_PointTree which people can query.
27 /// The pointtree refers to the point numbers of the SIM_Geometry
28 /// this is an alternative represenation of.
29 /// This caches the point positions in the SIM_Geometry's space,
30 /// so are independent of SIM_Geometry's transform.
32 {
33 public:
34  /// Get the tree
35  GEO_PointTree *getTree() const;
36 
37 protected:
38  explicit SIM_PointTree(const SIM_DataFactory *factory);
39  ~SIM_PointTree() override;
40 
41  /// Overrides to properly implement this class as a SIM_Data.
42  /// This object is meant to be updated from the object's geometry at
43  /// each frame, so we only implement skeleton save, and load methods.
44  void initializeSubclass() override;
45  int64 getMemorySizeSubclass() const override;
46  bool getIsAlternateRepresentationSubclass() const override;
48  const SIM_Data &) override;
49 
50 private:
51  GEO_PointTree *myTree;
52 
54 
56  SIM_Data,
57  "Point Tree",
59 };
60 
61 #endif
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
virtual bool getIsAlternateRepresentationSubclass() const
virtual int64 getMemorySizeSubclass() const
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
long long int64
Definition: SYS_Types.h:116
#define SIM_API
Definition: SIM_API.h:12
virtual void initAlternateRepresentationSubclass(const SIM_Data &)
static const SIM_DopDescription * getEmptyDopDescription()
A DOP description that says not to create an automatic DOP.
virtual void initializeSubclass()