apiMeshCreator.h
#ifndef _apiMeshCreator
#define _apiMeshCreator
#include <maya/MPxNode.h>
#include <maya/MTypeId.h>
#include <maya/MPointArray.h>
#include <maya/MIntArray.h>
#include <maya/MVectorArray.h>
#include <maya/MDoubleArray.h> 
class apiMeshGeomUV; 
class apiMeshCreator : public MPxNode
{
public:
        apiMeshCreator();
        virtual ~apiMeshCreator(); 
        
        
        
    virtual MStatus             compute( const MPlug& plug, MDataBlock& data );
        
        
        
        static  void *          creator();
        static  MStatus         initialize();
        MStatus                                 computeInputMesh( const MPlug& plug,
                                                                                          MDataBlock& datablock,
                                                                                          MPointArray& vertices,
                                                                                          MIntArray& counts,
                                                                                          MIntArray& connects,
                                                                                          MVectorArray& normals,
                                                                                          apiMeshGeomUV &uvs ); 
        void                                    buildCube( double cube_size,
                                                                           MPointArray& pa,
                                                                           MIntArray& faceCounts,
                                                                           MIntArray& faceConnects,
                                                                           MVectorArray& normals,
                                                                           apiMeshGeomUV& uvs ); 
        void                                    buildSphere( double radius,
                                                                                 int divisions,
                                                                                 MPointArray& pa,
                                                                                 MIntArray& faceCounts,
                                                                                 MIntArray& faceConnects,
                                                                                 MVectorArray& normals, 
                                                                                 apiMeshGeomUV& uvs ); 
public:
    
    
    
    static      MObject                 size;
        static  MObject                 shapeType;
    static      MObject                 inputMesh;
        static  MObject         outputSurface;
        
public: 
        static  MTypeId         id;
};
#endif