|
static object | GetWorld (const object &sWorldName) |
| static function to create get a world instance
|
|
static int | GetVersion (const object &pWorld) |
| get version
|
|
static ParaAttributeObject | GetBlockAttributeObject (const object &pWorld) |
| get block terrain manager's attribute object. More...
|
|
static bool | RegisterBlockTemplate (const object &pWorld, uint16_t templateId, const object ¶ms) |
| register blocks with given parameters More...
|
|
static bool | RegisterBlockTemplate_ (CBlockWorld *pWorld, uint16_t templateId, const object ¶ms) |
|
static void | SetBlockWorldYOffset (const object &pWorld, float offset) |
| set Block world's y offset in real world coordinate. More...
|
|
static void | EnterWorld (const object &pWorld, const char *sWorldDir) |
| call this function after all block templates has been registered to initialize the world note this function can be called multiple times to load different world with the same block templates. More...
|
|
static void | LeaveWorld (const object &pWorld) |
| call this function when leave the block world
|
|
static void | SaveBlockWorld (const object &pWorld, bool saveToTemp) |
|
static void | LoadRegion (const object &pWorld, uint16_t x, uint16_t y, uint16_t z) |
| load region at the given position. More...
|
|
static void | UnloadRegion (const object &pWorld, uint16_t x, uint16_t y, uint16_t z) |
| unload data for a given region from memory
|
|
static void | SetBlockId (const object &pWorld, uint16_t x, uint16_t y, uint16_t z, uint32_t templateId) |
| set block id set the given position. More...
|
|
static uint32_t | GetBlockId (const object &pWorld, uint16_t x, uint16_t y, uint16_t z) |
| get block id at the given block position. More...
|
|
static void | SetBlockData (const object &pWorld, uint16_t x, uint16_t y, uint16_t z, uint32_t data) |
| set per block user data
|
|
static uint32_t | GetBlockData (const object &pWorld, uint16_t x, uint16_t y, uint16_t z) |
| get per block user data
|
|
static object | GetBlocksInRegion (const object &pWorld, int32_t startChunkX, int32_t startChunkY, int32_t startChunkZ, int32_t endChunkX, int32_t endChunkY, int32_t endChunkZ, uint32_t matchType, const object &result) |
| get block in [startChunk,endChunk] More...
|
|
static void | SetBlockWorldSunIntensity (const object &pWorld, float value) |
| set current sun intensity in [0,1] range
|
|
static int | FindFirstBlock (const object &pWorld, uint16_t x, uint16_t y, uint16_t z, uint16_t nSide=4, uint32_t max_dist=32, uint32_t attrFilter=0xffffffff, int nCategoryID=-1) |
| find a block in the side direction that matched filter from block(x,y,z) this function can be used to check for free space upward or download More...
|
|
static int | GetFirstBlock (const object &pWorld, uint16_t x, uint16_t y, uint16_t z, int nBlockId, uint16_t nSide=4, uint32_t max_dist=32) |
| get the y pos of the first block of nBlockID, start searching from x, y, z in the side direction
|
|
static void | SetTemplateTexture (const object &pWorld, uint16_t templateId, const char *fileName) |
| set the template texture. More...
|
|
static object | GetVisibleChunkRegion (const object &pWorld, const object &result) |
| get visible chunk region only used on client side More...
|
|
static object | Pick (const object &pWorld, float rayX, float rayY, float rayZ, float dirX, float dirY, float dirZ, float fMaxDistance, const object &result, uint32_t filter=0xffffffff) |
| ray origin should be positive value, ray direction should be normalized value function is only used on client world More...
|
|
static object | MousePick (const object &pWorld, float fMaxDistance, const object &result, uint32_t filter=0xffffffff) |
| picking by current mouse position. More...
|
|
static void | SelectBlock (const object &pWorld, uint16_t x, uint16_t y, uint16_t z, bool isSelect) |
| add/remove block to/from highlight block list only used on client side More...
|
|
static void | SelectBlock1 (const object &pWorld, uint16_t x, uint16_t y, uint16_t z, bool isSelect, int nGroupID) |
|
static void | DeselectAllBlock1 (const object &pWorld, int nGroupID) |
|
static void | DeselectAllBlock (const object &pWorld) |
|
static void | SetDamagedBlock (const object &pWorld, uint16_t x, uint16_t y, uint16_t z) |
| set damage block id only used on client side More...
|
|
static void | SetDamageDegree (const object &pWorld, float damagedDegree) |
| set damage block degree More...
|
|
Wrapper of internal CBlockWorld.
may have multiple instance of the block world.