24#ifndef __OD_GS_BASE_VECTORIZER_H_
25#define __OD_GS_BASE_VECTORIZER_H_
41class OdGsUpdateContext;
51class OdGsDisplayContext;
56class OdGsNestedMetafile;
57class OdGiSharedRefDesc;
60class OdGsApplyModelOverrides;
97 return *m_pExtAccum.get();
155 void onLayerModified(OdDbStub* layerId,
bool bFrozen,
bool bFromSetAttribs);
156 void onLayerModified(OdDbStub* layerId) { onLayerModified(layerId,
false,
false); }
157 void onSetAttributesLayer(OdDbStub *layerId) { onLayerModified(layerId,
false,
true); }
158 void onFrozenLayerModified(OdDbStub* layerId) { onLayerModified(layerId,
true,
false); }
204 virtual void draw(
const OdGiDrawable* pDrawable) {draw(pDrawable);};
302 if( m_nMetafileSize !=
OdUInt64( -1 ) )
return m_nMetafileSize;
547 kSharedRefTransform = (1 << 0),
548 kSharedRefUpdate = (1 << 1),
549 kSharedRefSelect = (1 << 2)
587#ifdef ODA_DIAGNOSTICS
609 inline bool isFaded()
const;
614 inline OdUInt32 fadingIntensity()
const;
622 inline bool isHighlighted()
const;
631 inline bool isSelecting()
const;
639 inline bool isHidden()
const;
646 inline void setHidden(
bool bHidden );
821 void highlight(
bool bHighlight,
OdUInt32 nSelStyle = 0);
968 void updateExtentsInThreadInit(OdGsMtContext& mtContext);
972 void setInitGsState(
bool bOn);
973 bool isRecordingHistory();
974 void deleteHistory();
975 void setThreadIndex(
OdUInt32 idx) { m_threadIndex = idx; }
976 bool drawSectionable(
const OdGiDrawable& drawable,
bool& bRes);
978 void setCurrentState(OdGsUpdateState& newState);
979 OdGsUpdateState* currentState() {
return m_curState; }
980 void applyState(
const OdGsUpdateState& s,
const OdGsUpdateState& prev);
1006 kFfLockedLayer = (1 << 0),
1008 kFfRefEdit = (1 << 2),
1009 kFfFlagsMask = kFfLockedLayer | kFfXref | kFfRefEdit,
1010 kEFfLockedLayer = (1 << 4),
1011 kEFfXref = (1 << 5),
1012 kEFfRefEdit = (1 << 6),
1013 kEFfFlagsMask = kEFfLockedLayer | kEFfXref | kEFfRefEdit,
1014 kEFfFlagsOffset = 4,
1015 kFvLockedLayerOffset = 8,
1016 kFvLockedLayerMask = (0xFF << kFvLockedLayerOffset),
1018 kFvXrefMask = (0xFF << kFvXrefOffset),
1019 kFvRefEditOffset = 24,
1020 kFvRefEditMask = (0xFF << kFvRefEditOffset)
1045 int highlightingPass()
const;
1069 kLastBaseVectorizerFlag = kAbsoluteDeviation
1080 OdGiHistory* m_giHistory;
1082 bool m_bTraitsDataChanged;
1083 bool m_bByBlockTraitsChanged;
1084 friend class OdGsUpdateContext;
1085 friend class OdGsDisplayContext;
1087 friend class OdGsApplyModelOverrides;
1097template <
typename ClientClass = OdGsBaseVectorizer>
1116template <OdGiContext::FadingType fadingType>
1146 nIntensityMix = mix;
1151 nIntensityMix =
odmin(nIntensityMix, mix);
1156 nIntensityMix = nIntensityMix * mix / 100;
1158 nIntensityMix =
odmax(10, nIntensityMix);
1159 return 100 - nIntensityMix;
1169 return m_threadIndex;
1186 return m_effectiveLayer;
std::set< OdGsMarker > OdGsMarkerSet
OdSharedPtr< OdGsApplyModelOverrides > OdGsApplyModelOverridesPtr
#define GS_TOOLKIT_EXPORT
#define SETBIT(flags, bit, value)
#define GETBIT(flags, bit)
static GE_STATIC_EXPORT const OdGeMatrix3d kIdentity
void updateLayerTraits(OdGiSubEntityTraitsData &subEntityTraits) const
OdGiSubEntityTraitsData m_effectiveEntityTraitsData
OdUInt64 lastMetafileSize() const
OdGsStateBranch * findHighlightedSubnodeBranch()
virtual OdDbStub * switchLayer(OdDbStub *layerId) const
virtual void addDistantLight(const OdGiDistantLightTraitsData &)
virtual void setAnalyticLinetypingComplexCurves(bool analytic)
OdIntPtr m_drawableFilterFunction
OdGiSelectProc * m_pSelectProc
OdGsMaterialNode * m_pCachedMaterial
const OdGsWriter & gsWriter() const
bool hasSelectionStyle() const
const OdGsMarkerSet * highlightedSubentities() const
OdGsLayerNode * activeLayerNode(bool bSync=false) const
virtual bool displayViewportProperties(OdGsPropertiesDirectRenderOutput *pdro=NULL, OdUInt32 incFlags=OdGsProperties::kAll)
virtual bool saveMaterialCache(const OdGsMaterialNode *pNode, OdGsFiler *pFiler)
virtual void beginMetafile(OdRxObject *pMetafile)
virtual void updateExtents(bool bBuildCache)
OdUInt32 currentSelectionStyle() const
virtual OdRxObjectPtr loadMetafile(OdGsFiler *pFiler)
virtual bool isSpatialIndexDisabled() const
void displayWithoutNesting(OdGsEntityNode *pNode, BlockScopesCallback *pBlockScopesCbk=NULL)
OdUInt32 threadIndex() const
virtual bool playNestedMetafile(const OdGsGeomPortion *pPortion, OdGsBaseContext *pContext, OdGsEntityNode &node)
virtual void renderTypeOnChange(OdGsModel::RenderType renderType)
virtual void loadViewport()
virtual void popMetafileTransform(OdUInt32=0)
virtual void setVisualStyle(const OdGiVisualStyle &visualStyle)
OdUInt32 fadingIntensity() const
virtual bool pushPaletteOverride(const OdGiPalette *pOverride)
int highlightingPass() const
OdGiConveyorOutput & secondaryOutput()
OdPerfTimerBase * m_viewTimingProcessor
virtual void updateViewport()
virtual OdGeMatrix3d getTransformForMetafileGeometry() const
bool disableInfiniteGeomExtents() const
OdGsModel::RenderType activeRenderType() const
virtual bool updateExtentsOnly() const ODRX_OVERRIDE
const OdGsStateBranch * currentVisibilityBranch() const
bool isHighlighted() const
virtual bool renderAbort()
double handleDeviationMultiplier(const OdGiDeviationType deviationType, double dDeviationValue) const
double m_dRenderAbortCondition
virtual const OdGiLayerTraitsData & effectiveLayerTraits() const
virtual void addWebLight(const OdGiWebLightTraitsData &)
virtual OdRxObjectPtr newGsMetafile()
virtual void endMetafile(OdRxObject *pMetafile)
void pushClipBoundary(OdGiClipBoundary *pBoundary, OdGiAbstractClipBoundary *pClipInfo)
virtual void endMetafileRecording()
OdGsLayerNode * gsLayerNode(OdDbStub *layerId, OdGsBaseModel *pModel)
OdGiConveyorGeometry * m_pDetachedOutput
virtual void endViewVectorization()
virtual bool regenAbort() const
virtual void doCollide(OdGiPathNode const *const *pInputList, OdUInt32 nInputListSize, OdGsCollisionDetectionReactor *pReactor, OdGiPathNode const *const *pCollisionWithList=NULL, OdUInt32 nCollisionWithListSize=0, const OdGsCollisionDetectionContext *pCtx=NULL)
OdGsUpdateState * m_curState
OdGiCollideProc * m_pCollideProc
const OdGsUpdateState * currentState() const
virtual bool hasPaletteOverrides() const
virtual void setTransformForMetafileGeometry(const OdGeMatrix3d &)
virtual void setEntityTraitsDataChanged(int bit, bool value=true)
OdArray< OdGeMatrix3d > m_metafileTransfStack
OdGsStateBranchPtr m_pCurHltBr
virtual void addSpotLight(const OdGiSpotLightTraitsData &)
void processAllDrawablesForCollide(const OdGeExtents3d *pExtents=NULL, OdGiPathNode const *const *pCollisionWithList=NULL, OdUInt32 nCollisionWithListSize=0, bool bIgnoreViewExtents=false)
virtual void onTraitsModified()
const OdGsEntityNode * m_MfPlayNode
virtual void displaySubnode(OdGsEntityNode &node, OdGsDisplayContext &ctx, bool bHighlighted)
virtual void display(bool bUpdate)
virtual void drawViewportFrame()
virtual void beginViewVectorization()
EMetafilePlayMode metafilePlayMode() const
virtual void pushMetafileTransform(const OdGeMatrix3d &, OdUInt32=0)
virtual bool useMetafileAsGeometry() const
void doSelect(const OdGePoint2d *aPtDc, int numPoints, OdGsSelectionReactor *pReactor, OdGsView::SelectionMode mode)
virtual bool useSharedBlockReferences() const
virtual OdGeMatrix3d objectToDeviceMatrix() const
void processDrawableForCollide(const OdGiPathNode *pStartNode, const OdGiDrawable *pDrawable, OdGsBaseModel *&pCurModel, OdGsApplyModelOverridesPtr &pCurOverrides)
ODRX_USING_HEAP_OPERATORS(OdGiBaseVectorizer)
void playMetafileMode(const OdRxObject *pMetafile, EMetafilePlayMode eMode, OdGsEntityNode &node, OdGsBaseContext *ctx)
void setRenderAbort(bool bSet)
const OdSiShape * m_MfPlayQuery
virtual OdGiConveyorOutput & output()
OdGsStateBranch * findHiddenSubnodeBranch()
virtual void beginMetafileRecording(OdGsGeomPortion *pGeomPortion)
void highlight(bool bHighlight, OdUInt32 nSelStyle=0)
EMetafilePlayMode m_eMfPlayMode
virtual void setUp(OdGsViewImpl &view)
OdGsStateBranchPtr m_pCurVisibilityBr
const OdGsStateBranch * currentHighlightBranch() const
virtual const OdGeMatrix3d & metafileTransform() const
OdUInt32 m_selectionStyle
void doDrawLight(const OdGiDrawable *pDrawable)
void pushModelTransform(const OdGeMatrix3d &xfm)
virtual void addPointLight(const OdGiPointLightTraitsData &)
double m_dDeviationMultiplier
virtual void switchOverlay(OdGsOverlayId overlayId)
virtual void setEntityTraitsDataChanged()
bool handleSelectionByExtents(const OdGeExtents3d &extWc)
virtual void setAnalyticLinetypingCircles(bool analytic)
virtual void playMetafile(const OdRxObject *pMetafile)
OdGsExtAccum & gsExtentsAccum()
void selectionMarkerOnChange(OdGsMarker nSelectionMarker)
virtual void setSelectionMarker(OdGsMarker selectionMarker)
virtual OdGiConveyorOutput & gsExtentsOutput()
OdGsModel::RenderType m_curRenderType
virtual void popPaletteOverride()
virtual void doCollideAll(OdGsCollisionDetectionReactor *pReactor, const OdGsCollisionDetectionContext *pCtx=NULL)
virtual OdGiConveyorOutput & outputForMetafileGeometry()
OdGsOverlayId activeOverlay() const
virtual bool isAnalyticLinetypingComplexCurves() const
virtual bool doDraw(OdUInt32 drawableFlags, const OdGiDrawable *pDrawable)
virtual void reportUpdateError(OdDbStub *, const OdError &error)
void setSectionableGeomExtentsOnly(bool bOn)
virtual void displayNode(OdGsNode &node, OdGsDisplayContext &ctx)
OdGsOverlayId m_curOverlay
virtual double deviation(const OdGiDeviationType deviationType, const OdGePoint3d &pointOnCurve) const
bool sectionableGeomExtentsOnly() const
virtual bool isViewRegenerated() const
virtual bool forceMetafilesDependence() const
virtual bool isAnalyticLinetypingCircles() const
bool doViewExtents(OdGeBoundBlock3d &extents)
OdGiConveyorGeometry * m_pDetachedSecondaryOutput
bool isMetafileEmpty() const
const OdGsExtAccum * secondaryOutputExtents() const
virtual bool loadMaterialCache(OdGsMaterialNode *pNode, OdGsFiler *pFiler)
virtual void processMaterialNode(OdDbStub *materialId, OdGsMaterialNode *pNode)
void initDeviationMultiplier()
void checkRenderType(const OdGsModel *pModel)
OdGsExtAccum * secondaryOutputExtents()
void pushModelTransform(const OdGeVector3d &normal)
void pushClipBoundary(OdGiClipBoundary *pBoundary)
virtual bool saveMetafile(const OdRxObject *pMetafile, OdGsFiler *pFiler)
void setHidden(bool bHidden)
bool isSharedGraphicsState() const
~OdGsHighlightingStateSaver()
OdUInt32 selectionStyle() const
bool isHighlighted() const
const bool m_bHighlighted
OdGsHighlightingStateSaver(ClientClass &vect)
const OdUInt32 m_selStyle
OdGsLockFadingFlag(OdGsBaseVectorizer &vectorizer, bool bNewVal)
OdGsLockFadingFlag(OdGsBaseVectorizer &vectorizer)
OdUInt32 markersSize() const
const OdGsMarkerSet & markers() const
OdGsExtAccum & extentsAccum()
OdGsExtAccumPtr m_pExtAccum
void endMetafileRecording()
void beginMetafileRecording(OdGsGeomPortion *pGeomPortion)
void onNestedDrawable(OdDbStub *layerId, const OdGsNestedMetafile *pNestedMf=NULL)
OdGsBaseModel * gsModel() const
OdGsGeomPortion * headGeomPortion() const
OdGsGeomPortion * m_pGeomPortionHead
bool isLayerFrozen(OdGsLayerNode *pLayerNode) const
OdGsBaseModel * m_pGsModel
bool hasFrozenLayerBefore(OdGsLayerNode *pLayerNode, const OdGsGeomPortion *pTillPortion=NULL) const
OdGsGeomPortion * currentGeomPortion() const
bool isRecordingMetafile()
OdGsBaseVectorizer * m_vectorizer
bool isCurrentGeomPortionDiscardable()
bool m_bFinalizedMetafile
OdGsGeomPortion * m_pGeomPortion
GLsizei const GLfloat * value
virtual void blockEnd(const void *pRefId)=0
virtual void blockBegin(const void *pRefId)=0