//- // ========================================================================== // 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. // ========================================================================== //+ /////////////////////////////////////////////////////////////////////////////// // // Provides a data type for some arbitrary user geometry. // // A users geometry class can exist in the DAG by creating an // MPxSurfaceShape (and UI) class for it and can also be passed through // DG connections by creating an MPxGeometryData class for it. // // MPxGeometryData is the same as MPxData except it provides // additional methods to modify the geometry data via an iterator. // /////////////////////////////////////////////////////////////////////////////// #ifndef _apiMeshData #define _apiMeshData #include #include #include #include class apiMeshData : public MPxGeometryData { public: ////////////////////////////////////////////////////////////////// // // Overrides from MPxData // ////////////////////////////////////////////////////////////////// apiMeshData(); virtual ~apiMeshData(); virtual MStatus readASCII( const MArgList& argList, unsigned& idx ); virtual MStatus readBinary( istream& in, unsigned length ); virtual MStatus writeASCII( ostream& out ); virtual MStatus writeBinary( ostream& out ); virtual void copy ( const MPxData& ); virtual MTypeId typeId() const; virtual MString name() const; ////////////////////////////////////////////////////////////////// // // Overrides from MPxGeometryData // ////////////////////////////////////////////////////////////////// virtual MPxGeometryIterator* iterator( MObjectArray & componentList, MObject & component, bool useComponents); virtual MPxGeometryIterator* iterator( MObjectArray & componentList, MObject & component, bool useComponents, bool world) const; virtual bool updateCompleteVertexGroup( MObject & component ) const; ////////////////////////////////////////////////////////////////// // // Helper methods // ////////////////////////////////////////////////////////////////// MStatus readVerticesASCII( const MArgList&, unsigned& ); MStatus readNormalsASCII( const MArgList&, unsigned& ); MStatus readFacesASCII( const MArgList&, unsigned& ); MStatus writeVerticesASCII( ostream& out ); MStatus writeNormalsASCII( ostream& out ); MStatus writeFacesASCII( ostream& out ); static void * creator(); public: static const MString typeName; static const MTypeId id; // This is the geometry our data will pass though the DG // apiMeshGeom* fGeometry; }; #endif /* apimeshData */