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_PointMapping.h ( SIM Library, C++) 00015 * 00016 * COMMENTS: 00017 * This class builds a mapping from some point attribute value to 00018 * the point number that has that attribute value. 00019 */ 00020 00021 #ifndef __SIM_PointMapping_h__ 00022 #define __SIM_PointMapping_h__ 00023 00024 #include "SIM_API.h" 00025 #include <UT/UT_HashTable.h> 00026 #include "SIM_DataUtils.h" 00027 #include "SIM_OptionsUser.h" 00028 00029 /// This class holds a mapping from some point attribute to point numbers 00030 /// on the parent geometry data. The attribute must be a single integer. 00031 class SIM_API SIM_PointMapping : public SIM_Data, 00032 public SIM_OptionsUser 00033 { 00034 public: 00035 /// The name of the attribute to use for our mapping. 00036 GETSET_DATA_FUNCS_S(SIM_NAME_ATTRIBUTENAME, AttributeName); 00037 00038 /// The name of the attribute to map. 00039 int getPointWithAttributeValue(int attribvalue) const; 00040 00041 protected: 00042 explicit SIM_PointMapping(const SIM_DataFactory *factory); 00043 virtual ~SIM_PointMapping(); 00044 00045 virtual void initializeSubclass(); 00046 virtual int64 getMemorySizeSubclass() const; 00047 virtual bool getIsAlternateRepresentationSubclass() const; 00048 virtual void initAlternateRepresentationSubclass(const SIM_Data &); 00049 00050 private: 00051 UT_HashTable myMapping; 00052 00053 DECLARE_STANDARD_GETCASTTOTYPE(); 00054 DECLARE_DATAFACTORY(SIM_PointMapping, 00055 SIM_Data, 00056 "Point Mapping", 00057 getEmptyDopDescription()); 00058 }; 00059 00060 #endif
1.5.9