aboutsummaryrefslogtreecommitdiff
path: root/mayaPlug/shaveAPIimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'mayaPlug/shaveAPIimpl.h')
-rw-r--r--mayaPlug/shaveAPIimpl.h82
1 files changed, 82 insertions, 0 deletions
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 <maya/MStatus.h>
+#include <vector>
+
+#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<shaveHairShape*> mShaveNodes;
+
+ static MStatus doExport(
+ MObjectArray& shaveHairShapes,
+ shaveAPI::HairInfo* hairInfo,
+ const shaveGlobals::Globals& globals
+ );
+
+ static MStatus doInitHairIterator(MObjectArray& shaveHairShapes);
+};
+
+#endif