Cocos 3D POD file format for iphone developing

拈花ヽ惹草 提交于 2019-12-07 08:34:19

问题


I am new in cocos 3d developing.

I have used cocos-2d for iphone and ipad, in which we have to used .png file for UI.
But in this Cocos-3d programming, .POD file format have been used. I don't know about POD file format and how to access that node name from .POD file?


回答1:


You need to use some 3D software like Blender (Open Source), Maya or 3D Max to make some 3D objects and export it as DAE file format and by using Collada2POD translate this file to POD file format. Now you are ready to use Cocos3D. If it is complicated for you, ask another question in detail!

I hope it useful for you!




回答2:


I'm not sure about the Cocos3D implementation, but you can get at the node name via the CPVRTModelPOD class imgtec provides with their SDK.

CPVRTModelPOD model;
model.ReadFromFile("path/to/model");
for(int i=0; i<model.nNumMeshNode; i++) {
    SPODNode *node = &model.pNode[i];
    int mesh_idx = node->nIdx;
    printf("%d (%d): %s\n", i, mesh_idx, node->pszName);
}

All of the nodes (mesh, lights, camera, etc), are all together in that pNode list, but the mesh nodes will be grouped at the beginning.

I haven't looked into Cocos3D, but i'm assuming they use the code that imgtec distributes from here.



来源:https://stackoverflow.com/questions/5271197/cocos-3d-pod-file-format-for-iphone-developing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!