Blender  V3.3
Public Types | Public Member Functions | Protected Attributes | List of all members
Freestyle::HashGrid Class Reference

#include <HashGrid.h>

Inheritance diagram for Freestyle::HashGrid:
Freestyle::Grid

Public Types

typedef map< Vec3u, Cell * > GridHashTable
 

Public Member Functions

 HashGrid ()
 
virtual ~HashGrid ()
 
virtual void clear ()
 
virtual void configure (const Vec3r &orig, const Vec3r &size, unsigned nb)
 
virtual CellgetCell (const Vec3u &p)
 
virtual void fillCell (const Vec3u &p, Cell &cell)
 
- Public Member Functions inherited from Freestyle::Grid
 Grid ()
 
virtual ~Grid ()
 
void getCellCoordinates (const Vec3r &p, Vec3u &res)
 
CellgetCell (const Vec3r &p)
 
void getCellOrigin (const Vec3u &cell_coord, Vec3r &orig)
 
void getCellBox (const Vec3u &cell_coord, Vec3r &min_out, Vec3r &max_out)
 
void insertOccluder (Polygon3r *occluder)
 
void addOccluder (Polygon3r *occluder)
 
void castRay (const Vec3r &orig, const Vec3r &end, OccludersSet &occluders, unsigned timestamp)
 
void initAcceleratedRay (const Vec3r &orig, const Vec3r &end, unsigned timestamp)
 
void castInfiniteRay (const Vec3r &orig, const Vec3r &dir, OccludersSet &occluders, unsigned timestamp)
 
bool initAcceleratedInfiniteRay (const Vec3r &orig, const Vec3r &dir, unsigned timestamp)
 
Polygon3rcastRayToFindFirstIntersection (const Vec3r &orig, const Vec3r &dir, double &t, double &u, double &v, unsigned timestamp)
 
void initRay (const Vec3r &orig, const Vec3r &end, unsigned timestamp)
 
bool initInfiniteRay (const Vec3r &orig, const Vec3r &dir, unsigned timestamp)
 
const Vec3rgetOrigin () const
 
Vec3r gridSize () const
 
Vec3r getCellSize () const
 
OccludersSetgetOccluders ()
 
void displayDebug ()
 

Protected Attributes

GridHashTable _cells
 
- Protected Attributes inherited from Freestyle::Grid
unsigned int _timestamp
 
Vec3u _cells_nb
 
Vec3r _cell_size
 
Vec3r _size
 
Vec3r _orig
 
Vec3r _ray_dir
 
Vec3u _current_cell
 
Vec3r _pt
 
real _t_end
 
real _t
 
OccludersSet _occluders
 

Additional Inherited Members

- Protected Member Functions inherited from Freestyle::Grid
void castRayInternal (GridVisitor &visitor)
 
bool nextRayCell (Vec3u &current_cell, Vec3u &next_cell)
 

Detailed Description

Class to define a regular grid used for ray casting computations

Definition at line 41 of file HashGrid.h.

Member Typedef Documentation

◆ GridHashTable

Definition at line 43 of file HashGrid.h.

Constructor & Destructor Documentation

◆ HashGrid()

Freestyle::HashGrid::HashGrid ( )
inline

Definition at line 45 of file HashGrid.h.

◆ ~HashGrid()

virtual Freestyle::HashGrid::~HashGrid ( )
inlinevirtual

Definition at line 49 of file HashGrid.h.

References clear().

Member Function Documentation

◆ clear()

void Freestyle::HashGrid::clear ( )
virtual

clears the grid Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells.

Reimplemented from Freestyle::Grid.

Definition at line 12 of file HashGrid.cpp.

References _cells, and Freestyle::Grid::clear().

Referenced by ~HashGrid().

◆ configure()

void Freestyle::HashGrid::configure ( const Vec3r orig,
const Vec3r size,
unsigned  nb 
)
virtual

Sets the different parameters of the grid orig The grid origin size The grid's dimensions nb The number of cells of the grid

Reimplemented from Freestyle::Grid.

Definition at line 25 of file HashGrid.cpp.

References Freestyle::Grid::configure(), and size().

◆ fillCell()

virtual void Freestyle::HashGrid::fillCell ( const Vec3u p,
Cell cell 
)
inlinevirtual

Fills the case p with the cell iCell

Implements Freestyle::Grid.

Definition at line 82 of file HashGrid.h.

References _cells.

◆ getCell()

virtual Cell* Freestyle::HashGrid::getCell ( const Vec3u p)
inlinevirtual

returns the cell whose coordinates are passed as argument

Implements Freestyle::Grid.

Definition at line 70 of file HashGrid.h.

References _cells, and NULL.

Member Data Documentation

◆ _cells

GridHashTable Freestyle::HashGrid::_cells
protected

Definition at line 88 of file HashGrid.h.

Referenced by clear(), fillCell(), and getCell().


The documentation for this class was generated from the following files: