#include <Bundle.h>
Classes | |
struct | MeshData |
struct | MeshPartData |
struct | MeshSkinData |
class | Reference |
Public Member Functions | |
Scene * | loadScene (const char *id=NULL) |
Node * | loadNode (const char *id) |
Mesh * | loadMesh (const char *id) |
Font * | loadFont (const char *id) |
bool | contains (const char *id) const |
unsigned int | getObjectCount () const |
const char * | getObjectId (unsigned int index) const |
unsigned int | getVersionMajor () const |
unsigned int | getVersionMinor () const |
Static Public Member Functions | |
static Bundle * | create (const char *path) |
Defines a gameplay bundle file (.gpb) that contains a collection of binary game assets that can be loaded.
bool gameplay::Bundle::contains | ( | const char * | id | ) | const |
Determines if this bundle contains a top-level object with the given ID.
This method performs a case-sensitive comparison.
id | The ID of the object to search for. |
static Bundle* gameplay::Bundle::create | ( | const char * | path | ) | [static] |
Returns a Bundle for the given resource path.
The specified path must reference a valid gameplay bundle file. If the bundle is already loaded, the existing bundle is returned with its reference count incremented. When no longer needed, the release() method must be called. Note that calling release() does NOT free any actual game objects created/returned from the Bundle instance and those objects must be released separately.
unsigned int gameplay::Bundle::getObjectCount | ( | ) | const |
Returns the number of top-level objects in this bundle.
const char* gameplay::Bundle::getObjectId | ( | unsigned int | index | ) | const |
Gets the unique identifier of the top-level object at the specified index in this bundle.
index | The index of the object. |
unsigned int gameplay::Bundle::getVersionMajor | ( | ) | const |
Gets the major version of the loaded bundle.
unsigned int gameplay::Bundle::getVersionMinor | ( | ) | const |
Gets the minor version of the loaded bundle.
Font* gameplay::Bundle::loadFont | ( | const char * | id | ) |
Loads a font with the specified ID from the bundle.
id | The ID of the font to load. |
Mesh* gameplay::Bundle::loadMesh | ( | const char * | id | ) |
Loads a mesh with the specified ID from the bundle.
id | The ID of the mesh to load. |
Node* gameplay::Bundle::loadNode | ( | const char * | id | ) |
Loads a node with the specified ID from the bundle.
id | The ID of the node to load in the bundle. |
Scene* gameplay::Bundle::loadScene | ( | const char * | id = NULL | ) |
Loads the scene with the specified ID from the bundle. If id is NULL then the first scene found is loaded.
id | The ID of the scene to load (NULL to load the first scene). |