CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
GsProperties.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, 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-2024 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:
61 {
62 double u, v;
63 };
71 public:
72 virtual void directRenderOutputPoint(const OdGePoint3d &/*point*/,
73 const OdCmEntityColor &/*color*/)
74 {
75 }
76 virtual void directRenderOutputLineFlat(const OdGePoint3d &/*pt1*/, const OdGePoint3d &/*pt2*/,
77 const OdCmEntityColor &/*color*/)
78 {
79 }
80 virtual void directRenderOutputLineGouraud(const OdGePoint3d &/*pt1*/, const OdGePoint3d &/*pt2*/,
81 const OdCmEntityColor &/*clr1*/, const OdCmEntityColor &/*clr2*/)
82 {
83 }
84 virtual void directRenderOutputTriangleFlat(const OdGePoint3d &/*pt1*/, const OdGePoint3d &/*pt2*/, const OdGePoint3d &/*pt3*/,
85 const OdCmEntityColor &/*color*/)
86 {
87 }
88 virtual void directRenderOutputTriangleGouraud(const OdGePoint3d &/*pt1*/, const OdGePoint3d &/*pt2*/, const OdGePoint3d &/*pt3*/,
89 const OdCmEntityColor &/*clr1*/, const OdCmEntityColor &/*clr2*/, const OdCmEntityColor &/*clr3*/)
90 {
91 }
92 virtual void directRenderOutputPolygoneFlat(OdUInt32 /*nPts*/, const OdGePoint3d * /*pPts*/,
93 const OdCmEntityColor &/*color*/)
94 {
95 }
96 virtual void directRenderOutputPolygoneGouraud(OdUInt32 /*nPts*/, const OdGePoint3d * /*pPts*/,
97 const OdCmEntityColor * /*pClrs*/)
98 {
99 }
100 virtual void directRenderOutputImage(const OdGePoint3d * /*pRect*/, const OdGiRasterImage * /*pImage*/,
102 {
103 }
104
106
108};
109
114class GS_TOOLKIT_EXPORT OdGsProperties : public OdRxObject
115{
116public:
121 {
124
126 kBackground = (1 << 1),
127
129 kVisualStyle = (1 << 2),
130
133
135 kRenderSettings = (1 << 4),
136
139
141 kDeviceBackground = 3, // kViewport | kBackground
142
144 kDeviceNormal = 7, // kViewport | kBackground | kVisualStyle
145
147 kDeviceRender = 31, // kAll
148
150 kAll = 31
151 };
152protected:
156
159 // For optimize
161public:
163
176
177 void setOpenDrawableFn(OdGiDrawablePtr (*fn)(OdDbStub*));
178
185 void setUnderlyingDrawable(const OdGiDrawable *pUnderlyingDrawable, OdGiContext* ctx);
186
191
198 bool isUnderlyingDrawableChanged(const OdGiDrawable *pUnderlyingDrawable) const;
199
207
215
219 OdDbStub* underlyingDrawableId() const;
220
225
229 virtual PropertiesType propertiesType() const = 0;
230
231 // Search down in hierarchy for appropriate properties
237
238 // Update attributes
239 virtual void update(const OdGiDrawable* pUnderlyingDrawable,
240 OdGsViewImpl* view, OdUInt32 incFlags = kAll) = 0;
241 // Display attributed data
242 virtual void display(OdGsBaseVectorizer& view,
243 OdGsPropertiesDirectRenderOutput *pdro = NULL, OdUInt32 incFlags = kAll) = 0;
244};
245
250
251#include "TD_PackPop.h"
252
253#endif // _ODGSPROPERTIES_H_INCLUDED_
false
Definition DimVarDefs.h:165
OdSmartPtr< OdGiDrawable > OdGiDrawablePtr
#define GS_TOOLKIT_EXPORT
Definition GsExport.h:37
OdSmartPtr< OdGsProperties > OdGsPropertiesPtr
unsigned int OdUInt32
virtual void directRenderOutputImage(const OdGePoint3d *, const OdGiRasterImage *, const OdGsPropertiesDirectRenderOutput::DirectRenderImageParams &)
virtual void directRenderOutputTriangleFlat(const OdGePoint3d &, const OdGePoint3d &, const OdGePoint3d &, const OdCmEntityColor &)
virtual void directRenderOutputPolygoneFlat(OdUInt32, const OdGePoint3d *, const OdCmEntityColor &)
virtual OdUInt32 directRenderOutputFlags() const =0
virtual void directRenderOutputLineFlat(const OdGePoint3d &, const OdGePoint3d &, const OdCmEntityColor &)
virtual void directRenderOutputPolygoneGouraud(OdUInt32, const OdGePoint3d *, const OdCmEntityColor *)
virtual void directRenderOutputTriangleGouraud(const OdGePoint3d &, const OdGePoint3d &, const OdGePoint3d &, const OdCmEntityColor &, const OdCmEntityColor &, const OdCmEntityColor &)
virtual void directRenderOutputLineGouraud(const OdGePoint3d &, const OdGePoint3d &, const OdCmEntityColor &, const OdCmEntityColor &)
virtual void directRenderOutputPoint(const OdGePoint3d &, const OdCmEntityColor &)
bool hasUnderlyingDrawable() const
void * m_pUnderlyingDrawable
virtual void display(OdGsBaseVectorizer &view, OdGsPropertiesDirectRenderOutput *pdro=NULL, OdUInt32 incFlags=kAll)=0
virtual OdSmartPtr< OdGsProperties > propertiesForType(PropertiesType) const
OdDbStub * underlyingDrawableId() const
OdGiContext * m_context
OdGiDrawablePtr underlyingDrawable() const
const OdGiDrawable * m_pInconsistentDrawable
virtual PropertiesType propertiesType() const =0
OdGiDrawablePtr(* m_pOpenDrawableFn)(OdDbStub *id)
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
OdGiDrawable::DrawableType m_dType
OdGiDrawable::DrawableType underlyingDrawableType() const
bool isUnderlyingDrawablePersistent() const