WVR_SetArena

WVR_EXPORT bool WVR_SetArena(const WVR_Arena_t * arena)

Function to set the play area size information.

Use this function to change the play area shape and dimensions.. The maximum dimensions is depends on the device. It will check if the settings are valid.

Version
API Level 1
Parameters
  • arena: The new supported shape and dimensions for the play area (refer to WVR_Arena)
Return Value
  • true: The setting is valid.
  • false: The setting is invalid.

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