forked from sideeffects/HoudiniEngineForMaya
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInput.h
More file actions
81 lines (61 loc) · 1.75 KB
/
Input.h
File metadata and controls
81 lines (61 loc) · 1.75 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef __Input_h__
#define __Input_h__
#include <vector>
#include <maya/MDataBlock.h>
#include <maya/MDataHandle.h>
#include <HAPI/HAPI_Common.h>
class Input;
class Inputs
{
public:
Inputs(HAPI_NodeId nodeId);
~Inputs();
MStatus compute(MDataBlock &dataBlock);
void setNumInputs(int numInputs);
private:
HAPI_NodeId myNodeId;
typedef std::vector<Input*> AssetInputVector;
AssetInputVector myAssetInputs;
};
class Input
{
public:
enum AssetInputType
{
AssetInputType_Invalid,
AssetInputType_Mesh,
AssetInputType_Curve,
AssetInputType_Particle,
};
static Input* createAssetInput(AssetInputType assetInputType);
static void setInputName(
HAPI_NodeId inputNodeId,
HAPI_PartId inputPartId,
HAPI_AttributeOwner owner, int count,
const MPlug &plug
);
public:
Input();
virtual ~Input();
virtual AssetInputType assetInputType() const = 0;
HAPI_NodeId transformNodeId() const { return myTransformNodeId; };
HAPI_NodeId geometryNodeId() const { return myGeometryNodeId; };
void setInputTransform(MDataHandle &dataHandle);
virtual void setInputGeo(
MDataBlock &dataBlock,
const MPlug &plug
) = 0;
protected:
void setTransformNodeId( HAPI_NodeId nodeId )
{
myTransformNodeId = nodeId;
};
void setGeometryNodeId( HAPI_NodeId nodeId )
{
myGeometryNodeId = nodeId;
};
private:
HAPI_NodeId myTransformNodeId;
HAPI_NodeId myGeometryNodeId;
};
#endif