-
Notifications
You must be signed in to change notification settings - Fork 60
/
OutputObject.C
52 lines (42 loc) · 1.02 KB
/
OutputObject.C
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
#include <maya/MEulerRotation.h>
#include <maya/MFnArrayAttrsData.h>
#include <maya/MFnMesh.h>
#include <maya/MFnMeshData.h>
#include <maya/MQuaternion.h>
#include "Asset.h"
#include "OutputGeometryObject.h"
#include "OutputInstancerObject.h"
#include "OutputObject.h"
#include "util.h"
OutputObject *
OutputObject::createObject(HAPI_NodeId nodeId)
{
HAPI_Result hapiResult;
HAPI_ObjectInfo objectInfo;
hapiResult = HAPI_GetObjectInfo(
Util::theHAPISession.get(), nodeId, &objectInfo);
CHECK_HAPI(hapiResult);
OutputObject *obj;
if (objectInfo.isInstancer)
obj = new OutputInstancerObject(nodeId);
else
{
obj = new OutputGeometryObject(nodeId);
}
return obj;
}
OutputObject::~OutputObject() {}
OutputObject::OutputObject(HAPI_NodeId nodeId)
: myNodeId(nodeId), myLastCookCount(0)
{
}
void
OutputObject::setObjectInfo(const HAPI_ObjectInfo &objectInfo)
{
myObjectInfo = objectInfo;
}
bool
OutputObject::isVisible() const
{
return myObjectInfo.isVisible;
}