aboutsummaryrefslogtreecommitdiff
path: root/mayaPlug/shaveItHairImpl.h
blob: caaad1bf68a816217e682b5a8757a7d77ab1c2a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef shaveItHairImpl_h
#define shaveItHairImpl_h
// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962

#include <maya/MFloatArray.h>
#include <maya/MObjectArray.h>
#include <maya/MStatus.h>

#include "libShave.h"
#include "shaveAPI.h"
#include "shaveConstant.h"

class shaveRenderer;


class LIBSHAVE_API shaveItHairImpl
{
public:
	static MStatus	clear();
	static MStatus	init(bool instances, bool renderableOnly);
	static MStatus	init(bool instances, MObjectArray& shaveNodes);
	static MStatus	nextHair(shaveAPI::HairInfo* hairInfo);
	static MStatus	nextHairCounts(shaveAPI::HairInfo* hairInfo);
	static MStatus	reset();

protected:
	static bool							mDoingInstances;
	static shaveConstant::RenderMode	mHairRenderMode;
	static MFloatArray					mInstanceUs;
	static MFloatArray					mInstanceVs;
	static int							mLastNodeIndex;
	static shaveRenderer*				mRenderer;

	static MStatus	doInit(bool instances, MObjectArray& shaveNodes);
};

#endif