|
AndroMeta
2.0.0
|
00001 /* 00002 * Copyright 2009-2012 AndroMeta LLC. All rights reserved. 00003 * 00004 * AndroMeta LLC retains all intellectual property and proprietary 00005 * rights to this software and related documentation and any modifications 00006 * thereto. Any use, reproduction, disclosure, or distribution of this 00007 * software and related documentation without an express license agreement 00008 * from AndroMeta LLC is strictly prohibited. 00009 * 00010 */ 00011 00020 #ifndef ANDROMETA_MPL_LOCALITY_H 00021 #define ANDROMETA_MPL_LOCALITY_H 00022 00023 #include <vector> 00024 00025 #include <AndroMeta/MVector.h> 00026 #include <AndroMeta/MNode.h> 00027 #include <AndroMeta/MPLObject.h> 00028 00029 namespace Meta{ 00030 00031 class MPLObject; 00032 00039 class MPLLocality{ 00040 public: 00049 MPLLocality(size_t threads=0); 00050 00054 ~MPLLocality(); 00055 00069 template<typename T> 00070 void compile(MVector<T>& ov, 00071 size_t maxPerObject, 00072 const mstr& location, 00073 const mstr& radius){ 00074 00075 compile(reinterpret_cast<MPLObject**>(&ov[0]), 00076 ov.size(), 00077 maxPerObject, 00078 location, 00079 radius); 00080 } 00081 00085 template<typename T> 00086 void compile(std::vector<T>& ov, 00087 size_t maxPerObject, 00088 const mstr& location, 00089 const mstr& radius){ 00090 00091 compile(reinterpret_cast<MPLObject**>(&ov[0]), 00092 ov.size(), 00093 maxPerObject, 00094 location, 00095 radius); 00096 } 00097 00101 void compile(MPLObject** ov, 00102 size_t count, 00103 size_t maxPerObject, 00104 const mstr& location, 00105 const mstr& radius); 00106 00111 void run(MPLPairVec& v, float distance); 00112 00118 void run(mnode& n, float distance); 00119 00120 private: 00121 class MPLLocality_* x_; 00122 }; 00123 00124 } // end namespace Meta 00125 00126 #endif // ANDROMETA_MPL_LOCALITY_H
1.7.6.1