Pol  Revision:cb584c9
Pol::Multi::MultiDef Class Reference

#include <multidef.h>

Public Types

typedef std::multimap< unsigned short, const MULTI_ELEM * > Components
typedef std::vector< const MULTI_ELEM * > HullList
typedef std::set< unsigned short > HullList2
typedef std::pair< Components::const_iterator, Components::const_iterator > ItrPair

Public Member Functions

 MultiDef (Clib::ConfigElem &elem, u16 multiid)
 ~MultiDef ()
void add_body_tohull ()
void add_row_tohull (short y)
void add_to_hull (const MULTI_ELEM *elem)
void add_to_internal_hull (const MULTI_ELEM *elem)
void addrec (const MULTI_ELEM *elem)
bool body_contains (short rx, short ry) const
void computehull ()
void eliminate_hull_dupes ()
size_t estimateSize () const
void fill_hull2 ()
const MULTI_ELEMfind_component (short rx, short ry) const
ItrPair findcomponents (short rx, short ry)
bool findcomponents (Components::const_iterator &beg, Components::const_iterator &end, short rx, short ry) const
void init ()
bool readobjects (Core::StaticList &vec, short rx, short ry, short zbase) const
bool readshapes (Plib::MapShapeList &vec, short rx, short ry, short zbase, unsigned int anyflags) const

Static Public Member Functions

static unsigned short getkey (short rx, short ry)

Public Attributes

Components components
std::vector< MULTI_ELEMelems
HullList hull
HullList2 hull2
HullList internal_hull
HullList2 internal_hull2
short maxrx
short maxry
short maxrz
short minrx
short minry
short minrz
u16 multiid
enum Pol::Multi::MultiDef::HOUSETYPE type
short xbase
short xsize
short ybase
short ysize

Static Public Attributes

static short global_maxrx
static short global_maxry
static short global_maxrz
static short global_minrx
static short global_minry
static short global_minrz

Detailed Description

Definition at line 53 of file multidef.h.

Member Typedef Documentation

typedef std::multimap<unsigned short, const MULTI_ELEM*> Pol::Multi::MultiDef::Components

Definition at line 82 of file multidef.h.

typedef std::vector<const MULTI_ELEM*> Pol::Multi::MultiDef::HullList

Definition at line 75 of file multidef.h.

typedef std::set<unsigned short> Pol::Multi::MultiDef::HullList2

Definition at line 78 of file multidef.h.

typedef std::pair<Components::const_iterator, Components::const_iterator> Pol::Multi::MultiDef::ItrPair

Definition at line 83 of file multidef.h.

Member Enumeration Documentation


Definition at line 60 of file multidef.h.

Constructor & Destructor Documentation

Pol::Multi::MultiDef::~MultiDef ( )

Definition at line 96 of file multidef.cpp.

Member Function Documentation

void Pol::Multi::MultiDef::add_body_tohull ( )

Definition at line 171 of file multidef.cpp.

References add_to_hull(), find_component(), maxrx, maxry, minrx, and minry.

Referenced by computehull().

void Pol::Multi::MultiDef::add_row_tohull ( short  y)
void Pol::Multi::MultiDef::add_to_hull ( const MULTI_ELEM elem)
void Pol::Multi::MultiDef::add_to_internal_hull ( const MULTI_ELEM elem)
bool Pol::Multi::MultiDef::body_contains ( short  rx,
short  ry 
) const

Definition at line 114 of file multidef.cpp.

References components, and getkey().

Referenced by find_component(), and Pol::Multi::UBoat::on_ship().

void Pol::Multi::MultiDef::computehull ( )

Definition at line 223 of file multidef.cpp.

References add_body_tohull().

Referenced by init().

void Pol::Multi::MultiDef::eliminate_hull_dupes ( )
size_t Pol::Multi::MultiDef::estimateSize ( ) const
void Pol::Multi::MultiDef::fill_hull2 ( )
const MULTI_ELEM * Pol::Multi::MultiDef::find_component ( short  rx,
short  ry 
) const

Definition at line 118 of file multidef.cpp.

References body_contains(), components, and getkey().

Referenced by add_body_tohull(), and add_to_hull().

ItrPair Pol::Multi::MultiDef::findcomponents ( short  rx,
short  ry 

Referenced by readobjects(), and readshapes().

bool Pol::Multi::MultiDef::findcomponents ( Components::const_iterator &  beg,
Components::const_iterator &  end,
short  rx,
short  ry 
) const

Definition at line 98 of file multidef.cpp.

References components, and getkey().

unsigned short Pol::Multi::MultiDef::getkey ( short  rx,
short  ry 
void Pol::Multi::MultiDef::init ( )

Definition at line 261 of file multidef.cpp.

References addrec(), computehull(), and elems.

Referenced by Pol::Multi::read_multidefs().

bool Pol::Multi::MultiDef::readobjects ( Core::StaticList vec,
short  rx,
short  ry,
short  zbase 
) const

Member Data Documentation

std::vector<MULTI_ELEM> Pol::Multi::MultiDef::elems

Definition at line 68 of file multidef.h.

Referenced by Pol::Multi::UHouse::create_components(), estimateSize(), init(), and MultiDef().

short Pol::Multi::MultiDef::global_maxrx

Definition at line 92 of file multidef.h.

Referenced by addrec(), and estimateSize().

short Pol::Multi::MultiDef::global_maxry

Definition at line 93 of file multidef.h.

Referenced by addrec(), and estimateSize().

short Pol::Multi::MultiDef::global_maxrz

Definition at line 94 of file multidef.h.

Referenced by addrec(), and estimateSize().

short Pol::Multi::MultiDef::global_minrx

Definition at line 89 of file multidef.h.

Referenced by addrec(), and estimateSize().

short Pol::Multi::MultiDef::global_minry

Definition at line 90 of file multidef.h.

Referenced by addrec(), and estimateSize().

short Pol::Multi::MultiDef::global_minrz

Definition at line 91 of file multidef.h.

Referenced by addrec(), and estimateSize().

HullList2 Pol::Multi::MultiDef::hull2

Definition at line 79 of file multidef.h.

Referenced by add_to_hull(), estimateSize(), and Pol::UoTool::print_multihull().

HullList Pol::Multi::MultiDef::internal_hull

Definition at line 77 of file multidef.h.

Referenced by add_to_internal_hull(), and estimateSize().

HullList2 Pol::Multi::MultiDef::internal_hull2

Definition at line 80 of file multidef.h.

Referenced by add_to_internal_hull(), estimateSize(), and Pol::UoTool::print_multihull().

short Pol::Multi::MultiDef::maxrz
short Pol::Multi::MultiDef::minrz
u16 Pol::Multi::MultiDef::multiid
enum Pol::Multi::MultiDef::HOUSETYPE Pol::Multi::MultiDef::type

Referenced by add_to_hull(), MultiDef(), and readshapes().

short Pol::Multi::MultiDef::xbase

Definition at line 70 of file multidef.h.

short Pol::Multi::MultiDef::xsize

Definition at line 71 of file multidef.h.

short Pol::Multi::MultiDef::ybase

Definition at line 72 of file multidef.h.

short Pol::Multi::MultiDef::ysize

Definition at line 73 of file multidef.h.

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