CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GiDrawable.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 __ODDRAWABLE_H__
25#define __ODDRAWABLE_H__ /* { Secret} **/
26
27#include "RxObject.h"
28#include "RxOverrule.h"
29
31class OdGiWorldDraw;
33class OdGsCache;
34class OdDbStub;
35class OdGeExtents3d;
36
37#include "TD_PackPush.h"
38
48{
49protected:
51public:
52
54
58 {
59 kDrawableNone = 0, // Default flags; the drawable object uses only OdGi primitives,
60 // with no nested calls to draw().
61 kDrawableIsAnEntity = 1, // Classes derived from OdDbEntity must set this flag,
62 // which is set by the default implementation of
63 // OdDbEntity::subSetAttributes().
64 kDrawableUsesNesting = 2, // The drawable uses nested calls to draw(), but makes no
65 // calls to other OdGi primatives.
66 kDrawableIsCompoundObject = 4, // The drawable is to be treated as a block. Valid only when combined
67 // with kDrawableIsAnEntity. If set, you must override
68 // OdDbEntity::getCompoundObjectTransform().
69 kDrawableViewIndependentViewportDraw = 8, // Currently not supported.
70 kDrawableIsInvisible = 16, // Object is invisible, and should not be rendered.
71 kDrawableHasAttributes = 32, // Currently not supported.
72 kDrawableRegenTypeDependantGeometry = 64, // This flag must be set for objects which is drawn differently in different regen type modes.
73 kDrawableIsDimension = (kDrawableIsAnEntity + kDrawableIsCompoundObject + 128), // Dimension objects must set these flags
74 // which are set by the default implementation of OdDbDimension.
75 kDrawableRegenDraw = 256, // The drawable must be always regenerated.
76 kDrawableStandardDisplaySingleLOD = 512, // Currently not supported.
77 kDrawableShadedDisplaySingleLOD = 1024, // Currently not supported.
78 kDrawableViewDependentViewportDraw = 2048, // Currently not supported.
79 kDrawableBlockDependentViewportDraw = 4096, // Currently not supported.
80 kDrawableIsExternalReference = 8192, // Currently not supported.
81 kDrawableNotPlottable = 16384, // Currently not supported.
82 kDrawableNotAllowLCS = 32768, // Currently not supported.
83 kDrawableMergeControlOff = 65536, // Merge Control disabled for this drawable
84
85 kLastFlag = kDrawableMergeControlOff // Marker
86 };
87
91 {
92 kGeometry = 0, // Geometry.
93 kDistantLight = 1, // Distant light. This number is important!
94 kPointLight = 2, // Point light. This number is important!
95 kSpotLight = 3, // Spot light. This number is important!
96 kAmbientLight, // Ambient light.
97 kSolidBackground, // Solid background light.
98 kGradientBackground, // Gradient background.
99 kImageBackground, // Image background.
100 kGroundPlaneBackground, // Ground plane background.
101 kViewport, // Viewport.
102 kWebLight, // Web light.
103 kSkyBackground, // Sky background.
104 kImageBasedLightingBackground // Image-based lightning background.
105 };
106
113 virtual DrawableType drawableType() const { return kGeometry; }
114
128
149
168
175 virtual bool isPersistent() const = 0;
176
186 virtual OdDbStub* id() const = 0;
187
193 virtual void setGsNode(OdGsCache* pGsNode) = 0;
194
201 virtual OdGsCache* gsNode() const = 0;
202
215
226 virtual OdResult getGeomExtents(OdGeExtents3d& extents) const;
227
237
238protected:
239 virtual OdUInt32 subSetAttributes (OdGiDrawableTraits * traits) const = 0;
240 virtual bool subWorldDraw (OdGiWorldDraw * wd) const = 0;
241 virtual void subViewportDraw (OdGiViewportDraw * vd) const = 0;
242 virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw * vd) const;
243 virtual OdUInt32 subRegenSupportFlags() const;
245};
246
251
261{
262public:
264
269
279 virtual OdUInt32 setAttributes (const OdGiDrawable* pSubject, OdGiDrawableTraits * traits);
280
291 virtual bool worldDraw (const OdGiDrawable* pSubject, OdGiWorldDraw * wd);
292
299 virtual void viewportDraw (const OdGiDrawable* pSubject, OdGiViewportDraw * vd);
300
311
320 virtual OdUInt32 regenSupportFlags(const OdGiDrawable* pSubject);
321};
322
323#include "TD_PackPop.h"
324
325#endif // __ODDRAWABLE_H__
326
unsigned int OdUInt32
#define ODRX_SEALED_VIRTUAL
#define ODRX_SEALED
OdResult
Definition: OdResult.h:29
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
ODRX_SEALED_VIRTUAL void viewportDraw(OdGiViewportDraw *pVd) const ODRX_SEALED
ODRX_DECLARE_MEMBERS(OdGiDrawable)
virtual bool isPersistent() const =0
ODRX_SEALED_VIRTUAL OdUInt32 setAttributes(OdGiDrawableTraits *pTraits) const ODRX_SEALED
virtual void setGsNode(OdGsCache *pGsNode)=0
virtual OdDbStub * id() const =0
ODRX_SEALED_VIRTUAL OdUInt32 viewportDrawLogicalFlags(OdGiViewportDraw *pVd) const ODRX_SEALED
ODRX_SEALED_VIRTUAL OdUInt32 regenSupportFlags() const ODRX_SEALED
virtual DrawableType drawableType() const
Definition: GiDrawable.h:113
ODRX_SEALED_VIRTUAL bool worldDraw(OdGiWorldDraw *pWd) const ODRX_SEALED
virtual OdGsCache * gsNode() const =0
@ kSolidBackground
Definition: GiDrawable.h:97
@ kImageBackground
Definition: GiDrawable.h:99
@ kGroundPlaneBackground
Definition: GiDrawable.h:100
@ kGradientBackground
Definition: GiDrawable.h:98
virtual OdResult getGeomExtents(OdGeExtents3d &extents) const
virtual OdUInt32 setAttributes(const OdGiDrawable *pSubject, OdGiDrawableTraits *traits)
virtual void viewportDraw(const OdGiDrawable *pSubject, OdGiViewportDraw *vd)
ODRX_DECLARE_MEMBERS(OdGiDrawableOverrule)
virtual OdUInt32 regenSupportFlags(const OdGiDrawable *pSubject)
virtual bool worldDraw(const OdGiDrawable *pSubject, OdGiWorldDraw *wd)
virtual OdUInt32 viewportDrawLogicalFlags(const OdGiDrawable *pSubject, OdGiViewportDraw *vd)