#ifndef _STS_ // Shave and a Haircut // (c) 2019 Epic Games // US Patent 6720962 #include #include #include #include #include #include #include "shaveSDK.h" #if MAYA_API_VERSION < 20180000 class MDataBlock; #endif class shaveHairShape; #define PER_NODE_TEXLOOKUP typedef struct { shaveHairShape* node; int count; VERT** displacement; int maxIndex[SHAVE_NUM_PARAMS]; int maxPasses; bool textured[SHAVE_NUM_PARAMS]; float*** textureLookup; float** u; float** v; } NODETEXINFO; typedef struct { float* us; float* vs; int passes; char* uvset; } HAIRUVS; bool IsBuildingLookups(); float applyVertTexValue( long shaveID, int vertID, int paramID, float baseValue ); unsigned int findObjectIndex(int, MIntArray); MStatus freeTextureLookup(void); MStatus freeTextureLookup(NODETEXINFO* lookup); void getDisplacement( MDagPath& surface, CURVEINFO& ci, VERT& rootPos, float rootU, float rootV, int surfaceStartFaceIndex, VERT& displacement ); NODETEXINFO* getTexInfoLookup(unsigned nodeID); void initTexInfoLookup( const MObjectArray& shaveNodes, MString defaultUVSet, bool verbose, bool displayHairsOnly = false ); void initTexInfoLookup2( const MObjectArray& shaveNodes, MString defaultUVSet, bool verbose, bool displayHairsOnly = false, MObject onlythis = MObject() ); void initVertTexInfoLookup( shaveHairShape* sNode, MObject node, MDataBlock* block=NULL ); void initVertTexInfoLookup(MObjectArray& shaveNodes); MStatus shaveConnectNode(MString, MString, int, MStringArray&); MStatus tesselateGrowthSurfaces( const MDagPathArray& growthSurfaces, short uTess, short vTess, short sDept, short sSamp ); class ShavePreprocTex : public MPxCommand { public: ShavePreprocTex() {}; virtual ~ShavePreprocTex(); MStatus doIt( const MArgList& args ); static void* createCmd(); static MSyntax createSyntax(); static const MString commandName; }; #define _STS_ #endif