From bd0027e737c6512397f841c22786274ed74b927f Mon Sep 17 00:00:00 2001 From: Ben Marsh Date: Tue, 22 Oct 2019 09:07:59 -0400 Subject: Adding Shave-and-a-Haircut 9.6 --- mayaPlug/shaveAPIimpl.h | 82 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 mayaPlug/shaveAPIimpl.h (limited to 'mayaPlug/shaveAPIimpl.h') diff --git a/mayaPlug/shaveAPIimpl.h b/mayaPlug/shaveAPIimpl.h new file mode 100644 index 0000000..60f3164 --- /dev/null +++ b/mayaPlug/shaveAPIimpl.h @@ -0,0 +1,82 @@ +#ifndef shaveAPIimpl_h +#define shaveAPIimpl_h +// Shave and a Haircut +// (c) 2019 Epic Games +// US Patent 6720962 + +#include +#include + +#include "libShave.h" +#include "shaveAPI.h" +#include "shaveGlobals.h" +#include "shaveSDK.h" + +#if MAYA_API_VERSION < 20180000 +class MObjectArray; +#endif + +class shaveHairShape; + + +class LIBSHAVE_API shaveAPIimpl +{ +public: + static MStatus clearHairStack(); + + static MStatus createHairStack( + MObjectArray& shaveHairShapes, + const shaveGlobals::Globals& globals + ); + + static MStatus exportAllHair( + shaveAPI::HairInfo* hairInfo, bool renderableOnly + ); + + static MStatus exportDRAFile(MString filename); + + static MStatus exportHair( + MObjectArray& shaveHairShapes, + shaveAPI::HairInfo* hairInfo + ); + + static MStatus exportOcclusions( + shaveAPI::SceneGeom* hairOcclusions, + shaveAPI::SceneGeom* shadowOcclusions + ); + + static void freeHairInfo(shaveAPI::HairInfo* hairInfo); + static void initHairInfo(shaveAPI::HairInfo* hairInfo); + + //****************************************** + // + // SceneGeom Interfaces + // + //****************************************** + static void freeSceneGeom(shaveAPI::SceneGeom* sceneGeom); + static void initSceneGeom(shaveAPI::SceneGeom* sceneGeom); + + //****************************************** + // + // Utility Methods + // + //****************************************** + static void copyWFTYPEToSceneGeom( + shaveAPI::SceneGeom* sceneGeom, WFTYPE& wf + ); + + static shaveHairShape* getNodeFromStack(unsigned int nodeIndex); + +protected: + static std::vector mShaveNodes; + + static MStatus doExport( + MObjectArray& shaveHairShapes, + shaveAPI::HairInfo* hairInfo, + const shaveGlobals::Globals& globals + ); + + static MStatus doInitHairIterator(MObjectArray& shaveHairShapes); +}; + +#endif -- cgit v1.2.3