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_UVFlatten.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: UVFlatten SOP
9
*/
10
11
12
#ifndef __SOP_UVFlatten_h__
13
#define __SOP_UVFlatten_h__
14
15
#include "
SOP_API.h
"
16
#include <
GU/GU_Flatten.h
>
17
18
#include "
SOP_Node.h
"
19
20
class
DEP_MicroNode
;
21
22
namespace
sop_uvflatten_private {
23
enum
24
{
25
SOP_FLATTEN_PRIMGROUP_INDEX
= 0,
26
SOP_FLATTEN_SEAMGROUP_INDEX
,
27
SOP_FLATTEN_EXTRASEAMGROUP_INDEX
,
28
SOP_FLATTEN_AXISALIGNISLANDS_INDEX
,
29
SOP_FLATTEN_OPTIMIZE_WASTED_SPACE
,
30
SOP_FLATTEN_USEEXISTINGUV_INDEX
,
31
SOP_FLATTEN_ISLANDPRIM_INDEX
,
32
SOP_FLATTEN_CREATEPINGROUPS_INDEX
,
33
SOP_FLATTEN_INITIALPINGROUP_INDEX
,
34
SOP_FLATTEN_ACTIVEPINGROUP_INDEX
,
35
SOP_FLATTEN_PINGROUP_INDEX
,
36
SOP_FLATTEN_USEPINS_INDEX
,
37
SOP_FLATTEN_PINNEDPOINTS_INDEX
38
};
39
}
40
41
using namespace
sop_uvflatten_private;
42
43
class
SOP_API
SOP_UVFlatten
:
public
SOP_Node
44
{
45
public
:
46
SOP_UVFlatten
(
OP_Network
*net,
const
char
*
name
,
47
OP_Operator
*op);
48
~
SOP_UVFlatten
()
override
;
49
50
int
isRefInput(
unsigned
int
i)
const override
;
51
52
// This method is created so that it can be called by handles. It only
53
// cooks the input group of this SOP. The geometry in this group is
54
// the only geometry manipulated by this SOP.
55
OP_ERROR
cookInputGroups(
OP_Context
&context,
56
int
alone = 0)
override
;
57
OP_ERROR
cookExtraSeamsGroup(
OP_Context
&context,
58
int
alone = 0);
59
bool
updateParmsFlags()
override
;
60
61
void
syncNodeVersion(
62
const
char
*old_version,
63
const
char
*cur_version,
64
bool
*node_deleted)
override
;
65
66
static
PRM_Template
myTemplateList[];
67
static
OP_Node
*myConstructor(
OP_Network
*,
const
char
*,
OP_Operator
*);
68
69
protected
:
70
const
char
*inputLabel(
unsigned
idx)
const override
;
71
72
// Method to cook geometry for the SOP
73
OP_ERROR
cookMySop(
OP_Context
&context)
override
;
74
75
bool
mustReflattenAll(
fpreal
now);
76
bool
extraCutsChanged(
fpreal
now);
77
78
private
:
79
80
bool
UESEXISTINGUV()
81
{
return
evalInt(
SOP_FLATTEN_USEEXISTINGUV_INDEX
, 0, 0); }
82
bool
ISLANDTOGGLE()
83
{
return
evalInt(
SOP_FLATTEN_ISLANDPRIM_INDEX
, 0, 0); }
84
bool
CREATEPINGROUPS()
85
{
return
evalInt(
SOP_FLATTEN_CREATEPINGROUPS_INDEX
, 0, 0); }
86
bool
USEPINS()
87
{
return
evalInt(
SOP_FLATTEN_USEPINS_INDEX
, 0, 0); }
88
void
INITIALPINGROUP(
UT_String
&
s
)
89
{ evalString(s,
SOP_FLATTEN_INITIALPINGROUP_INDEX
, 0, 0); }
90
void
ACTIVEPINGROUP(
UT_String
&
s
)
91
{ evalString(s,
SOP_FLATTEN_ACTIVEPINGROUP_INDEX
, 0, 0); }
92
int
NUMPINNED()
93
{
return
evalInt(
"pins"
, 0, 0.0
f
); }
94
int
USEPOINT(
int
i)
95
{
return
evalIntInst(
"usepin#"
, &i, 0, 0.0
f
); }
96
fpreal
POINTVAL(
int
i,
int
vi,
fpreal
t
)
97
{
return
evalFloatInst(
"pinuv#"
, &i, vi, t); }
98
int
PRIM
(
int
i)
99
{
return
evalIntInst(
"primvert#"
, &i, 0, 0.0
f
); }
100
int
VERT(
int
i)
101
{
return
evalIntInst(
"primvert#"
, &i, 1, 0.0
f
); }
102
fpreal
U(
int
i,
fpreal
t
)
103
{
return
POINTVAL(i, 0, t); }
104
fpreal
V(
int
i,
fpreal
t
)
105
{
return
POINTVAL(i, 1, t); }
106
107
const
108
GA_PrimitiveGroup
*myGroup;
109
110
const
GA_EdgeGroup
*mySeams;
111
const
GA_EdgeGroup
*myExtraSeams;
112
113
GU_Flatten
*myFlatten;
114
DEP_MicroNode
myReflattenAllMicroNode;
115
DEP_MicroNode
myExtraCutsMicroNode;
116
bool
myCookInterrupted;
117
};
118
119
#endif
GA_PrimitiveGroup
Definition:
GA_ElementGroup.h:74
SOP_BoxEnums::Type::PRIM
s
GLdouble s
Definition:
glad.h:3009
UT_ErrorSeverity
UT_ErrorSeverity
Definition:
UT_Error.h:25
sop_uvflatten_private::SOP_FLATTEN_PINNEDPOINTS_INDEX
Definition:
SOP_UVFlatten.h:37
sop_uvflatten_private::SOP_FLATTEN_EXTRASEAMGROUP_INDEX
Definition:
SOP_UVFlatten.h:27
PRM_Template
Definition:
PRM_Template.h:49
SOP_API.h
GU_Flatten.h
OP_Context
Definition:
OP_Context.h:44
sop_uvflatten_private::SOP_FLATTEN_INITIALPINGROUP_INDEX
Definition:
SOP_UVFlatten.h:33
sop_uvflatten_private::SOP_FLATTEN_PRIMGROUP_INDEX
Definition:
SOP_UVFlatten.h:25
sop_uvflatten_private::SOP_FLATTEN_ACTIVEPINGROUP_INDEX
Definition:
SOP_UVFlatten.h:34
OP_Operator
Definition:
OP_Operator.h:142
f
GLfloat f
Definition:
glcorearb.h:1926
OP_Node
Definition:
OP_Node.h:503
SOP_UVFlatten
Definition:
SOP_UVFlatten.h:43
sop_uvflatten_private::SOP_FLATTEN_ISLANDPRIM_INDEX
Definition:
SOP_UVFlatten.h:31
name
GLuint const GLchar * name
Definition:
glcorearb.h:786
sop_uvflatten_private::SOP_FLATTEN_USEPINS_INDEX
Definition:
SOP_UVFlatten.h:36
t
GLdouble t
Definition:
glad.h:2397
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:277
sop_uvflatten_private::SOP_FLATTEN_SEAMGROUP_INDEX
Definition:
SOP_UVFlatten.h:26
SOP_Node.h
GA_EdgeGroup
Definition:
GA_EdgeGroup.h:42
SOP_API
#define SOP_API
Definition:
SOP_API.h:10
sop_uvflatten_private::SOP_FLATTEN_USEEXISTINGUV_INDEX
Definition:
SOP_UVFlatten.h:30
UT_String
Definition:
UT_String.h:73
sop_uvflatten_private::SOP_FLATTEN_AXISALIGNISLANDS_INDEX
Definition:
SOP_UVFlatten.h:28
DEP_MicroNode
Definition:
DEP_MicroNode.h:60
sop_uvflatten_private::SOP_FLATTEN_OPTIMIZE_WASTED_SPACE
Definition:
SOP_UVFlatten.h:29
GU_Flatten
Definition:
GU_Flatten.h:28
sop_uvflatten_private::SOP_FLATTEN_PINGROUP_INDEX
Definition:
SOP_UVFlatten.h:35
OP_Network
Definition:
OP_Network.h:152
SOP_Node
Definition:
SOP_Node.h:108
sop_uvflatten_private::SOP_FLATTEN_CREATEPINGROUPS_INDEX
Definition:
SOP_UVFlatten.h:32
SOP
SOP_UVFlatten.h
Generated on Tue Dec 17 2024 03:41:56 for HDK by
1.8.6