CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GsDrawableHolder.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#ifndef ODGSDRAWABLEHOLDER_INC
24#define ODGSDRAWABLEHOLDER_INC
25
26#include "TD_PackPush.h"
27#include "Ge/GeExtents3d.h"
28#include "IntArray.h"
29#include "Gi/GiDrawable.h"
30#include "Gs/GsExport.h"
31
32class OdGsNode;
33class OdGsBaseModel;
34class OdDbStub;
35
36
43{
44 protected:
47 public:
50 public:
55 : m_lineweight(OdDb::kLnWt000)
56 {
57 }
65 : m_extents(extents)
66 , m_lineweight(lw)
67 {
68 }
69
74 {
75 return m_extents;
76 }
77
82 {
83 return m_extents;
84 }
85
90 void setExtents(const OdGeExtents3d &extents)
91 {
92 m_extents = extents;
93 }
94
99 {
100 m_extents = OdGeExtents3d::kInvalid;
101 }
102
107 void addExtents(const OdGeExtents3d &extents)
108 {
109 if (extents.isValidExtents())
110 m_extents.addExt(extents);
111 }
112
118 bool hasLineweight() const
119 {
120 return (m_lineweight > OdDb::kLnWt000);
121 }
122
127 {
128 return m_lineweight;
129 }
130
135 {
136 return m_lineweight;
137 }
138
144 {
145 m_lineweight = lw;
146 }
147
152 {
153 m_lineweight = OdDb::kLnWt000;
154 }
155
161 {
162 if (m_lineweight < lw)
163 m_lineweight = lw;
164 }
165
171 void get(OdGeExtents3d &extents, OdDb::LineWeight &lw) const
172 {
173 extents = m_extents;
174 lw = m_lineweight;
175 }
176
182 void set(const OdGeExtents3d &extents, OdDb::LineWeight lw)
183 {
184 m_extents = extents;
185 m_lineweight = lw;
186 }
187
191 void reset()
192 {
193 resetExtents();
194 resetLineweight();
195 }
196
202 void add(const OdGeExtents3d &extents, OdDb::LineWeight lw)
203 {
204 addExtents(extents);
205 addLineweight(lw);
206 }
207
213 void add(const OdGsUpdateExtents &extents)
214 {
215 add(extents.getExtents(), extents.getLineweight());
216 }
217
224 bool isValid() const
225 {
226 return m_extents.isValidExtents();
227 }
228};
229
236{
238 {
239 }
240 OdDbStub* m_drawableId;
246};
248
249#include "TD_PackPop.h"
250
251#endif // ODGSDRAWABLEHOLDER_INC
OdArray< DrawableHolder > DrawableHolderArray
#define GS_TOOLKIT_EXPORT
Definition: GsExport.h:37
#define GS_STATIC_EXPORT
Definition: GsExport.h:38
static GE_STATIC_EXPORT const OdGeExtents3d kInvalid
Definition: GeExtents3d.h:65
bool isValidExtents() const
Definition: GeExtents3d.h:172
OdGeExtents3d & addExt(const OdGeExtents3d &extents)
Definition: GeExtents3d.h:486
OdGeExtents3d m_extents
bool isValid() const
void add(const OdGsUpdateExtents &extents)
void get(OdGeExtents3d &extents, OdDb::LineWeight &lw) const
void setExtents(const OdGeExtents3d &extents)
void addExtents(const OdGeExtents3d &extents)
OdDb::LineWeight m_lineweight
OdGsUpdateExtents(const OdGeExtents3d &extents, OdDb::LineWeight lw=OdDb::kLnWt000)
const OdGeExtents3d & getExtents() const
void add(const OdGeExtents3d &extents, OdDb::LineWeight lw)
OdGeExtents3d & accessExtents()
void set(const OdGeExtents3d &extents, OdDb::LineWeight lw)
OdDb::LineWeight getLineweight() const
void setLineweight(OdDb::LineWeight lw)
void addLineweight(OdDb::LineWeight lw)
static GS_STATIC_EXPORT const OdGsUpdateExtents kInvalid
bool hasLineweight() const
OdDb::LineWeight & accessLineweight()
LineWeight
Definition: OdaDefs.h:386
@ kLnWt000
Definition: OdaDefs.h:387
OdGsUpdateExtents m_lastExt
OdSmartPtr< OdGsBaseModel > m_pGsModel
OdRxObjectPtr m_pMetafile
OdDbStub * m_drawableId
OdGsNode * m_pGsRoot
OdGiDrawablePtr m_pDrawable