QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
opennurbs_rendering.h
Go to the documentation of this file.
1
/* $NoKeywords: $ */
2
/*
3
//
4
// Copyright (c) 1993-2007 Robert McNeel & Associates. All rights reserved.
5
// Rhinoceros is a registered trademark of Robert McNeel & Assoicates.
6
//
7
// THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
8
// ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
9
// MERCHANTABILITY ARE HEREBY DISCLAIMED.
10
//
11
// For complete openNURBS copyright information see <http://www.opennurbs.org>.
12
//
14
*/
15
16
#if !defined(OPENNURBS_RENDERING_INC_)
17
#define OPENNURBS_RENDERING_INC_
18
19
20
class
ON_CLASS
ON_RenderingAttributes
21
{
22
public
:
23
ON_RenderingAttributes
();
24
void
Default();
25
int
Compare(
const
ON_RenderingAttributes
& other )
const
;
26
bool
Write(
ON_BinaryArchive
& archive )
const
;
27
bool
Read(
ON_BinaryArchive
& archive );
28
29
bool
IsValid(
ON_TextLog
* text_log )
const
;
30
31
32
const
ON_MaterialRef
* MaterialRef(
const
ON_UUID
& plugin_id )
const
;
33
34
ON_ClassArray<ON_MaterialRef>
m_materials
;
35
};
36
37
class
ON_CLASS
ON_ObjectRenderingAttributes
:
public
ON_RenderingAttributes
38
{
39
public
:
40
ON_ObjectRenderingAttributes
();
41
void
Default();
42
int
Compare(
const
ON_ObjectRenderingAttributes
& other )
const
;
43
bool
Write(
ON_BinaryArchive
& archive )
const
;
44
bool
Read(
ON_BinaryArchive
& archive );
45
46
bool
IsValid(
ON_TextLog
* text_log )
const
;
47
48
/*
49
Description:
50
Update mapping channel transformations.
51
Parameters:
52
xform - [in]
53
Transformation applied to parent object.
54
Returns:
55
True is successful. False if there are mapping channels
56
and xform cannot be inverted.
57
*/
58
bool
Transform
(
const
ON_Xform
& xform );
59
60
/*
61
Parameters:
62
plugin_id - [in]
63
Returns:
64
A pointer to the plug-in's mapping reference, if there
65
is one. Otherwise NULL is returned.
66
*/
67
const
ON_MappingRef
* MappingRef(
68
const
ON_UUID
& plugin_id
69
)
const
;
70
71
/*
72
Parameters:
73
plugin_id - [in]
74
Returns:
75
If a mapping ref exists, it is returned. Otherwise
76
one is added.
77
*/
78
ON_MappingRef
* AddMappingRef(
79
const
ON_UUID
& plugin_id
80
);
81
82
/*
83
Parameters:
84
plugin_id - [in]
85
Returns:
86
If a mapping ref exists, it is returned. Otherwise
87
one is added.
88
*/
89
bool
DeleteMappingRef(
90
const
ON_UUID
& plugin_id
91
);
92
93
94
/*
95
Parameters:
96
plugin_id - [in]
97
mapping_channel_id - [in]
98
mapping_id - [in]
99
ON_TextureMapping id
100
Returns:
101
A pointer to the plug-in's mapping channel, if there
102
is one. Otherwise NULL is returned.
103
*/
104
const
ON_MappingChannel
* MappingChannel(
105
const
ON_UUID
& plugin_id,
106
int
mapping_channel_id
107
)
const
;
108
109
const
ON_MappingChannel
* MappingChannel(
110
const
ON_UUID
& plugin_id,
111
const
ON_UUID
& mapping_id
112
)
const
;
113
114
115
/*
116
Parameters:
117
plugin_id - [in]
118
mapping_channel_id - [in]
119
mapping_id - [in]
120
ON_TextureMapping id
121
Returns:
122
True if the mapping channel was added or a pefect
123
match already existed. False if a mapping channel
124
with a different mapping_id already exists for this
125
plug-in and channel.
126
*/
127
bool
AddMappingChannel(
128
const
ON_UUID
& plugin_id,
129
int
mapping_channel_id,
130
const
ON_UUID
& mapping_id
131
);
132
133
/*
134
Parameters:
135
plugin_id - [in]
136
mapping_channel_id - [in]
137
mapping_id - [in]
138
ON_TextureMapping id
139
Returns:
140
True if a matching mapping channel was deleted.
141
*/
142
bool
DeleteMappingChannel(
143
const
ON_UUID
& plugin_id,
144
int
mapping_channel_id
145
);
146
147
bool
DeleteMappingChannel(
148
const
ON_UUID
& plugin_id,
149
const
ON_UUID
& mapping_id
150
);
151
152
/*
153
Parameters:
154
plugin_id - [in]
155
old_mapping_channel_id - [in]
156
new_mapping_channel_id - [in]
157
Returns:
158
True if a matching mapping channel was found and changed.
159
*/
160
bool
ChangeMappingChannel(
161
const
ON_UUID
& plugin_id,
162
int
old_mapping_channel_id,
163
int
new_mapping_channel_id
164
);
165
166
// Use AddMappingRef() or AddMappingChannel() if you
167
// want to add an element to this array.
168
//
169
// Every mapping ref in this array must have
170
// a distinct value of ON_MappingRef.m_plugin_id.
171
ON_ClassArray<ON_MappingRef>
m_mappings
;
172
173
bool
m_bCastsShadows
;
// default is true
174
bool
m_bReceivesShadows
;
// default is true
175
bool
m_bReserved1
;
176
bool
m_bReserved2
;
177
};
178
179
#if defined(ON_DLL_TEMPLATE)
180
// This stuff is here because of a limitation in the way Microsoft
181
// handles templates and DLLs. See Microsoft's knowledge base
182
// article ID Q168958 for details.
183
#pragma warning( push )
184
#pragma warning( disable : 4231 )
185
ON_DLL_TEMPLATE
template
class
ON_CLASS
ON_ClassArray<ON_RenderingAttributes>
;
186
ON_DLL_TEMPLATE
template
class
ON_CLASS
ON_ClassArray<ON_ObjectRenderingAttributes>
;
187
#pragma warning( pop )
188
#endif
189
190
191
#endif
192
Transform
@ Transform
Definition
RSMetaType.h:67
ON_BinaryArchive
Definition
opennurbs_archive.h:152
ON_ClassArray
Definition
opennurbs_array.h:760
ON_MappingChannel
Definition
opennurbs_mapchan.h:34
ON_MappingRef
Definition
opennurbs_mapchan.h:91
ON_MaterialRef
Definition
opennurbs_mapchan.h:177
ON_ObjectRenderingAttributes
Definition
opennurbs_rendering.h:38
ON_ObjectRenderingAttributes::m_bReserved1
bool m_bReserved1
Definition
opennurbs_rendering.h:175
ON_ObjectRenderingAttributes::m_bReceivesShadows
bool m_bReceivesShadows
Definition
opennurbs_rendering.h:174
ON_ObjectRenderingAttributes::m_mappings
ON_ClassArray< ON_MappingRef > m_mappings
Definition
opennurbs_rendering.h:171
ON_ObjectRenderingAttributes::m_bCastsShadows
bool m_bCastsShadows
Definition
opennurbs_rendering.h:173
ON_ObjectRenderingAttributes::m_bReserved2
bool m_bReserved2
Definition
opennurbs_rendering.h:176
ON_RenderingAttributes
Definition
opennurbs_rendering.h:21
ON_RenderingAttributes::m_materials
ON_ClassArray< ON_MaterialRef > m_materials
Definition
opennurbs_rendering.h:34
ON_TextLog
Definition
opennurbs_textlog.h:20
ON_UUID
Definition
opennurbs_uuid.h:31
ON_Xform
Definition
opennurbs_xform.h:28
ON_CLASS
#define ON_CLASS
Definition
opennurbs_defines.h:91
src
3rdparty
legacy
opennurbs
opennurbs_rendering.h
Generated on Fri Jul 18 2025 09:41:50 for QCAD by
1.10.0