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
GUI_GroupData.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: GUI_GroupData.h (GUI Library)
7
*
8
* COMMENTS:
9
*/
10
#ifndef __GUI_GroupData_h__
11
#define __GUI_GroupData_h__
12
13
#include "
GUI_API.h
"
14
#include <
GR/GR_Defines.h
>
15
#include <
GR/GR_TextureRef.h
>
16
#include <
GU/GU_Selection.h
>
17
#include <
GU/GU_SelectType.h
>
18
#include <
GA/GA_Types.h
>
19
#include <
RE/RE_RenderContext.h
>
20
#include <
RE/RE_Texture.h
>
21
#include <
UT/UT_IntrusivePtr.h
>
22
23
#ifdef USE_VULKAN
24
#include <
RV/RV_TypePtrs.h
>
25
#endif
26
27
class
RE_Render
;
28
class
RE_Geometry
;
29
class
RE_ShaderHandle
;
30
class
GUI_GeoRender
;
31
class
GR_CommonDispOption
;
32
class
GU_Detail
;
33
class
UT_Color
;
34
35
class
RV_VKImage
;
36
class
RV_VKBuffer
;
37
38
/// Holds information sbout groups for display in the viewport.
39
class
GUI_API
GUI_GroupData
:
public
UT_IntrusiveRefCounter
<GUI_GroupData>
40
{
41
public
:
42
GUI_GroupData
(
43
GUI_GeoRender
&owner,
44
const
GR_CommonDispOption
&options,
45
RE_RenderContext
r
,
46
GU_SelectionHandle
*
selection
=
nullptr
,
47
UT_StringHolder
*
name
=
nullptr
);
48
~
GUI_GroupData
();
49
50
const
UT_StringHolder
&groupMask()
const
;
51
GA_GroupType
groupType()
const
;
52
GR_TextureRef
colorTexture()
const
;
53
bool
hasColorTexture()
const
;
54
55
// These values are used for drawing primitive groups.
56
RE_Texture
*idTexture()
const
;
57
RV_VKBuffer
*idBuffer()
const
;
58
int
minId()
const
;
59
int
maxId()
const
;
60
61
// These values are used for drawing point and edge groups.
62
RE_ShaderHandle
*
shader
(
bool
uv_viewport)
const
;
63
RE_Geometry
*geometry()
const
;
64
65
// Returns true if the provided mask specifies an adhoc group
66
// (basically anything that isn't recognized as a connectivity
67
// specifier, attribute range, or group name mask.
68
static
bool
isAdhocGroupMask(
const
char
*
mask
);
69
70
// Returns a magic group name that is used to trigger the use of the
71
// cook selection group from the detail, rather than a named group or
72
// an ad-hoc group.
73
static
UT_StringRef
cookSelectionGroupMask();
74
75
private
:
76
void
createIdTexture(
RE_RenderContext
r,
77
const
int
*id_data,
78
int
numids);
79
void
createColorTexture(
RE_RenderContext
r,
80
const
UT_ValArray<uint8>
&color_data);
81
82
void
initializePackedPrimsFromPoints(
RE_RenderContext
r,
83
const
GU_Detail
&gdp,
84
const
UT_Array<int32>
&id_data);
85
void
initializeFromConnectivity(
RE_RenderContext
r);
86
void
initializeFromAttrib(
RE_RenderContext
r);
87
void
initializeFromAdhocGroup(
RE_RenderContext
r);
88
89
bool
initializeFromGroup(
90
RE_RenderContext
r,
91
GA_GroupType
type
=
GA_GROUP_INVALID
,
92
const
GA_Group
*group =
nullptr
,
93
const
UT_StringRef
*
name
=
nullptr
,
94
const
UT_Color
*override_color =
nullptr
);
95
void
initializeFromPrimGroups(
RE_RenderContext
r,
96
const
GA_PrimitiveGroup
*group =
nullptr
,
97
const
UT_StringRef
*
name
=
nullptr
,
98
const
UT_Color
*override_color =
nullptr
);
99
void
initializeFromPointGroups(
RE_RenderContext
r,
100
const
GA_PointGroup
*group =
nullptr
,
101
const
UT_StringRef
*
name
=
nullptr
,
102
const
UT_Color
*override_color =
nullptr
);
103
void
initializeFromEdgeGroups(
RE_RenderContext
r,
104
const
GA_EdgeGroup
*group =
nullptr
,
105
const
UT_StringRef
*
name
=
nullptr
,
106
const
UT_Color
*override_color =
nullptr
);
107
void
initializeFromVertexGroups(
RE_RenderContext
r,
108
const
GA_VertexGroup
*group =
nullptr
,
109
const
UT_StringRef
*
name
=
nullptr
,
110
const
UT_Color
*override_color =
nullptr
);
111
112
GUI_GeoRender
&myOwnerGeoRender;
113
UT_StringHolder
myGroupMask;
114
GA_GroupType
myGroupType;
115
UT_StringHolder
myAttribName;
116
UT_StringHolder
myAttribValueMask;
117
GA_AttributeOwner
myAttribOwner;
118
GU_Connectivity
myConnectivity;
119
RE_Texture
*myColorTextureGL;
120
121
RE_Texture
*myIdTextureGL;
122
int
myMinId;
123
int
myMaxId;
124
125
RE_Geometry
*myGeometry;
126
127
#ifdef USE_VULKAN
128
UT_UniquePtr<RV_VKImage>
myColorTextureVK;
129
UT_UniquePtr<RV_VKBuffer>
myIdBufferVK;
130
#endif
131
};
132
133
typedef
UT_IntrusivePtr<const GUI_GroupData>
GUI_GroupDataHandle
;
134
135
#endif
GU_Selection.h
GUI_GeoRender
Definition:
GUI_GeoRender.h:84
RE_RenderContext.h
GT_Names::selection
GT_API const UT_StringHolder selection
GA_PrimitiveGroup
Definition:
GA_ElementGroup.h:74
GA_Group
Definition:
GA_Group.h:35
RE_Texture.h
GA_VertexGroup
Definition:
GA_ElementGroup.h:168
GR_Defines.h
RE_Geometry
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
Definition:
RE_Geometry.h:53
GUI_GroupData
Holds information sbout groups for display in the viewport.
Definition:
GUI_GroupData.h:39
UT_StringRef
Definition:
UT_StringHolder.h:188
UT_IntrusiveRefCounter
A reference counter base class for use with UT_IntrusivePtr.
Definition:
UT_IntrusivePtr.h:242
UT_ValArray
Definition:
GA_ArrayDataArray.h:33
UT_Array< int32 >
GA_PointGroup
Definition:
GA_ElementGroup.h:33
RE_RenderContext
Temporary container for either a RV_Render and an RE_Render.
Definition:
RE_RenderContext.h:23
UT_UniquePtr
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition:
UT_UniquePtr.h:39
GUI_GroupDataHandle
UT_IntrusivePtr< const GUI_GroupData > GUI_GroupDataHandle
Definition:
GUI_GroupData.h:133
UT_StringHolder
Definition:
UT_StringHolder.h:999
GUI_API
#define GUI_API
Definition:
GUI_API.h:10
UT_Color
Definition:
UT_Color.h:85
GR_TextureRef
Definition:
GR_TextureRef.h:32
GU_Connectivity
GU_Connectivity
Definition:
GU_SelectType.h:66
GA_GROUP_INVALID
Definition:
GA_Types.h:163
RE_Render
Definition:
RE_Render.h:29
mask
GLint GLuint mask
Definition:
glcorearb.h:124
RV_TypePtrs.h
UT_IntrusivePtr< const GUI_GroupData >
name
GLuint const GLchar * name
Definition:
glcorearb.h:786
GR_TextureRef.h
GU_SelectionHandle
UT_SharedPtr< GU_Selection > GU_SelectionHandle
Definition:
GU_SelectionSet.h:21
RE_OGLTexture
Definition:
RE_OGLTexture.h:31
shader
GLuint shader
Definition:
glcorearb.h:785
GA_AttributeOwner
GA_AttributeOwner
Definition:
GA_Types.h:35
GU_Detail
Definition:
GU_Detail.h:154
GA_GroupType
GA_GroupType
An ordinal enum for the different types of groups in GA.
Definition:
GA_Types.h:161
GA_EdgeGroup
Definition:
GA_EdgeGroup.h:42
GA_Types.h
GU_SelectType.h
GUI_API.h
r
GLboolean r
Definition:
glcorearb.h:1222
RV_VKBuffer
A vulkan buffer object.
Definition:
RV_VKBuffer.h:81
type
type
Definition:
core.h:1059
UT_IntrusivePtr.h
RV_VKImage
Definition:
RV_VKImage.h:381
RE_ShaderHandle
Simple interface to building a shader from a .prog file.
Definition:
RE_ShaderHandle.h:77
GR_CommonDispOption
Definition:
GR_CommonDispOption.h:43
GUI
GUI_GroupData.h
Generated on Fri Nov 8 2024 03:39:19 for HDK by
1.8.6