CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GsSelectionReactor.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24#ifndef __ODGSSELECTIONREACTOR_H_INCLUDED_
25#define __ODGSSELECTIONREACTOR_H_INCLUDED_
26
27#include "TD_PackPush.h"
28
29class OdDbStub;
30class OdGiViewport;
31class OdGiDrawable;
32class OdGiPathNode;
33
43{
56 : pParent(0)
57 , persistId(0)
61 {}
62
67
71 OdDbStub* persistId;
72
77
82
87 {
89
91 kMarkedBySelection = kFirstFlag << 1, // selected for crossing/fence; not selected for window
92 kMarkedBySubSelection = kFirstFlag << 2, // selected for crossing/fence; not selected for window
93 kMarkedByGeometry = kFirstFlag << 3, // geometry output for entire drawable
94 kMarkedBySubGeometry = kFirstFlag << 4, // geometry output for current marker
95 kMarkedToBreak = kFirstFlag << 5, // break selection process entirely
98 };
99
104
112 void markToSkip(bool skip) const;
113
117 bool isMarkedToSkip() const;
118
119 void markBySelection(bool val) const;
120
121 bool isMarkedBySelection() const;
122
123 void markBySubSelection(bool val) const;
124
125 bool isMarkedBySubSelection() const;
126
127 void markByGeometry(bool val) const;
128
129 bool isMarkedByGeometry() const;
130
131 void markBySubGeometry(bool val) const;
132
133 bool isMarkedBySubGeometry() const;
134
135 void markToBreak(bool val) const;
136
137 bool isMarkedToBreak() const;
138
139 void markForForcedSelection(bool val) const;
140
141 bool isMarkedForForcedSelection() const;
142};
143
157{
158public:
169 virtual bool selected(const OdGiDrawableDesc& pDrawableDesc) = 0;
170
171 enum
172 {
173 kNotImplemented = 0x80000000,
176 kSkipDrawable = 2
177 };
180 virtual OdUInt32 selected(const OdGiPathNode& /*pathNode*/, const OdGiViewport& /*viewInfo*/)
181 {
183 }
185};
186
187inline void OdGiDrawableDesc::markToSkip(bool val) const
188{
189 SETBIT(const_cast<OdGiDrawableDesc*>(this)->nDrawableDescFlags, kMarkedToSkip, val);
190}
191
193{
195}
196
197inline void OdGiDrawableDesc::markBySelection(bool val) const
198{
200}
201
203{
205}
206
207inline void OdGiDrawableDesc::markBySubSelection(bool val) const
208{
210}
211
213{
215}
216
217inline void OdGiDrawableDesc::markByGeometry(bool val) const
218{
220}
221
223{
225}
226
227inline void OdGiDrawableDesc::markBySubGeometry(bool val) const
228{
230}
231
233{
235}
236
237inline void OdGiDrawableDesc::markToBreak(bool val) const
238{
239 SETBIT(const_cast<OdGiDrawableDesc*>(this)->nDrawableDescFlags, kMarkedToBreak, val);
240}
241
243{
245}
246
248{
250}
251
253{
255}
256
257#include "TD_PackPop.h"
258
259#endif // __ODGSSELECTIONREACTOR_H_INCLUDED_
unsigned int OdUInt32
#define SETBIT(flags, bit, value)
Definition: OdaDefs.h:516
#define GETBIT(flags, bit)
Definition: OdaDefs.h:517
virtual OdUInt32 selected(const OdGiPathNode &, const OdGiViewport &)
virtual bool selected(const OdGiDrawableDesc &pDrawableDesc)=0
OdGiDrawableDesc * pParent
void markBySelection(bool val) const
bool isMarkedToBreak() const
void markForForcedSelection(bool val) const
bool isMarkedForForcedSelection() const
void markBySubSelection(bool val) const
const OdGiDrawable * pTransientDrawable
bool isMarkedBySelection() const
bool isMarkedBySubSelection() const
bool isMarkedBySubGeometry() const
void markBySubGeometry(bool val) const
void markToSkip(bool skip) const
bool isMarkedByGeometry() const
bool isMarkedToSkip() const
void markByGeometry(bool val) const
void markToBreak(bool val) const