HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SOP_UVPelt-2.0.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: SOP library (C++)
7
*
8
* COMMENTS: Pelt SOP
9
*/
10
11
12
#ifndef __SOP_UVPelt2_h__
13
#define __SOP_UVPelt2_h__
14
15
#include "
SOP_API.h
"
16
17
#include <
GU/GU_Pelt.h
>
18
19
#include "
SOP_Node.h
"
20
21
namespace
sop_uvpelt2_private {
22
enum
23
{
24
SOP_PELT2_UVATTRIB_INDEX
= 0,
25
SOP_PELT2_GROUP_INDEX
,
26
SOP_PELT2_PELTINGMETHOD_INDEX
,
27
SOP_PELT2_OUTPUTTOGGLE_INDEX
,
28
SOP_PELT2_OUTPUTGROUP_INDEX
,
29
SOP_PELT2_SWITCHER_INDEX
,
30
#define SOP_PELT2_NUM_PELT_PARMS 4
31
SOP_PELT2_ITERATIONS_INDEX
,
32
SOP_PELT2_SPRINGCONSTANT_INDEX
,
33
SOP_PELT2_TENSION_INDEX
,
34
SOP_PELT2_HINTPOLY_INDEX
,
35
#define SOP_PELT2_NUM_FRAME_PARMS 8
36
SOP_PELT2_FRAME_INDEX
,
37
SOP_PELT2_UFROM_INDEX
,
38
SOP_PELT2_VFROM_INDEX
,
39
SOP_PELT2_USERANGE_INDEX
,
40
SOP_PELT2_URANGE_INDEX
,
41
SOP_PELT2_VRANGE_INDEX
,
42
SOP_PELT2_ORIENTATION_INDEX
,
43
SOP_PELT2_DENSITY_INDEX
44
};
45
}
46
47
using namespace
sop_uvpelt2_private;
48
49
class
SOP_API
SOP_UVPelt2
:
public
SOP_Node
50
{
51
public
:
52
SOP_UVPelt2
(
OP_Network
*net,
const
char
*
name
,
OP_Operator
*op);
53
~SOP_UVPelt2
()
override
54
{
55
}
56
57
int
isRefInput(
unsigned
int
i)
const override
;
58
59
// This method is created so that it can be called by handles. It only
60
// cooks the input group of this SOP. The geometry in this group is
61
// the only geometry manipulated by this SOP.
62
OP_ERROR
cookInputGroups(
OP_Context
&context,
63
int
alone = 0)
override
;
64
bool
updateParmsFlags()
override
;
65
66
static
PRM_Template
myTemplateList[];
67
static
OP_Node
*myConstructor(
OP_Network
*,
const
char
*,
68
OP_Operator
*);
69
70
UT_Array<GU_Pelt::FramePoint>
&getFrame(
int
&metacachecount);
71
72
void
getDescriptiveParmName
(
UT_String
&name)
const override
73
{
74
name =
"uvattrib"
;
75
}
76
77
protected
:
78
const
char
*inputLabel(
unsigned
idx)
const override
;
79
80
// Method to cook geometry for the SOP
81
OP_ERROR
cookMySop(
OP_Context
&context)
override
;
82
83
void
pelt(
OP_Context
&context,
84
const
GA_EdgeGroup
*group,
85
const
GEO_Face
*frame,
86
bool
(*callback_func)(
void
*),
87
void
*callback_data);
88
89
private
:
90
bool
OUTPUTTOGGLE()
91
{
return
evalInt(
SOP_PELT2_OUTPUTTOGGLE_INDEX
, 0, 0) != 0; }
92
void
OUTPUTGROUP(
UT_String
&str)
93
{
return
evalString(str,
SOP_PELT2_OUTPUTGROUP_INDEX
, 0, 0); }
94
int
METHODTYPE()
95
{
return
evalInt(
SOP_PELT2_PELTINGMETHOD_INDEX
, 0, 0); }
96
int
ITERATIONS()
97
{
return
evalInt(
SOP_PELT2_ITERATIONS_INDEX
, 0, 0); }
98
float
SPRINGCONSTANT(
fpreal
t
)
99
{
return
evalFloat(
SOP_PELT2_SPRINGCONSTANT_INDEX
, 0, t); }
100
int
HINTPOLY()
101
{
return
evalInt(
SOP_PELT2_HINTPOLY_INDEX
, 0, 0); }
102
int
UFROM()
103
{
return
evalInt(
SOP_PELT2_UFROM_INDEX
, 0, 0); }
104
int
VFROM()
105
{
return
evalInt(
SOP_PELT2_VFROM_INDEX
, 0, 0); }
106
bool
USERANGE()
107
{
return
evalInt(
SOP_PELT2_USERANGE_INDEX
, 0, 0) != 0; }
108
float
MINU(
fpreal
t
)
109
{
return
evalFloat(
SOP_PELT2_URANGE_INDEX
, 0, t); }
110
float
MAXU(
fpreal
t
)
111
{
return
evalFloat(
SOP_PELT2_URANGE_INDEX
, 1, t); }
112
float
MINV(
fpreal
t
)
113
{
return
evalFloat(
SOP_PELT2_VRANGE_INDEX
, 0, t); }
114
float
MAXV(
fpreal
t
)
115
{
return
evalFloat(
SOP_PELT2_VRANGE_INDEX
, 1, t); }
116
float
ORIENTATION()
117
{
return
evalFloat(
SOP_PELT2_ORIENTATION_INDEX
, 0, 0); }
118
119
// This is the group of geometry to be manipulated by this SOP and cooked
120
// by the method "cookInputGroups".
121
const
GA_EdgeGroup
*myGroup;
122
const
GEO_Face
*myFrame;
123
int
myFrameMetaCacheCount;
124
UT_Array<GU_Pelt::FramePoint>
myFramePoints;
125
int
myFramePointCount;
126
};
127
128
#endif
sop_uvpelt2_private::SOP_PELT2_URANGE_INDEX
Definition:
SOP_UVPelt-2.0.h:40
sop_uvpelt2_private::SOP_PELT2_UFROM_INDEX
Definition:
SOP_UVPelt-2.0.h:37
GEO_Face
Definition:
GEO_Face.h:36
sop_uvpelt2_private::SOP_PELT2_ITERATIONS_INDEX
Definition:
SOP_UVPelt-2.0.h:31
UT_ErrorSeverity
UT_ErrorSeverity
Definition:
UT_Error.h:25
PRM_Template
Definition:
PRM_Template.h:49
UT_Array< GU_Pelt::FramePoint >
SOP_API.h
sop_uvpelt2_private::SOP_PELT2_PELTINGMETHOD_INDEX
Definition:
SOP_UVPelt-2.0.h:26
OP_Context
Definition:
OP_Context.h:44
sop_uvpelt2_private::SOP_PELT2_USERANGE_INDEX
Definition:
SOP_UVPelt-2.0.h:39
sop_uvpelt2_private::SOP_PELT2_UVATTRIB_INDEX
Definition:
SOP_UVPelt-2.0.h:24
OP_Operator
Definition:
OP_Operator.h:142
OP_Node
Definition:
OP_Node.h:503
SOP_UVPelt2::getDescriptiveParmName
void getDescriptiveParmName(UT_String &name) const override
Definition:
SOP_UVPelt-2.0.h:72
name
GLuint const GLchar * name
Definition:
glcorearb.h:786
sop_uvpelt2_private::SOP_PELT2_FRAME_INDEX
Definition:
SOP_UVPelt-2.0.h:36
sop_uvpelt2_private::SOP_PELT2_DENSITY_INDEX
Definition:
SOP_UVPelt-2.0.h:43
t
GLdouble t
Definition:
glad.h:2397
sop_uvpelt2_private::SOP_PELT2_GROUP_INDEX
Definition:
SOP_UVPelt-2.0.h:25
sop_uvpelt2_private::SOP_PELT2_HINTPOLY_INDEX
Definition:
SOP_UVPelt-2.0.h:34
SOP_UVPelt2::~SOP_UVPelt2
~SOP_UVPelt2() override
Definition:
SOP_UVPelt-2.0.h:53
sop_uvpelt2_private::SOP_PELT2_VFROM_INDEX
Definition:
SOP_UVPelt-2.0.h:38
sop_uvpelt2_private::SOP_PELT2_VRANGE_INDEX
Definition:
SOP_UVPelt-2.0.h:41
GU_Pelt.h
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:277
sop_uvpelt2_private::SOP_PELT2_OUTPUTGROUP_INDEX
Definition:
SOP_UVPelt-2.0.h:28
SOP_Node.h
GA_EdgeGroup
Definition:
GA_EdgeGroup.h:42
SOP_API
#define SOP_API
Definition:
SOP_API.h:10
sop_uvpelt2_private::SOP_PELT2_SPRINGCONSTANT_INDEX
Definition:
SOP_UVPelt-2.0.h:32
UT_String
Definition:
UT_String.h:73
sop_uvpelt2_private::SOP_PELT2_SWITCHER_INDEX
Definition:
SOP_UVPelt-2.0.h:29
sop_uvpelt2_private::SOP_PELT2_OUTPUTTOGGLE_INDEX
Definition:
SOP_UVPelt-2.0.h:27
OP_Network
Definition:
OP_Network.h:152
SOP_UVPelt2
Definition:
SOP_UVPelt-2.0.h:49
sop_uvpelt2_private::SOP_PELT2_ORIENTATION_INDEX
Definition:
SOP_UVPelt-2.0.h:42
SOP_Node
Definition:
SOP_Node.h:108
sop_uvpelt2_private::SOP_PELT2_TENSION_INDEX
Definition:
SOP_UVPelt-2.0.h:33
SOP
SOP_UVPelt-2.0.h
Generated on Tue Dec 17 2024 03:41:57 for HDK by
1.8.6