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
GVEX_GeoCommand.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: GVEX_GeoCommand.h ( GVEX Library, C++)
7
*
8
* COMMENTS: Applies VEX_GeoCommands to GDPs
9
*/
10
11
#ifndef __GVEX_GeoCommand__
12
#define __GVEX_GeoCommand__
13
14
#include "
GVEX_API.h
"
15
16
#include <
GU/GU_Detail.h
>
17
#include <
VEX/VEX_GeoCommand.h
>
18
#include <
UT/UT_ThreadedAlgorithm.h
>
19
20
class
GU_Agent
;
21
class
GU_PrimChannel
;
22
class
GU_PrimPacked
;
23
24
template
<VEX_Precision PREC>
25
class
GVEX_API
GVEX_GeoCommand
26
{
27
public
:
28
GVEX_GeoCommand
();
29
~
GVEX_GeoCommand
();
30
31
// WARNING: Because of shared string tables, the provided geocmd
32
// must remain live until after this is applied!
33
void
appendQueue(
VEX_GeoCommandQueue<PREC>
&geocmd);
34
void
appendQueues(
UT_Array
<
VEX_GeoCommandQueue<PREC>
> &geocmds);
35
36
// Used by apply() to resolve relative op: paths
37
void
setCwdOpId
(
int
op_id)
38
{ myCwdOpId = op_id; }
39
40
void
apply(
GU_Detail
*gdp);
41
42
public
:
43
GA_Offset
pointOffset(
const
GU_Detail
*gdp,
exint
elem,
exint
pointidx)
const
;
44
GA_Offset
primitiveOffset(
const
GU_Detail
*gdp,
exint
elem,
exint
primitiveidx)
const
;
45
GA_Offset
vertexOffset(
const
GU_Detail
*gdp,
exint
elem,
exint
vertexidx)
const
;
46
GA_Offset
vertexOffset(
const
GU_Detail
*gdp,
exint
elem,
exint
primidx,
exint
vertexidx)
const
;
47
48
GA_Offset
dictOffset(
const
GU_Detail
*gdp,
GA_AttributeOwner
owner,
exint
elem,
exint
objidx,
exint
secidx)
const
;
49
50
protected
:
51
void
applyAttribCreate(
GU_Detail
*gdp,
GA_AttributeOwner
owner,
VEX_GeoAttribEdit<PREC>
*edit)
const
;
52
void
applyAttribTypeInfo(
GU_Detail
*gdp,
GA_AttributeOwner
owner,
VEX_GeoAttribEdit<PREC>
*edit)
const
;
53
void
applyAttribEdit(
GU_Detail
*gdp,
GA_AttributeOwner
owner,
VEX_GeoAttribEdit<PREC>
*edit,
bool
alreadybumpingid)
const
;
54
void
applyGroupCreate(
GU_Detail
*gdp,
GA_AttributeOwner
owner,
VEX_GeoAttribEdit<PREC>
*edit)
const
;
55
void
applyGroupEdit(
GU_Detail
*gdp,
GA_AttributeOwner
owner,
VEX_GeoAttribEdit<PREC>
*edit,
bool
alreadybumpingid)
const
;
56
void
applyIntrinsicEdit(
GU_Detail
*gdp,
VEX_GeoAttribEdit<PREC>
*edit)
const
;
57
void
applyDetailIntrinsicEdit(
GU_Detail
*gdp,
VEX_GeoAttribEdit<PREC>
*edit)
const
;
58
59
THREADED_METHOD2
(
GVEX_GeoCommand
, myGeoCmd.myPointAdd.entries() > 8*1024,
60
setNewPointPos,
61
GU_Detail
*, gdp,
62
bool
*, hasclone);
63
void
setNewPointPosPartial(
GU_Detail
*gdp,
64
bool
*hasclone,
65
const
UT_JobInfo
&info);
66
67
private
:
68
template
<
typename
GeoCmdT>
69
GU_Agent
* getAgent(
GU_Detail
*gdp,
const
GeoCmdT &cmd,
70
bool
all_agents,
GU_PrimPacked
*&packed_prim);
71
72
template
<
typename
GeoCmdT>
73
GU_PrimChannel
*getPrimChannel(
GU_Detail
*gdp,
const
GeoCmdT &cmd,
74
bool
all_chprims);
75
76
private
:
77
bool
mySorted;
78
VEX_GeoCommandQueue<PREC>
myGeoCmd;
79
80
UT_IntArray
myNetPrimIndex;
81
UT_IntArray
myNetPointIndex;
82
UT_IntArray
myNetVertexIndex;
83
84
int
myCwdOpId;
85
};
86
87
GVEX_EXTERN_TEMPLATE
(
GVEX_GeoCommand<VEX_32>
);
88
GVEX_EXTERN_TEMPLATE
(
GVEX_GeoCommand<VEX_64>
);
89
90
#endif
GVEX_API
#define GVEX_API
Definition:
GVEX_API.h:12
UT_ThreadedAlgorithm.h
VEX_GeoCommand.h
exint
int64 exint
Definition:
SYS_Types.h:125
GVEX_GeoCommand
Definition:
GVEX_GeoCommand.h:25
VEX_GeoCommandQueue
Definition:
CVEX_Context.h:29
GU_PrimPacked
Definition:
GU_PrimPacked.h:27
UT_ValArray< int >
GU_Detail.h
UT_Array
Definition:
BV_KDOPTree.h:18
GA_Offset
GA_Size GA_Offset
Definition:
GA_Types.h:646
THREADED_METHOD2
#define THREADED_METHOD2(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2)
Definition:
UT_ThreadedAlgorithm.h:510
GVEX_GeoCommand::setCwdOpId
void setCwdOpId(int op_id)
Definition:
GVEX_GeoCommand.h:37
GU_Agent
Definition:
GU_Agent.h:51
GA_AttributeOwner
GA_AttributeOwner
Definition:
GA_Types.h:35
GU_Detail
Definition:
GU_Detail.h:154
GU_PrimChannel
Definition:
GU_PrimChannel.h:99
UT_JobInfo
Definition:
UT_ThreadedAlgorithm.h:92
GVEX_API.h
VEX_AttribEdit
Definition:
VEX_GeoCommand.h:530
GVEX_EXTERN_TEMPLATE
GVEX_EXTERN_TEMPLATE(GVEX_GeoCommand< VEX_32 >)
GVEX
GVEX_GeoCommand.h
Generated on Sun Nov 17 2024 03:01:20 for HDK by
1.8.6