Cocos2d-x  v4
Bundle3D Class Reference

Defines a bundle file that contains a collection of assets. More...

Public Member Functions

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...
 

Static Public Member Functions

static Bundle3DcreateBundle ()
 create a new bundle, destroy it when finish using it
 
static backend::VertexFormat parseGLDataType (const std::string &str, int size)
 get define data type More...
 
static backend::SamplerAddressMode parseSamplerAddressMode (const std::string &str)
 get define data type More...
 
static std::vector< Vec3getTrianglesList (const std::string &path)
 load triangle list More...
 

Detailed Description

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 @js NA @lua NA

Member Function Documentation

◆ parseGLDataType()

static backend::VertexFormat parseGLDataType ( const std::string &  str,
int  size 
)
static

get define data type

Parameters
strThe type in string

◆ parseSamplerAddressMode()

static backend::SamplerAddressMode parseSamplerAddressMode ( const std::string &  str)
static

get define data type

Parameters
strThe type in string

◆ load()

virtual bool load ( const std::string &  path)
virtual

load a file.

You must load a file first, then call loadMeshData, loadSkinData, and so on

Parameters
pathFile to be loaded
Returns
result of load

◆ loadSkinData()

virtual bool loadSkinData ( const std::string &  id,
SkinData skindata 
)
virtual

load skin data from bundle

Parameters
idThe ID of the skin, load the first Skin in the bundle if it is empty

◆ loadAnimationData()

virtual bool loadAnimationData ( const std::string &  id,
Animation3DData animationdata 
)
virtual

load material data from bundle

Parameters
idThe ID of the animation, load the first animation in the bundle if it is empty

◆ getTrianglesList()

static std::vector<Vec3> getTrianglesList ( const std::string &  path)
static

load triangle list

Parameters
paththe file path to load

The documentation for this class was generated from the following file: