|
cocos2d-x
3.3
|
Defines a bundle file that contains a collection of assets. More...
#include <CCBundle3D.h>
Public Member Functions | |
| virtual void | clear () |
| virtual bool | load (const std::string &path) |
| load a file. More... | |
| virtual bool | loadSkinData (const std::string &id, SkinData *skindata) |
| load skin data from bundle More... | |
| virtual bool | loadAnimationData (const std::string &id, Animation3DData *animationdata) |
| load material data from bundle More... | |
| virtual bool | loadMeshDatas (MeshDatas &meshdatas) |
| virtual bool | loadNodes (NodeDatas &nodedatas) |
| virtual bool | loadMaterials (MaterialDatas &materialdatas) |
Static Public Member Functions | |
| static void | setBundleInstance (Bundle3D *bundleInstance) |
| you can define yourself bundle and set it, use default bundle otherwise More... | |
| static Bundle3D * | getInstance () |
| static void | destroyInstance () |
| static bool | loadObj (MeshDatas &meshdatas, MaterialDatas &materialdatas, NodeDatas &nodedatas, const std::string &fullPath, const char *mtl_basepath=nullptr) |
| static AABB | calculateAABB (const std::vector< float > &vertex, int stride, const std::vector< unsigned short > &index) |
Protected Member Functions | |
| bool | loadJson (const std::string &path) |
| bool | loadBinary (const std::string &path) |
| bool | loadMeshDatasJson (MeshDatas &meshdatas) |
| bool | loadMeshDataJson_0_1 (MeshDatas &meshdatas) |
| bool | loadMeshDataJson_0_2 (MeshDatas &meshdatas) |
| bool | loadMeshDatasBinary (MeshDatas &meshdatas) |
| bool | loadMeshDatasBinary_0_1 (MeshDatas &meshdatas) |
| bool | loadMeshDatasBinary_0_2 (MeshDatas &meshdatas) |
| bool | loadMaterialsJson (MaterialDatas &materialdatas) |
| bool | loadMaterialDataJson_0_1 (MaterialDatas &materialdatas) |
| bool | loadMaterialDataJson_0_2 (MaterialDatas &materialdatas) |
| bool | loadMaterialsBinary (MaterialDatas &materialdatas) |
| bool | loadMaterialsBinary_0_1 (MaterialDatas &materialdatas) |
| bool | loadMaterialsBinary_0_2 (MaterialDatas &materialdatas) |
| bool | loadMeshDataJson (MeshData *meshdata) |
| bool | loadMeshDataJson_0_1 (MeshData *meshdata) |
| bool | loadMeshDataJson_0_2 (MeshData *meshdata) |
| bool | loadSkinDataJson (SkinData *skindata) |
| bool | loadSkinDataBinary (SkinData *skindata) |
| bool | loadMaterialDataJson (MaterialData *materialdata) |
| bool | loadMaterialDataJson_0_1 (MaterialData *materialdata) |
| bool | loadMaterialDataJson_0_2 (MaterialData *materialdata) |
| bool | loadAnimationDataJson (const std::string &id, Animation3DData *animationdata) |
| bool | loadAnimationDataBinary (const std::string &id, Animation3DData *animationdata) |
| bool | loadNodesJson (NodeDatas &nodedatas) |
| load nodes of json More... | |
| NodeData * | parseNodesRecursivelyJson (const rapidjson::Value &jvalue) |
| bool | loadNodesBinary (NodeDatas &nodedatas) |
| load nodes of binary More... | |
| NodeData * | parseNodesRecursivelyBinary (bool &skeleton) |
| GLenum | parseGLType (const std::string &str) |
| get define data type More... | |
| NTextureData::Usage | parseGLTextureType (const std::string &str) |
| get define data type More... | |
| unsigned int | parseGLProgramAttribute (const std::string &str) |
| get vertex attribute type More... | |
| void | getModelRelativePath (const std::string &path) |
| Reference * | seekToFirstType (unsigned int type, const std::string &id="") |
| virtual | ~Bundle3D () |
Protected Attributes | |
| CC_CONSTRUCTOR_ACCESS | __pad0__: Bundle3D() |
| std::string | _modelPath |
| std::string | _path |
| std::string | _version |
| char * | _jsonBuffer |
| rapidjson::Document | _jsonReader |
| Data * | _binaryBuffer |
| BundleReader | _binaryReader |
| unsigned int | _referenceCount |
| Reference * | _references |
| bool | _isBinary |
Static Protected Attributes | |
| static Bundle3D * | _instance |
Defines a bundle file that contains a collection of assets.
Mesh, Material, MeshSkin, Animation There are two types of bundle files, c3t and c3b. c3t text file c3b binary file
|
protectedvirtual |
|
static |
|
virtual |
|
static |
|
static |
|
protected |
|
virtual |
load a file.
You must load a file first, then call loadMeshData, loadSkinData, and so on
| path | File to be loaded |
|
virtual |
load material data from bundle
| id | The ID of the animation, load the first animation in the bundle if it is empty |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
virtual |
|
protected |
load nodes of binary
|
protected |
load nodes of json
|
static |
|
virtual |
load skin data from bundle
| id | The ID of the skin, load the first Skin in the bundle if it is empty |
|
protected |
|
protected |
|
protected |
get vertex attribute type
| str | The type in string |
|
protected |
get define data type
| str | The type in string |
|
protected |
get define data type
| str | The type in string |
|
protected |
|
protected |
|
protected |
|
static |
you can define yourself bundle and set it, use default bundle otherwise
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |