psWorld is in charge of managing all regions (zone map files) and loading/unloading them as needed.
More...
#include <psworld.h>
List of all members.
Classes |
class | sectorTransformation |
Public Member Functions |
void | BuildWarpCache () |
bool | Connected (const iSector *from, const iSector *to) |
| Checks whether 2 sectors are connected via a warp portal.
|
float | Distance (const csVector3 &from_pos, const iSector *from_sector, csVector3 to_pos, const iSector *to_sector) |
| Calculate the distance between two to points either in same or different sectors. Return INFINITY_DISTANCE if no connection sectors where found.
|
float | Distance (iMeshWrapper *ent1, iMeshWrapper *ent2) |
| Calculate the distance between two meshes either in same or different sectors.
|
float | Distance2 (const csVector3 &from_pos, const iSector *from_sector, csVector3 to_pos, const iSector *to_sector) |
| Calculate the 2d distance between two to points either in same or different sectors. Return INFINITY_DISTANCE if no connection sectors where found.
|
void | DumpWarpCache () |
void | GetAllRegionNames (csString &str) |
| This makes a string out of all region names, separated by | chars.
|
iEngine * | GetEngine () |
| obtain the engine.
|
void | GetPosition (iMeshWrapper *entity, csVector3 &pos, float *yrot, iSector *§or) |
| Return an enties position.
|
bool | Initialize (iObjectRegistry *object_reg) |
| Initialize psWorld.
|
bool | NewRegion (const char *mapfile) |
| Create a new psRegion entry and load it if specified.
|
| psWorld () |
bool | WarpSpace (const iSector *from, const iSector *to, csVector3 &pos) |
| Changes pos according to the warp portal between adjacent sectors from and to.
|
bool | WarpSpaceRelative (const iSector *from, const iSector *to, csVector3 &pos) |
| Changes pos according to the warp portal between adjacent sectors from and to using a relative transformation.
|
| ~psWorld () |
Static Public Member Functions |
static csVector3 | Matrix2Rot (const csMatrix3 &mat) |
| obtain the rotation about the axes - expensive.
|
static float | Matrix2YRot (const csMatrix3 &mat) |
| obtain final rotation about y axis of an object.
|
Protected Attributes |
csWeakRef< iEngine > | engine |
csRef< iBgLoader > | loader |
iObjectRegistry * | object_reg |
csRef< iStringArray > | regions |
csArray< sectorTransformation > | transarray |
Detailed Description
psWorld is in charge of managing all regions (zone map files) and loading/unloading them as needed.
The main user of this class is EntityManager.
Definition at line 47 of file psworld.h.
Constructor & Destructor Documentation
Member Function Documentation
void psWorld::BuildWarpCache |
( |
| ) |
|
bool psWorld::Connected |
( |
const iSector * |
from, |
|
|
const iSector * |
to |
|
) |
| |
Checks whether 2 sectors are connected via a warp portal.
float psWorld::Distance |
( |
iMeshWrapper * |
ent1, |
|
|
iMeshWrapper * |
ent2 |
|
) |
| |
Calculate the distance between two meshes either in same or different sectors.
float psWorld::Distance |
( |
const csVector3 & |
from_pos, |
|
|
const iSector * |
from_sector, |
|
|
csVector3 |
to_pos, |
|
|
const iSector * |
to_sector |
|
) |
| |
Calculate the distance between two to points either in same or different sectors. Return INFINITY_DISTANCE if no connection sectors where found.
float psWorld::Distance2 |
( |
const csVector3 & |
from_pos, |
|
|
const iSector * |
from_sector, |
|
|
csVector3 |
to_pos, |
|
|
const iSector * |
to_sector |
|
) |
| |
Calculate the 2d distance between two to points either in same or different sectors. Return INFINITY_DISTANCE if no connection sectors where found.
void psWorld::DumpWarpCache |
( |
| ) |
|
void psWorld::GetAllRegionNames |
( |
csString & |
str | ) |
|
This makes a string out of all region names, separated by | chars.
iEngine* psWorld::GetEngine |
( |
| ) |
[inline] |
obtain the engine.
- Returns:
- returns the engine.
Definition at line 157 of file psworld.h.
void psWorld::GetPosition |
( |
iMeshWrapper * |
entity, |
|
|
csVector3 & |
pos, |
|
|
float * |
yrot, |
|
|
iSector *& |
sector |
|
) |
| |
Return an enties position.
bool psWorld::Initialize |
( |
iObjectRegistry * |
object_reg | ) |
|
static csVector3 psWorld::Matrix2Rot |
( |
const csMatrix3 & |
mat | ) |
[static] |
obtain the rotation about the axes - expensive.
- Returns:
- returns (pitch, roll, yaw) vector
- Note:
- all result values are in [0;2*PI) range
static float psWorld::Matrix2YRot |
( |
const csMatrix3 & |
mat | ) |
[static] |
obtain final rotation about y axis of an object.
- Returns:
- angle about y axis in the range [0;2*PI)
- Note:
- the returned angle is the *final* one - it may be a result of several rotations.
- See also:
- Matrix2Rot
bool psWorld::NewRegion |
( |
const char * |
mapfile | ) |
|
Create a new psRegion entry and load it if specified.
bool psWorld::WarpSpace |
( |
const iSector * |
from, |
|
|
const iSector * |
to, |
|
|
csVector3 & |
pos |
|
) |
| |
Changes pos according to the warp portal between adjacent sectors from and to.
bool psWorld::WarpSpaceRelative |
( |
const iSector * |
from, |
|
|
const iSector * |
to, |
|
|
csVector3 & |
pos |
|
) |
| |
Changes pos according to the warp portal between adjacent sectors from and to using a relative transformation.
Member Data Documentation
The documentation for this class was generated from the following file: