-
Notifications
You must be signed in to change notification settings - Fork 1
/
ConvexHull.h
63 lines (42 loc) · 2.08 KB
/
ConvexHull.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
55
56
57
58
59
60
61
62
63
/* Shared Use License: This file is owned by Derivative Inc. (Derivative)
* and can only be used, and/or modified for use, in conjunction with
* Derivative's TouchDesigner software, and only if you are a licensee who has
* accepted Derivative's TouchDesigner license or assignment agreement
* (which also govern the use of this file). You may share or redistribute
* a modified version of this file provided the following conditions are met:
*
* 1. The shared file or redistribution must retain the information set out
* above and this list of conditions.
* 2. Derivative's name (Derivative Inc.) or its trademarks may not be used
* to endorse or promote products derived from this file without specific
* prior written permission from Derivative.
*/
#pragma once
#include "SOP_CPlusPlusBase.h"
#include <string>
#include "quickhull/QuickHull.hpp"
// To get more help about these functions, look at SOP_CPlusPlusBase.h
class ConvexHull : public SOP_CPlusPlusBase
{
public:
ConvexHull(const OP_NodeInfo* info);
virtual ~ConvexHull();
virtual void getGeneralInfo(SOP_GeneralInfo*, const OP_Inputs*, void* reserved1) override;
virtual void execute(SOP_Output*, const OP_Inputs*, void* reserved) override;
virtual void executeVBO(SOP_VBOOutput* output, const OP_Inputs* inputs,
void* reserved) override;
virtual int32_t getNumInfoCHOPChans(void* reserved) override;
virtual void getInfoCHOPChan(int index, OP_InfoCHOPChan* chan, void* reserved) override;
virtual bool getInfoDATSize(OP_InfoDATSize* infoSize, void* reserved) override;
virtual void getInfoDATEntries(int32_t index, int32_t nEntries,
OP_InfoDATEntries* entries,
void* reserved) override;
virtual void setupParameters(OP_ParameterManager* manager, void* reserved) override;
virtual void pulsePressed(const char* name, void* reserved) override;
private:
// We don't need to store this pointer, but we do for the example.
// The OP_NodeInfo class store information about the node that's using
// this instance of the class (like its name).
const OP_NodeInfo* myNodeInfo;
quickhull::QuickHull<float> qh;
};