From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a02498.html | 280 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100644 docs/doxygen/nel/a02498.html (limited to 'docs/doxygen/nel/a02498.html') diff --git a/docs/doxygen/nel/a02498.html b/docs/doxygen/nel/a02498.html new file mode 100644 index 00000000..f8de5cc1 --- /dev/null +++ b/docs/doxygen/nel/a02498.html @@ -0,0 +1,280 @@ + + +NeL: NLPACS::CFaceGrid::CFaceGridBuild class Reference + + + +
+

NLPACS::CFaceGrid::CFaceGridBuild Class Reference

#include <face_grid.h> +

+


Detailed Description

+A temporary grid, used to create a static CFaceGrid object.
Author:
Benjamin Legros

+Nevrax France

+
Date:
2001
+ +

+ +

+Definition at line 66 of file face_grid.h. + + + + + + + + + + + + + + + + + + +

Public Member Functions

void init (uint width, float elsize)
 Init an empty build object with width and size.

void insert (const NLMISC::CVector &bmin, const NLMISC::CVector &bmax, uint32 value)
 Insert a value in the grid.


Data Fields

std::vector< std::vector<
+ uint32 > > 
Grid
 The grid.

float Size
 The size of each element.

uint Width
 The width, in number of rows and lines of the grid.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NLPACS::CFaceGrid::CFaceGridBuild::init uint  width,
float  elsize
[inline]
+
+ + + + + +
+   + + +

+Init an empty build object with width and size. +

+ +

+Definition at line 187 of file face_grid.h. +

+References Grid, nlassert, uint, and width. +

+Referenced by NLPACS::CLocalRetriever::initFaceGrid(). +

+

00188 {
+00189         nlassert(NLMISC::isPowerOf2(width));
+00190         Width = width;
+00191         Size = elsize;
+00192         Grid.clear();
+00193         Grid.resize(Width*Width);
+00194 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NLPACS::CFaceGrid::CFaceGridBuild::insert const NLMISC::CVector bmin,
const NLMISC::CVector bmax,
uint32  value
[inline]
+
+ + + + + +
+   + + +

+Insert a value in the grid. +

+ +

+Definition at line 196 of file face_grid.h. +

+References Grid, sint, uint32, value, x, NLMISC::CVector::x, y, and NLMISC::CVector::y. +

+Referenced by NLPACS::CLocalRetriever::initFaceGrid(). +

+

00199 {
+00200         sint    x0 = (sint)(bmin.x/Size),
+00201                         x1 = (sint)(bmax.x/Size),
+00202                         y0 = (sint)(bmin.y/Size),
+00203                         y1 = (sint)(bmax.y/Size);
+00204 
+00205         if (x1-x0 >= (sint)Width)
+00206         {
+00207                 x0 = 0;
+00208                 x1 = Width-1;
+00209         }
+00210         else
+00211         {
+00212                 x0 &= (Width-1);
+00213                 x1 &= (Width-1);
+00214                 if (x1 < x0)
+00215                         x1 += Width;
+00216         }
+00217 
+00218         if (y1-y0 >= (sint)Width)
+00219         {
+00220                 y0 = 0;
+00221                 y1 = Width-1;
+00222         }
+00223         else
+00224         {
+00225                 y0 &= (Width-1);
+00226                 y1 &= (Width-1);
+00227                 if (y1 < y0)
+00228                         y1 += Width;
+00229         }
+00230 
+00231         sint    x, y;
+00232 
+00233         for (y=y0; y<=y1; ++y)
+00234                 for (x=x0; x<=x1; ++x)
+00235                         Grid[(x&(Width-1))+(y&(Width-1))*Width].push_back(value);
+00236 }
+
+


Field Documentation

+

+ + + + +
+ + +
std::vector< std::vector<uint32> > NLPACS::CFaceGrid::CFaceGridBuild::Grid +
+
+ + + + + +
+   + + +

+The grid. +

+ +

+Definition at line 70 of file face_grid.h. +

+Referenced by NLPACS::CFaceGrid::create(), init(), and insert().

+

+ + + + +
+ + +
float NLPACS::CFaceGrid::CFaceGridBuild::Size +
+
+ + + + + +
+   + + +

+The size of each element. +

+ +

+Definition at line 76 of file face_grid.h. +

+Referenced by NLPACS::CFaceGrid::create().

+

+ + + + +
+ + +
uint NLPACS::CFaceGrid::CFaceGridBuild::Width +
+
+ + + + + +
+   + + +

+The width, in number of rows and lines of the grid. +

+ +

+Definition at line 73 of file face_grid.h. +

+Referenced by NLPACS::CFaceGrid::create().

+


The documentation for this class was generated from the following file: +
Generated on Tue Mar 16 14:13:23 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1