Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

ModelList Class Reference


Detailed Description

Wrapper around list of models.

Definition at line 14 of file ModelList.h.

Public Member Functions

 ModelList (const Cube::t_models *models)
 Create new wrapper.
int size () const
void drawOn (View *view) const
bool stoneOn (Landslip *slip) const
 Stone all models on fixed pad.
bool fallOn (Landslip *slip) const
 Let all not stoned models to fall.


Constructor & Destructor Documentation

ModelList::ModelList const Cube::t_models models  ) 
 

Create new wrapper.

Parameters:
models wrapped models.

Definition at line 19 of file ModelList.cpp.

00020 {
00021     m_models = models;
00022 }


Member Function Documentation

void ModelList::drawOn View view  )  const
 

Definition at line 25 of file ModelList.cpp.

00026 {
00027     Cube::t_models::const_iterator end = m_models->end();
00028     for (Cube::t_models::const_iterator i = m_models->begin(); i != end; ++i) {
00029         view->drawModel(*i);
00030     }
00031 }

bool ModelList::fallOn Landslip slip  )  const
 

Let all not stoned models to fall.

Returns:
true when something is falling

Definition at line 55 of file ModelList.cpp.

00056 {
00057     bool falling = false;
00058     Cube::t_models::const_iterator end = m_models->end();
00059     for (Cube::t_models::const_iterator i = m_models->begin(); i != end; ++i) {
00060         falling |= slip->fallModel(*i);
00061     }
00062     return falling;
00063 }

int ModelList::size  )  const [inline]
 

Definition at line 19 of file ModelList.h.

00019 { return m_models->size(); }

bool ModelList::stoneOn Landslip slip  )  const
 

Stone all models on fixed pad.

Returns:
true when new model was stoned

Definition at line 38 of file ModelList.cpp.

00039 {
00040     bool change = false;
00041     Cube::t_models::const_iterator end = m_models->end();
00042     for (Cube::t_models::const_iterator i = m_models->begin(); i != end; ++i) {
00043         if (slip->stoneModel(*i)) {
00044             change = true;
00045         }
00046     }
00047     return change;
00048 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:55:56 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2