// Shave and a Haircut // (c) 2019 Epic Games // US Patent 6720962 #include "translators/shape/ShapeTranslator.h" #include "utils/Version.h" #include "shaveAPI.h" #include "shaveItHair.h" class CShaveTranslator : public CShapeTranslator { public: virtual void Export(AtNode* camera); #if (MTOA_ARCH_VERSION_NUM < 2) virtual void Update(AtNode* curve); virtual void ExportMotion(AtNode* curve, unsigned int step); #else virtual void ExportMotion(AtNode* curve); #endif static void NodeInitializer(CAbTranslator context); AtNode* CreateArnoldNodes(); static void* creator() { return new CShaveTranslator(); } private: AtNode* CreateShaveShader(AtNode* curve); void ProcessHairLines(const unsigned int step, AtArray* curvePoints, AtArray* curveNumPoints, AtArray* curveWidths); #if (MTOA_ARCH_VERSION_NUM >= 2) void Update(AtNode* curve); #endif MStatus UpdateHairInfo(); shaveAPI::HairInfo m_hairInfo; };