I ve got an c-struct array, and want to define a property. Here is the relative code..
struct Vertex {
float x, y, z;
float nx, ny, nz;
float u, v;
};
@interface Mesh : NSObject{
Vertex m_vertices[MaxVertices];
}
@property (nonatomic) Vertex m_vertices[MaxVertices];
@end
@implementation Mesh;
@synthesize m_vertices[MaxVertices];
@end
I first wrote like this with an error. how to set the property with c-struct array, or customlize the setter and getter? Any tips will be appreciated!