CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GsProperties.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 _ODGSPROPERTIES_H_INCLUDED_
25#define _ODGSPROPERTIES_H_INCLUDED_
26
27#include "OdaCommon.h"
28#include "RxObject.h"
29#include "Gi/GiDrawable.h"
30#include "Gi/GiCommonDraw.h"
31#include "Gs/GsExport.h"
32#include "CmColorBase.h"
33
34class OdDbStub;
35
36class OdGiRasterImage;
38class OdGsViewImpl;
39
40#include "TD_PackPush.h"
41
47{
48 public:
50 {
58 DirectRender_Image = (1 << 7)
59 };
61 {
62 double u, v;
63 };
65 {
67 const OdGiDrawable *pDrawable; // For images caching
68 };
69 public:
70 virtual void directRenderOutputPoint(const OdGePoint3d &/*point*/,
71 const OdCmEntityColor &/*color*/)
72 {
73 }
74 virtual void directRenderOutputLineFlat(const OdGePoint3d &/*pt1*/, const OdGePoint3d &/*pt2*/,
75 const OdCmEntityColor &/*color*/)
76 {
77 }
78 virtual void directRenderOutputLineGouraud(const OdGePoint3d &/*pt1*/, const OdGePoint3d &/*pt2*/,
79 const OdCmEntityColor &/*clr1*/, const OdCmEntityColor &/*clr2*/)
80 {
81 }
82 virtual void directRenderOutputTriangleFlat(const OdGePoint3d &/*pt1*/, const OdGePoint3d &/*pt2*/, const OdGePoint3d &/*pt3*/,
83 const OdCmEntityColor &/*color*/)
84 {
85 }
86 virtual void directRenderOutputTriangleGouraud(const OdGePoint3d &/*pt1*/, const OdGePoint3d &/*pt2*/, const OdGePoint3d &/*pt3*/,
87 const OdCmEntityColor &/*clr1*/, const OdCmEntityColor &/*clr2*/, const OdCmEntityColor &/*clr3*/)
88 {
89 }
90 virtual void directRenderOutputPolygoneFlat(OdUInt32 /*nPts*/, const OdGePoint3d * /*pPts*/,
91 const OdCmEntityColor &/*color*/)
92 {
93 }
94 virtual void directRenderOutputPolygoneGouraud(OdUInt32 /*nPts*/, const OdGePoint3d * /*pPts*/,
95 const OdCmEntityColor * /*pClrs*/)
96 {
97 }
98 virtual void directRenderOutputImage(const OdGePoint3d * /*pRect*/, const OdGiRasterImage * /*pImage*/,
100 {
101 }
102
104
106};
107
113{
114public:
119 {
121 kViewport = 1,
122
124 kBackground = (1 << 1),
125
127 kVisualStyle = (1 << 2),
128
130 kRenderEnvironment = (1 << 3),
131
133 kRenderSettings = (1 << 4),
134
136 kDeviceSimple = 0,
137
139 kDeviceBackground = 3, // kViewport | kBackground
140
142 kDeviceNormal = 7, // kViewport | kBackground | kVisualStyle
143
145 kDeviceRender = 31, // kAll
146
148 kAll = 31
149 };
150protected:
154
155 OdGiDrawablePtr (*m_pOpenDrawableFn)(OdDbStub* id);
157 // For optimize
159public:
161
174
175 void setOpenDrawableFn(OdGiDrawablePtr (*fn)(OdDbStub*));
176
183 void setUnderlyingDrawable(const OdGiDrawable *pUnderlyingDrawable, OdGiContext* ctx);
184
189
196 bool isUnderlyingDrawableChanged(const OdGiDrawable *pUnderlyingDrawable) const;
197
205
213
217 OdDbStub* underlyingDrawableId() const;
218
223
227 virtual PropertiesType propertiesType() const = 0;
228
229 // Search down in hierarchy for appropriate properties
235
236 // Update attributes
237 virtual void update(const OdGiDrawable* pUnderlyingDrawable,
238 OdGsViewImpl* view, OdUInt32 incFlags = kAll) = 0;
239 // Display attributed data
240 virtual void display(OdGsBaseVectorizer& view,
241 OdGsPropertiesDirectRenderOutput *pdro = NULL, OdUInt32 incFlags = kAll) = 0;
242};
243
248
249#include "TD_PackPop.h"
250
251#endif // _ODGSPROPERTIES_H_INCLUDED_
OdSmartPtr< OdGiDrawable > OdGiDrawablePtr
Definition: GiCommonDraw.h:45
#define GS_TOOLKIT_EXPORT
Definition: GsExport.h:37
OdSmartPtr< OdGsProperties > OdGsPropertiesPtr
Definition: GsProperties.h:247
unsigned int OdUInt32
virtual void directRenderOutputImage(const OdGePoint3d *, const OdGiRasterImage *, const OdGsPropertiesDirectRenderOutput::DirectRenderImageParams &)
Definition: GsProperties.h:98
virtual void directRenderOutputTriangleFlat(const OdGePoint3d &, const OdGePoint3d &, const OdGePoint3d &, const OdCmEntityColor &)
Definition: GsProperties.h:82
virtual void directRenderOutputPolygoneFlat(OdUInt32, const OdGePoint3d *, const OdCmEntityColor &)
Definition: GsProperties.h:90
virtual OdUInt32 directRenderOutputFlags() const =0
virtual void directRenderOutputLineFlat(const OdGePoint3d &, const OdGePoint3d &, const OdCmEntityColor &)
Definition: GsProperties.h:74
virtual void directRenderOutputPolygoneGouraud(OdUInt32, const OdGePoint3d *, const OdCmEntityColor *)
Definition: GsProperties.h:94
virtual void directRenderOutputTriangleGouraud(const OdGePoint3d &, const OdGePoint3d &, const OdGePoint3d &, const OdCmEntityColor &, const OdCmEntityColor &, const OdCmEntityColor &)
Definition: GsProperties.h:86
virtual void directRenderOutputLineGouraud(const OdGePoint3d &, const OdGePoint3d &, const OdCmEntityColor &, const OdCmEntityColor &)
Definition: GsProperties.h:78
virtual void directRenderOutputPoint(const OdGePoint3d &, const OdCmEntityColor &)
Definition: GsProperties.h:70
bool hasUnderlyingDrawable() const
void * m_pUnderlyingDrawable
Definition: GsProperties.h:151
virtual void display(OdGsBaseVectorizer &view, OdGsPropertiesDirectRenderOutput *pdro=NULL, OdUInt32 incFlags=kAll)=0
virtual OdSmartPtr< OdGsProperties > propertiesForType(PropertiesType) const
OdDbStub * underlyingDrawableId() const
OdGiContext * m_context
Definition: GsProperties.h:153
OdGiDrawablePtr underlyingDrawable() const
const OdGiDrawable * m_pInconsistentDrawable
Definition: GsProperties.h:152
virtual PropertiesType propertiesType() const =0
virtual void update(const OdGiDrawable *pUnderlyingDrawable, OdGsViewImpl *view, OdUInt32 incFlags=kAll)=0
bool isUnderlyingDrawableChanged(const OdGiDrawable *pUnderlyingDrawable) const
ODRX_DECLARE_MEMBERS(OdGsProperties)
void setOpenDrawableFn(OdGiDrawablePtr(*fn)(OdDbStub *))
void setUnderlyingDrawable(const OdGiDrawable *pUnderlyingDrawable, OdGiContext *ctx)
bool m_bDrawablePersistent
Definition: GsProperties.h:156
OdGiDrawable::DrawableType m_dType
Definition: GsProperties.h:158
OdGiDrawable::DrawableType underlyingDrawableType() const
bool isUnderlyingDrawablePersistent() const