Nebula
Loading...
Searching...
No Matches
Navigation::Build::AreaTable Class Reference

#include <navareas.h>

Public Member Functions

 AreaTable ()
 a table with the built in areas only
bool Load (const IO::URI &file)
 load a compiled table, keeps the built in areas if the file is missing. Returns false if the file is invalid
bool Load (const void *data, SizeT size)
 load from compiled table data
const AreaDefinition * Find (const Util::String &name) const
 find an area by name, null if there is none
const AreaDefinition * Get (unsigned char id) const
 get an area by id, null if the id isn't defined
const Util::Array< AreaDefinition > & Areas () const
 all defined areas, ordered by id
void GetFlags (unsigned short(&flags)[MaxAreas]) const
 the polygon flags of every area id, 0 for undefined ids
Math::vec4 GetColor (unsigned char id) const
 the color of an area, a generated one if the area or its color is undefined
const Util::Blob & GetData () const
 the compiled data the table was loaded from, empty for the built in table

Private Member Functions

void SetupBuiltIn ()
void Sort ()

Private Attributes

Util::Array< AreaDefinition > areas
Util::Blob data

Constructor & Destructor Documentation

◆ AreaTable()

Navigation::Build::AreaTable::AreaTable ( )

a table with the built in areas only

Member Function Documentation

◆ Areas()

const Util::Array< AreaDefinition > & Navigation::Build::AreaTable::Areas ( ) const

all defined areas, ordered by id

◆ Find()

const AreaDefinition * Navigation::Build::AreaTable::Find ( const Util::String & name) const

find an area by name, null if there is none

◆ Get()

const AreaDefinition * Navigation::Build::AreaTable::Get ( unsigned char id) const

get an area by id, null if the id isn't defined

◆ GetColor()

Math::vec4 Navigation::Build::AreaTable::GetColor ( unsigned char id) const

the color of an area, a generated one if the area or its color is undefined

◆ GetData()

const Util::Blob & Navigation::Build::AreaTable::GetData ( ) const

the compiled data the table was loaded from, empty for the built in table

◆ GetFlags()

void Navigation::Build::AreaTable::GetFlags ( unsigned short(&) flags[MaxAreas]) const

the polygon flags of every area id, 0 for undefined ids

◆ Load() [1/2]

bool Navigation::Build::AreaTable::Load ( const IO::URI & file)

load a compiled table, keeps the built in areas if the file is missing. Returns false if the file is invalid

◆ Load() [2/2]

bool Navigation::Build::AreaTable::Load ( const void * data,
SizeT size )

load from compiled table data

Areas with an id or name which is taken, or an id outside 1 to 62, are left out with a warning.

◆ SetupBuiltIn()

void Navigation::Build::AreaTable::SetupBuiltIn ( )
private

◆ Sort()

void Navigation::Build::AreaTable::Sort ( )
private

Member Data Documentation

◆ areas

Util::Array<AreaDefinition> Navigation::Build::AreaTable::areas
private

◆ data

Util::Blob Navigation::Build::AreaTable::data
private

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