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: SIM_PointTree.h ( SIM Library, C++) 00015 * 00016 * COMMENTS: 00017 * This class builds a GEO_PointTree of the given Geometry 00018 * as an alternative representation, allowing one to cache 00019 * this useful structure. 00020 */ 00021 00022 #ifndef __SIM_PointTree_H__ 00023 #define __SIM_PointTree_H__ 00024 00025 #include "SIM_API.h" 00026 00027 #include "SIM_Data.h" 00028 #include "SIM_DataUtils.h" 00029 00030 #include "SIM_Utils.h" 00031 00032 class GEO_PointTree; 00033 00034 /// This class holds a GEO_PointTree which people can query. 00035 /// The pointtree refers to the point numbers of the SIM_Geometry 00036 /// this is an alternative represenation of. 00037 /// This caches the point positions in the SIM_Geometry's space, 00038 /// so are independent of SIM_Geometry's transform. 00039 class SIM_API SIM_PointTree : public SIM_Data 00040 { 00041 public: 00042 /// Get the tree 00043 GEO_PointTree *getTree() const; 00044 00045 protected: 00046 explicit SIM_PointTree(const SIM_DataFactory *factory); 00047 virtual ~SIM_PointTree(); 00048 00049 /// Overrides to properly implement this class as a SIM_Data. 00050 /// This object is meant to be updated from the object's geometry at 00051 /// each frame, so we only implement skeleton save, and load methods. 00052 virtual void initializeSubclass(); 00053 virtual int64 getMemorySizeSubclass() const; 00054 virtual bool getIsAlternateRepresentationSubclass() const; 00055 virtual void initAlternateRepresentationSubclass(const SIM_Data &); 00056 00057 private: 00058 GEO_PointTree *myTree; 00059 00060 DECLARE_STANDARD_GETCASTTOTYPE(); 00061 00062 DECLARE_DATAFACTORY(SIM_PointTree, 00063 SIM_Data, 00064 "Point Tree", 00065 getEmptyDopDescription()); 00066 }; 00067 00068 #endif
1.5.9