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
GU_Skin.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: GU_Skin.C (C++)
7
*
8
* COMMENTS:
9
* This is the filter used to create skinned patches.
10
*/
11
12
#ifndef __GU_Skin_h__
13
#define __GU_Skin_h__
14
15
#include "
GU_API.h
"
16
#include <
GEO/GEO_Primitive.h
>
17
#include <
GEO/GEO_SurfaceType.h
>
18
19
class
GA_PrimitiveGroup
;
20
class
GU_Detail
;
21
22
enum
GU_SkinClosureType
23
{
24
GU_SKIN_CLOSE_NONE
= 0,
25
GU_SKIN_CLOSE
= 1,
26
GU_SKIN_CLOSE_AUTO
= 2
27
};
28
29
/// This class can be used to queue up all primitives that are
30
/// to be deleted, with actual deletion being done once the operation
31
/// is complete.
32
///
33
/// This is particularly useful when an operation is performed on
34
/// multiple groups within one detail, since each deletion opeartion
35
/// itself is O(n) where n is the number of primitives in the detail.
36
/// Thus, accumulating primitives that are to be deleted and deleting them
37
/// once instead of every time for every group can lead to signficantly
38
/// faster code.
39
class
GU_API
GU_SkinCache
40
{
41
public
:
42
GU_SkinCache
(
GEO_Detail
& parent_detail);
43
virtual
~
GU_SkinCache
();
44
45
/// Queues up an array of primitives to delete. If delete_points is true,
46
/// will delete primitives' points as well. All queued primitives are
47
/// deleted either by calling cleanup() or in the destructor.
48
void
addCleanupPrimitives(
UT_Array<GEO_Primitive*>
* prims_array,
bool
delete_points);
49
50
/// Queues up a single primitive to delete. If delete_points is true,
51
/// will delete primitives' points as well. All queued primitives are
52
/// deleted either by calling cleanup() or in the destructor.
53
void
addCleanupPrimitive(
GEO_Primitive
* prim,
bool
delete_points);
54
55
/// Deletes all queued up primitives.
56
virtual
void
cleanup
();
57
58
private
:
59
/// Disable the assignment operator. We don't need to copy the arrays
60
/// entirely (slow) and at the same time we don't want pointers being
61
/// shared between multiple objects.
62
GU_SkinCache
&
operator=
(
const
GU_SkinCache
&
source
) {
return
*
this
; }
63
64
private
:
65
66
/// Holds pointers to primitives whose points also have to be deleted
67
UT_Array<GEO_Primitive*>
*myCleanupPrimsDeletePoints;
68
69
/// Holds pointers to primitives whose points are to be left alone
70
UT_Array<GEO_Primitive*>
*myCleanupPrimsLeavePoints;
71
72
/// Parent detail of the above primitives. For now we only support deleting
73
/// primitives from one detail, but this can easily be extended to support
74
/// multiple ones without changing external functions.
75
GEO_Detail
* myParentDetail;
76
};
77
78
class
GU_API
GU_SkinParms
79
{
80
public
:
81
GU_SkinParms
();
82
virtual
~
GU_SkinParms
();
83
84
void
ConvertGroupToPrimsArray(
GEO_Detail
* parent_detail,
const
GA_PrimitiveGroup
& group,
UT_Array<GEO_Primitive*>
& prims_array);
85
virtual
void
InitializePrimArrays(
GEO_Detail
* parent_detail);
86
87
GEO_SurfaceType
surfType
;
88
int
vOrder
;
89
GU_SkinClosureType
vWrap
;
90
int
keepShape
;
// ruled or truly skinned
91
const
GA_PrimitiveGroup
*
uFaces
;
92
93
UT_Array<GEO_Primitive*>
*
myUPrimsToProcess
;
94
};
95
96
#endif
GA_PrimitiveGroup
Definition:
GA_ElementGroup.h:74
GU_SkinParms
Definition:
GU_Skin.h:78
GU_SkinParms::vWrap
GU_SkinClosureType vWrap
Definition:
GU_Skin.h:89
GU_SkinParms::surfType
GEO_SurfaceType surfType
Definition:
GU_Skin.h:87
GU_SkinParms::myUPrimsToProcess
UT_Array< GEO_Primitive * > * myUPrimsToProcess
Definition:
GU_Skin.h:93
UT_Array< GEO_Primitive * >
GEO_SurfaceType.h
GU_SkinParms::vOrder
int vOrder
Definition:
GU_Skin.h:88
GU_SKIN_CLOSE_AUTO
Definition:
GU_Skin.h:26
GU_SkinClosureType
GU_SkinClosureType
Definition:
GU_Skin.h:22
GEO_Detail
Definition:
GEO_Detail.h:248
source
GLsizei GLsizei GLchar * source
Definition:
glcorearb.h:803
GU_API
#define GU_API
Definition:
GU_API.h:14
FS_StaleUSDFiles::cleanup
FS_API bool cleanup(UT_StringArray &removed, UT_StringArray &error_files, exint &memory_freed, bool dry_run, const char *override_path=nullptr)
GU_SkinParms::uFaces
const GA_PrimitiveGroup * uFaces
Definition:
GU_Skin.h:91
GU_Detail
Definition:
GU_Detail.h:154
nanovdb::operator=
LeafData & operator=(const LeafData &)=delete
GU_SKIN_CLOSE_NONE
Definition:
GU_Skin.h:24
GEO_Primitive.h
GEO_SurfaceType
GEO_SurfaceType
Definition:
GEO_SurfaceType.h:23
GU_API.h
GU_SKIN_CLOSE
Definition:
GU_Skin.h:25
GEO_Primitive
Definition:
GEO_Primitive.h:41
GU_SkinParms::keepShape
int keepShape
Definition:
GU_Skin.h:90
GU_SkinCache
Definition:
GU_Skin.h:39
GU
GU_Skin.h
Generated on Wed Aug 27 2025 03:06:39 for HDK by
1.8.6