#ifndef _meshOpFty #define _meshOpFty //- // ========================================================================== // Copyright (C) 1995 - 2005 Alias Systems Corp. and/or its licensors. All // rights reserved. // // The coded instructions, statements, computer programs, and/or related // material (collectively the "Data") in these files are provided by Alias // Systems Corp. ("Alias") and/or its licensors for the exclusive use of the // Customer (as defined in the Alias Software License Agreement that // accompanies this Alias software). Such Customer has the right to use, // modify, and incorporate the Data into other products and to distribute such // products for use by end-users. // // THE DATA IS PROVIDED "AS IS". ALIAS HEREBY DISCLAIMS ALL WARRANTIES // RELATING TO THE DATA, INCLUDING, WITHOUT LIMITATION, ANY AND ALL EXPRESS OR // IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND/OR FITNESS FOR A // PARTICULAR PURPOSE. IN NO EVENT SHALL ALIAS BE LIABLE FOR ANY DAMAGES // WHATSOEVER, WHETHER DIRECT, INDIRECT, SPECIAL, OR PUNITIVE, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, OR IN EQUITY, // ARISING OUT OF ACCESS TO, USE OF, OR RELIANCE UPON THE DATA. // ========================================================================== //+ // // *************************************************************************** // // Overview: // // The meshOp factory implements the actual meshOperation operation. // It takes in three parameters: // // 1) A polygonal mesh // 2) An array of component IDs // 3) A mesh operation identifier // // Please refer to MFnMeshOperations to get more information on the different // mesh operations. // #include "polyModifierFty.h" // General Includes // #include #include #include class MFnMesh; enum MeshOperation { kSubdivideEdges = 0, kSubdivideFaces = 1, kExtrudeEdges = 2, kExtrudeFaces = 3, kCollapseEdges = 4, kCollapseFaces = 5, kDuplicateFaces = 6, kExtractFaces = 7, kSplitLightning = 8, // Number of valid operations kMeshOperationCount = 9 }; class meshOpFty : public polyModifierFty { public: meshOpFty(); virtual ~meshOpFty(); // Modifiers // void setMesh( MObject& mesh ); void setComponentList( MObject& componentList ); void setComponentIDs( MIntArray& componentIDs ); void setMeshOperation( MeshOperation operationType ); // Returns the type of component expected by a given mesh operation // static MFn::Type getExpectedComponentType( MeshOperation operationType ); // polyModifierFty inherited methods // MStatus doIt(); private: // Mesh Node - Note: We only make use of this MObject during a single // call of the meshOperation plugin. It is never // maintained and used between calls to the plugin as // the MObject handle could be invalidated between // calls to the plugin. // MObject fMesh; // Selected Components and Operation to execute // MIntArray fComponentIDs; MeshOperation fOperationType; MObject fComponentList; MStatus doLightningSplit(MFnMesh& meshFn); }; #endif