Changeset 1310 for GTP/trunk/Lib/Geom
- Timestamp:
- 09/01/06 10:52:45 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodManager.h
r1071 r1310 16 16 #include "GeoLodObject.h" 17 17 #include <map> 18 #include <vector> 18 19 19 20 namespace Geometry … … 22 23 { 23 24 public: 24 lodobj_dist_node_t(LodObject *o):dist2cam(0.0f),lodobj(o){} 25 lodobj_dist_node_t(const lodobj_dist_node_t &c):dist2cam(c.dist2cam),lodobj(c.lodobj){} 26 lodobj_dist_node_t(void):dist2cam(0.0f),lodobj(NULL){} 25 lodobj_dist_node_t(float dist, LodObject *o):dist2cam(dist),lodobj(o){ must_recalculate_distance=false; } 27 26 float dist2cam; 28 27 LodObject *lodobj; 28 bool must_recalculate_distance; 29 29 bool operator < (const lodobj_dist_node_t &o) const { return (dist2cam < o.dist2cam); } 30 30 }; 31 32 class lodobj_idpos_node_t;33 31 34 32 class LodManager … … 41 39 void UpdateLODObjectPos(LodObject*,const Geometry::Vector3 &); 42 40 private: 43 std:: map<float,Geometry::lodobj_dist_node_t> lodobj_dists; // key: dist2cam for efficient distance finding44 std::map< Geometry::lodobj_idpos_node_t,Geometry::Vector3> lodobj_pos; // map key: LodObject UniqueID for efficient ID-based finding41 std::vector<lodobj_dist_node_t> lodobj_dists; // key: dist2cam for efficient distance finding 42 std::map<uint32,Geometry::Vector3> lodobj_pos; // map key: LodObject UniqueID for efficient ID-based finding 45 43 unsigned int targetFPS; 46 44 Vector3 camera_pos; … … 49 47 float CalculateDistToCamera(const Geometry::Vector3 &) const; 50 48 float SelectRandomDistance(void) const; 49 void RecalculateDist(lodobj_dist_node_t & node); 51 50 }; 52 51 };
Note: See TracChangeset
for help on using the changeset viewer.