|
Nebula
|
#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 |
| Navigation::Build::AreaTable::AreaTable | ( | ) |
a table with the built in areas only
| const Util::Array< AreaDefinition > & Navigation::Build::AreaTable::Areas | ( | ) | const |
all defined areas, ordered by id
| const AreaDefinition * Navigation::Build::AreaTable::Find | ( | const Util::String & | name | ) | const |
find an area by name, null if there is none
| const AreaDefinition * Navigation::Build::AreaTable::Get | ( | unsigned char | id | ) | const |
get an area by id, null if the id isn't defined
| 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
| const Util::Blob & Navigation::Build::AreaTable::GetData | ( | ) | const |
the compiled data the table was loaded from, empty for the built in table
| void Navigation::Build::AreaTable::GetFlags | ( | unsigned short(&) | flags[MaxAreas] | ) | const |
the polygon flags of every area id, 0 for undefined ids
| 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
| 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.
|
private |
|
private |
|
private |
|
private |