forked from sideeffects/HoudiniEngineForMaya
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOutputGeometryPart.h
More file actions
110 lines (95 loc) · 2.99 KB
/
OutputGeometryPart.h
File metadata and controls
110 lines (95 loc) · 2.99 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef __OutputGeometryPart_h__
#define __OutputGeometryPart_h__
#include <maya/MIntArray.h>
#include <maya/MFloatPointArray.h>
#include <maya/MFloatArray.h>
#include <maya/MFnArrayAttrsData.h>
#include <maya/MVectorArray.h>
#include <maya/MString.h>
class Asset;
class OutputGeometryPart
{
public:
OutputGeometryPart(
HAPI_NodeId nodeId,
HAPI_PartId partId
);
~OutputGeometryPart();
MStatus compute(
const MTime &time,
MDataHandle& handle,
bool hasMaterialChanged,
bool &needToSyncOutputs
);
protected:
void update();
private:
void computeMaterial(
const MTime &time,
MDataHandle &materialHandle
);
void computeMesh(
const MTime &time,
MDataHandle &hasMeshHandle,
MDataHandle &meshHandle
);
void computeParticle(
const MTime &time,
MDataHandle &hasParticlesHandle,
MDataHandle &particleHandle
);
void computeCurves(
const MTime &time,
MDataHandle &curvesHandle,
MDataHandle &curvesIsBezierHandle
);
void computeVolume(
const MTime &time,
MDataHandle &volumeHandle
);
void computeVolumeTransform(
const MTime &time,
MDataHandle &volumeTransformHandle
);
void computeInstancer(
const MTime &time,
MDataHandle &hasInstancerHandle,
MDataHandle &instanceHandle
);
void computeExtraAttributes(
const MTime &time,
MDataHandle &extraAttributesHandle
);
void computeGroups(
const MTime &time,
MDataHandle &extraAttributesHandle
);
template<typename T>
bool getAttributeData(
std::vector<T> &array,
const char* name,
HAPI_AttributeOwner owner
);
template<typename T>
void convertParticleAttribute(
T arrayDataFn,
const char* houdiniName
);
bool computeExtraAttribute(
MDataHandle &dataHandle,
HAPI_AttributeOwner attributeOwner,
const char* attributeName
);
void markAttributeUsed(const std::string &attributeName);
bool isAttributeUsed(const std::string &attributeName);
void clearAttributesUsed();
private:
HAPI_NodeId myNodeId;
HAPI_PartId myPartId;
std::vector<std::string> myAttributesUsed;
HAPI_GeoInfo myGeoInfo;
HAPI_PartInfo myPartInfo;
HAPI_VolumeInfo myVolumeInfo;
HAPI_CurveInfo myCurveInfo;
};
#endif