Subversion Repositories gelsvn

Rev

Rev 89 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 89 Rev 125
Line 68... Line 68...
68
 
68
 
69
		/** Store a voxel vox at position p in grid. The Cell will
69
		/** Store a voxel vox at position p in grid. The Cell will
70
				automatically subdivide if it is not already subdivided. */
70
				automatically subdivide if it is not already subdivided. */
71
 		void store(const CGLA::Vec3i& p, const T& vox)
71
 		void store(const CGLA::Vec3i& p, const T& vox)
72
		{
72
		{
73
			assert(in_domain(p));
73
			assert(this->in_domain(p));
74
			top_grid[get_top_index(p)].store(p, vox);
74
			top_grid[get_top_index(p)].store(p, vox);
75
		}
75
		}
76
 
76
 
77
 
77
 
78
		/** Read only access to a voxel in the grid. */
78
		/** Read only access to a voxel in the grid. */
79
 		const T& operator[](const CGLA::Vec3i& p) const
79
 		const T& operator[](const CGLA::Vec3i& p) const
80
		{
80
		{
81
			assert(in_domain(p));
81
			assert(this->in_domain(p));
82
			return top_grid[get_top_index(p)][p];
82
			return top_grid[get_top_index(p)][p];
83
		}
83
		}
84
 
84
 
85
 
85
 
86
//  		bool get(const CGLA::Vec3i& p, T* voxel)
86
//  		bool get(const CGLA::Vec3i& p, T* voxel)