我是Objective C的新手,我正在尝试使用Cocos3d创建一些3d模型,我找到了这个文档:
/**
* This CC3Mesh extension adds a number of methods for populating the mesh of
* a mesh programatically to create various parametric shapes and surfaces.
*
* To use the methods in this extension, instantiate a CC3Mesh, and then invoke one of
* the methods in this extension to populate the mesh vertices.
*/
@interface CC3Mesh (ParametricShapes)
这就是我想调用的方法:
-(void) populateAsTriangle: (CC3Face) face
withTexCoords: (ccTex2F*) texCoords
andTessellation: (GLuint) divsPerSide;
现在我有这个:
NSString *meshName = [NSString stringWithFormat:@"%@",
[vertex objectForKey:@"meshName"]];
CC3Mesh *mesh = [[CC3Mesh alloc] initWithName:meshName];
现在,如何从我的 *mesh 对象调用该方法填充为三角形?
谢谢。
确保导入引用的CC3Mesh
扩展名所在的文件:
#import "CC3ParametricMeshes.h"