Voro++
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
voro::wall_list Class Reference

A class for storing a list of pointers to walls. More...

#include <container.hh>

+ Inheritance diagram for voro::wall_list:

Public Member Functions

 wall_list ()
 
 ~wall_list ()
 
void add_wall (wall *w)
 
void add_wall (wall &w)
 
void add_wall (wall_list &wl)
 
bool point_inside_walls (double x, double y, double z)
 
template<class c_class >
bool apply_walls (c_class &c, double x, double y, double z)
 
void deallocate ()
 

Data Fields

wall ** walls
 
wall ** wep
 

Protected Member Functions

void increase_wall_memory ()
 

Protected Attributes

wall ** wel
 
int current_wall_size
 

Detailed Description

This class stores a list of pointers to wall classes. It contains several simple routines that make use of the wall classes (such as telling whether a given position is inside all of the walls or not). It can be used by itself, but also forms part of container_base, for associating walls with this class.

Definition at line 52 of file container.hh.

Constructor & Destructor Documentation

voro::wall_list::wall_list ( )

The wall_list constructor sets up an array of pointers to wall classes.

Definition at line 518 of file container.cc.

voro::wall_list::~wall_list ( )

The wall_list destructor frees the array of pointers to the wall classes.

Definition at line 523 of file container.cc.

Member Function Documentation

void voro::wall_list::add_wall ( wall w)
inline

Adds a wall to the list.

Parameters
[in]wthe wall to add.

Definition at line 63 of file container.hh.

void voro::wall_list::add_wall ( wall w)
inline

Adds a wall to the list.

Parameters
[in]wa reference to the wall to add.

Definition at line 69 of file container.hh.

void voro::wall_list::add_wall ( wall_list wl)

Adds all of the walls on another wall_list to this class.

Parameters
[in]wla reference to the wall class.

Definition at line 529 of file container.cc.

template<class c_class >
bool voro::wall_list::apply_walls ( c_class &  c,
double  x,
double  y,
double  z 
)
inline

Cuts a Voronoi cell by all of the walls currently on the list.

Parameters
[in]ca reference to the Voronoi cell class.
[in](x,y,z)the position of the cell.
Returns
True if the cell still exists, false if the cell is deleted.

Definition at line 86 of file container.hh.

void voro::wall_list::deallocate ( )

Deallocates all of the wall classes pointed to by the wall_list.

Definition at line 534 of file container.cc.

void voro::wall_list::increase_wall_memory ( )
protected

Increases the memory allocation for the walls array.

Definition at line 539 of file container.cc.

bool voro::wall_list::point_inside_walls ( double  x,
double  y,
double  z 
)
inline

Determines whether a given position is inside all of the walls on the list.

Parameters
[in](x,y,z)the position to test.
Returns
True if it is inside, false if it is outside.

Definition at line 75 of file container.hh.

Field Documentation

int voro::wall_list::current_wall_size
protected

The current amount of memory allocated for walls.

Definition at line 97 of file container.hh.

wall** voro::wall_list::walls

An array holding pointers to wall objects.

Definition at line 55 of file container.hh.

wall** voro::wall_list::wel
protected

A pointer to the limit of the walls array, used to determine when array is full.

Definition at line 95 of file container.hh.

wall** voro::wall_list::wep

A pointer to the next free position to add a wall pointer.

Definition at line 58 of file container.hh.


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