WVR_SetArena¶
- WVR_EXPORT bool WVR_SetArena(const WVR_Arena_t * arena)
Function to set play area size info.
Uses this function to change play area range. The maximum range is depended on device specific. It will make valid check for those settings.
- Parameters
- arena -
The new setting supported shape and its related play area range. (refer to WVR_Arena)
- arena -
- Return Value
- true -
The setting is valid.
- false -
The setting is invalid.
- true -
How to use¶
Here is an example for the function:
#include <wvr/wvr_arena.h>
WVR_Arena_t arenaData;
// The arena shape is rectangle.
arenaData.shape = WVR_ArenaShape_Rectangle;
arenaData.area.rectangle.width = 1.5f; // 1.5 meters
arenaData.area.rectangle.length = 1.5f;
// The arena shape is Round.
//arenaData.shape = WVR_ArenaShape_Round;
//arenaData.area.round.diameter = 1.5f;
bool ret = WVR_SetArena(arenaData);
// if ret is "false", the setting of arena data is invalid.
See also WVR_GetArena