Defines a bundle file that contains a collection of assets. More...
Public Member Functions | |
virtual void | clear () |
Clear the Bundle3D object's buffer. | |
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 animation data from bundle The ID of the animation, load the first animation in the bundle if it is empty The Animation3DData which you need. More... | |
Static Public Member Functions | |
static Bundle3D * | createBundle () |
Create a new bundle, destroy it when finish using it The Bundle3D object. | |
static void | destroyBundle (Bundle3D *bundle) |
Destroy the specified Bundle3D object. | |
static std::vector< Vec3 > | getTrianglesList (const std::string &path) |
Load triangle list The file path to load. More... | |
static bool | loadObj (MeshDatas &meshdatas, MaterialDatas &materialdatas, NodeDatas &nodedatas, const std::string &fullPath, const char *mtl_basepath=nullptr) |
Load .obj format. More... | |
static AABB | calculateAABB (const std::vector< float > &vertex, int stride, const std::vector< unsigned short > &index) |
Calculate the AABB. More... | |
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
|
virtual |
Load a file.
You must load a file first, then call loadMeshData, loadSkinData, and so on File to be loaded result of load
|
virtual |
load skin data from bundle.
The ID of the skin, load the first Skin in the bundle if it is empty. the SkinData which you need. Result of the load.
|
virtual |
Load animation data from bundle The ID of the animation, load the first animation in the bundle if it is empty The Animation3DData which you need.
Result of the load
|
static |
Load triangle list The file path to load.
The std::vector which contatin triangles.
|
static |
Load .obj format.
The mesh datas. The materialdatas. The node data. The .obj file path. The material base path. The result of the load.
|
static |
Calculate the AABB.
Vertices list. The stride of the element. The indices list.