forked from Toolchefs/harmonicDeformer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
harmonicDeformer.h
54 lines (33 loc) · 900 Bytes
/
harmonicDeformer.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include <maya/MPxDeformerNode.h>
#include <vector>
#include <map>
class HarmonicDeformer : public MPxDeformerNode
{
public:
HarmonicDeformer();
virtual ~HarmonicDeformer();
virtual void postConstructor();
static void* creator();
static MStatus initialize();
// deformation function
//
virtual MStatus compute(const MPlug& plug, MDataBlock& dataBlock);
MStatus setDependentsDirty(const MPlug &plugBeingDirtied, MPlugArray &affectedPlugs);
public:
// local node attributes
static MTypeId id;
static MObject m_refCage;
static MObject m_cage;
static MObject m_gridData;
static MObject m_cellSize;
static MObject m_maxIteration;
static MObject m_pointWeights;
static MObject m_threshold;
static MObject m_dynamicBinding;
private:
bool m_toBind;
bool m_weightsUpdated;
bool m_gridUpdated;
std::vector<std::map<unsigned int, double> > m_weights;
};