CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GsBaseInclude.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 ODGSBASEINCLUDE_INC
25#define ODGSBASEINCLUDE_INC
26
27// Previously GsBaseVectorizer.h defines module/device/view classes
28#include "Gs/GsBaseModule.h"
30#include "Gs/GsBaseVectorizer.h"
32#include "SaveState.h"
33#include "RxDictionary.h"
34#include "RxObjectImpl.h"
35#include "RxVariantValue.h"
36#include "ThreadsCounter.h"
37
38#include "TD_PackPush.h"
39
40//FELIX_CHANGE
41#undef check
42
50template <class BaseVectorizerObject>
51class OdGsBaseVectorizeViewJoin : public OdGsBaseVectorizeView, public BaseVectorizerObject
52{
53 public:
58 {
60 }
61
63
64
68
69#if !defined(_MSC_VER) || (_MSC_VER < 1600)
70 ODRX_USING_HEAP_OPERATORS(BaseVectorizerObject);
71#else
72 // Usage of template class as a base for new/delete operators in 'using' directive causes IntelliSense crash in VS2010
74#endif
75
76#if 0
77
81 bool isPerspective() const
82 {
84 //return OdGsBaseVectorizer::view().isPerspective();
85 }
86
91 {
93 }
94
105 void getNumPixelsInUnitSquare(const OdGePoint3d& givenWorldpt,
106 OdGePoint2d& pixelArea, bool includePerspective = true) const
107 {
108 OdGsViewImpl::getNumPixelsInUnitSquare(givenWorldpt, pixelArea, includePerspective);
109 //OdGsBaseVectorizer::view().getNumPixelsInUnitSquare(givenWorldpt, pixelArea, includePerspective);
110 }
111
112#else
119 {
121 }
122
128 {
130 }
131
136 double lineweightToPixels(double lineweight) const
137 {
139 }
140
146 {
148 }
149
156 {
158 }
159#endif
160 protected:
162};
163
171template <class BaseVectorizerObject>
172
173class OdGsBaseVectorizeViewJoinMT : public OdGsBaseVectorizeViewJoin<BaseVectorizerObject>
174{
175 protected:
178 public:
179
184 : m_vectUsage(0)
185 {
186 }
187
191 virtual OdUInt32 numVectorizers() const
192 {
193 if (OdGsBaseVectorizeView::baseDevice()->m_vectPerfData.enableParallelVectorization())
194 {
196 if (pDevice && !pDevice->properties().isNull() &&
197 pDevice->properties()->has(OD_T("MaxRegenThreads")))
198 return (OdUInt32)OdRxVariantValue(pDevice->properties()->getAt(OD_T("MaxRegenThreads")))->getUInt16();
199 return 4;
200 }
201 return 1;
202 }
203
208 virtual OdGsBaseVectorizer* getVectorizer(bool /*bDisplay*/)
209 {
210 m_vectUsage++;
211 if (m_vectUsage == 1)
212 return this;
213 if (m_vectorizers.size() < m_vectUsage - 1)
214 {
215 OdGsViewPtr pView;
216 {
221 }
222 OdGsBaseVectorizeViewJoinMT *pThis = static_cast<OdGsBaseVectorizeViewJoinMT*>(pView.get());
223 pThis->setUp(OdGsBaseVectorizer::view());
224 m_vectorizers.push_back(pView);
225 }
227 // viewParams?
228 return pVect;
229 }
230
234 virtual void releaseVectorizer(OdGsBaseVectorizer* /*pVect*/)
235 {
236 m_vectUsage--;
237 }
238
244 bool isMTRegen() const
245 {
246 return odThreadsCounter();
247 }
248 //bool isMTView() const
249 //{
250 // return (&view() != this);
251 //}
252
253 // Note: do not delete this code branch, it is useful for find places where view is called unsafe for MT.
254#if 0
255 private:
256
257#define MT_VECT_VIEWMTH(mthSem, mthCall) \
258 mthSem \
259 { \
260 if (&view() != this) \
261 view().mthCall; \
262 OdGsViewImpl::mthCall; \
263 }
264#define MT_VECT_VIEWMTH_RET(mthSem, mthCall) \
265 mthSem \
266 { \
267 if (&view() != this) \
268 return view().mthCall; \
269 return OdGsViewImpl::mthCall; \
270 }
271
272 MT_VECT_VIEWMTH_RET(RenderMode mode() const, mode())
273 //MT_VECT_VIEWMTH(void setMode(RenderMode mode), setMode(mode))
274 //MT_VECT_VIEWMTH(void freezeLayer(OdDbStub* layerID), freezeLayer(layerID))
275 //MT_VECT_VIEWMTH(void thawLayer(OdDbStub* layerID), thawLayer(layerID))
276 //MT_VECT_VIEWMTH(void clearFrozenLayers(), clearFrozenLayers());
277 //MT_VECT_VIEWMTH(void setViewportBorderProperties(ODCOLORREF color, int width), setViewportBorderProperties(color, width))
278 MT_VECT_VIEWMTH(void getViewportBorderProperties(ODCOLORREF& color, int& width) const, getViewportBorderProperties(color, width))
279 //MT_VECT_VIEWMTH(void setViewportBorderVisibility(bool visible), setViewportBorderVisibility(visible))
280 MT_VECT_VIEWMTH_RET(bool isViewportBorderVisible() const, isViewportBorderVisible())
281 //MT_VECT_VIEWMTH(void setEnableFrontClip(bool enable), setEnableFrontClip(enable))
282 MT_VECT_VIEWMTH_RET(bool isFrontClipped() const, isFrontClipped())
283 //MT_VECT_VIEWMTH(void setFrontClip(double distance), setFrontClip(distance))
284 MT_VECT_VIEWMTH_RET(double frontClip() const, frontClip())
285 //MT_VECT_VIEWMTH(void setEnableBackClip(bool enable), setEnableBackClip(enable))
286 MT_VECT_VIEWMTH_RET(bool isBackClipped() const, isBackClipped())
287 //MT_VECT_VIEWMTH(void setBackClip(double distance), setBackClip(distance))
288 MT_VECT_VIEWMTH_RET(double backClip() const, backClip())
289 MT_VECT_VIEWMTH_RET(OdGePoint3d position() const, position())
290 MT_VECT_VIEWMTH_RET(OdGePoint3d target() const, target())
291 MT_VECT_VIEWMTH_RET(OdGeVector3d upVector() const, upVector())
292 MT_VECT_VIEWMTH_RET(double fieldWidth() const, fieldWidth())
293 MT_VECT_VIEWMTH_RET(double fieldHeight() const, fieldHeight())
294 MT_VECT_VIEWMTH_RET(double windowAspect() const, windowAspect())
295 MT_VECT_VIEWMTH_RET(double lensLength() const, lensLength())
296 //MT_VECT_VIEWMTH(void setLensLength(double lensLength), setLensLength(lensLength))
297 MT_VECT_VIEWMTH_RET(bool isPerspective() const, isPerspective())
298 //MT_VECT_VIEWMTH(void beginInteractivity(double frameRateInHz), beginInteractivity(frameRateInHz))
299 //MT_VECT_VIEWMTH(void endInteractivity(), endInteractivity())
300 //MT_VECT_VIEWMTH(void flush(), flush())
301 //MT_VECT_VIEWMTH(void hide(), hide())
302 //MT_VECT_VIEWMTH(void show(), show())
303 MT_VECT_VIEWMTH_RET(bool isVisible(), isVisible())
304 //MT_VECT_VIEWMTH_RET(OdGsViewPtr cloneView(bool cloneViewParameters = true, bool cloneGeometry = false),
305 // cloneView(cloneViewParameters, cloneGeometry))
306 //MT_VECT_VIEWMTH_RET(bool exceededBounds(), exceededBounds())
307 //MT_VECT_VIEWMTH(void enableStereo(bool enabled), enableStereo(enabled))
308 MT_VECT_VIEWMTH_RET(bool isStereoEnabled() const, isStereoEnabled())
309 //MT_VECT_VIEWMTH(void setStereoParameters(double magnitude, double parallax), setStereoParameters(magnitude, parallax))
310 MT_VECT_VIEWMTH(void getStereoParameters(double& magnitude, double& parallax) const, getStereoParameters(magnitude, parallax))
311 //MT_VECT_VIEWMTH(void initLights(OdRxIterator* pLightsIterator), initLights(pLightsIterator))
312 //MT_VECT_VIEWMTH(void setViewport(const OdGePoint2d& lowerLeft, const OdGePoint2d& upperRight), setViewport(lowerLeft, upperRight))
313 //MT_VECT_VIEWMTH(void setViewport(const OdGsDCRect& screenRect), setViewport(screenRect))
314 //MT_VECT_VIEWMTH(void setViewport(const OdGsDCRectDouble& screenRec), setViewport(screenRec))
315 MT_VECT_VIEWMTH(void getViewport(OdGePoint2d& lowerLeft, OdGePoint2d& upperRight) const, getViewport(lowerLeft, upperRight))
316 MT_VECT_VIEWMTH(void getViewport(OdGsDCRect& screenRect) const, getViewport(screenRect))
317 MT_VECT_VIEWMTH(void getViewport(OdGsDCRectDouble& screenRec) const, getViewport(screenRec))
318 MT_VECT_VIEWMTH_RET(OdGeMatrix3d screenMatrix() const, screenMatrix())
319 MT_VECT_VIEWMTH_RET(OdGeMatrix3d worldToDeviceMatrix() const, worldToDeviceMatrix())
321 MT_VECT_VIEWMTH_RET(OdGeMatrix3d viewingMatrix() const, viewingMatrix())
322 MT_VECT_VIEWMTH_RET(OdGeMatrix3d projectionMatrix() const, projectionMatrix())
323 //MT_VECT_VIEWMTH(void viewParameters(OdGsView* pView) const, viewParameters(pView))
324 MT_VECT_VIEWMTH_RET(double lineweightToDcScale() const, lineweightToDcScale())
325 //MT_VECT_VIEWMTH(void setLineweightToDcScale(double scale), setLineweightToDcScale(scale))
326 //MT_VECT_VIEWMTH(void setLineweightEnum(int numLineweights, const OdUInt8* lineweights), setLineweightEnum(numLineweights, lineweights))
327 //MT_VECT_VIEWMTH(void setLinetypeScaleMultiplier(double linetypeScaleMultiplier), setLinetypeScaleMultiplier(linetypeScaleMultiplier))
328 //MT_VECT_VIEWMTH(void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier),
329 // setAlternateLinetypeScaleMultiplier(linetypeAlternateScaleMultiplier))
330 MT_VECT_VIEWMTH_RET(double linetypeScaleMultiplier() const, linetypeScaleMultiplier())
331 //MT_VECT_VIEWMTH(void dolly(const OdGeVector3d& dollyVector), dolly(dollyVector))
332 //MT_VECT_VIEWMTH(void dolly(double xDolly, double yDolly, double zDolly), dolly(xDolly, yDolly, zDolly))
333 //MT_VECT_VIEWMTH(void roll(double rollAngle), roll(rollAngle))
334 //MT_VECT_VIEWMTH(void orbit(double xOrbit, double yOrbit), orbit(xOrbit, yOrbit))
335 //MT_VECT_VIEWMTH(void zoom(double zoomFactor), zoom(zoomFactor))
336 //MT_VECT_VIEWMTH(void pan(double xPan, double yPan), pan(xPan, yPan))
337 //MT_VECT_VIEWMTH(void setView(const OdGePoint3d & position, const OdGePoint3d& target, const OdGeVector3d& upVector,
338 // double fieldWidth, double fieldHeight, Projection projection = kParallel),
339 // setView(position, target, upVector, fieldWidth, fieldHeight, projection))
340 MT_VECT_VIEWMTH(void viewportClipRegion(OdIntArray& counts, OdGePoint2dArray& vertices) const,
341 viewportClipRegion(counts, vertices))
342 MT_VECT_VIEWMTH(void viewportClipRegion(OdIntArray& counts, OdGsDCPointArray& dcPts) const,
343 viewportClipRegion(counts, dcPts))
344 //MT_VECT_VIEWMTH(void setViewportClipRegion(int numContours, const int* numVertices, const OdGePoint2d* vertices),
345 // setViewportClipRegion(numContours, numVertices, vertices))
346 //MT_VECT_VIEWMTH(void setViewportClipRegion(int numContours, int const* numVertices, OdGsDCPoint const* vertices),
347 // setViewportClipRegion(numContours, numVertices, vertices))
348 MT_VECT_VIEWMTH_RET(bool isDependentViewportView() const, isDependentViewportView())
349 MT_VECT_VIEWMTH_RET(bool isDependentGeometryView() const, isDependentGeometryView())
350 MT_VECT_VIEWMTH_RET(bool isHelperView() const, isHelperView())
352 MT_VECT_VIEWMTH_RET(const OdGiContextualColors *contextualColors() const, contextualColors())
353 //MT_VECT_VIEWMTH(void setContextualColors(OdGiContextualColors *pColors), setContextualColors())
354 MT_VECT_VIEWMTH_RET(bool pointInViewport(const OdGePoint2d& screenPoint) const, pointInViewport(screenPoint))
355 //MT_VECT_VIEWMTH(void setClearColor(ClearColor color), setClearColor(color))
356 MT_VECT_VIEWMTH(void invalidate(), invalidate())
357 MT_VECT_VIEWMTH(void invalidate(const OdGsDCRect &rect), invalidate(rect))
359 //MT_VECT_VIEWMTH(void select(const OdGsDCPoint* points, int numPoints, OdGsSelectionReactor* pReactor, OdGsView::SelectionMode mode = OdGsView::kCrossing),
360 // select(points, numPoints, pReactor, mode))
361 //MT_VECT_VIEWMTH_RET(bool add(OdGiDrawable* sceneGraph, OdGsModel* model), add(sceneGraph, model))
362 //MT_VECT_VIEWMTH_RET(bool erase(OdGiDrawable* sceneGraph), erase(sceneGraph))
363 //MT_VECT_VIEWMTH(void eraseAll(), eraseAll())
364 MT_VECT_VIEWMTH_RET(bool isValid() const, isValid())
365 MT_VECT_VIEWMTH(void getNumPixelsInUnitSquare(const OdGePoint3d& givenWorldpt, OdGePoint2d& pixelArea, bool includePerspective = true) const,
366 getNumPixelsInUnitSquare(givenWorldpt, pixelArea, includePerspective));
367 //MT_VECT_VIEWMTH(void setBackground(OdDbStub *backgroundId), setBackground(backgroundId))
368 MT_VECT_VIEWMTH_RET(OdDbStub *background() const, background())
369 //MT_VECT_VIEWMTH(void setVisualStyle(OdDbStub *visualStyleId), setVisualStyle(visualStyleId))
370 MT_VECT_VIEWMTH_RET(OdDbStub *visualStyle() const, visualStyle())
371 //MT_VECT_VIEWMTH(void setVisualStyle(const OdGiVisualStyle &visualStyle), setVisualStyle(visualStyle))
372 MT_VECT_VIEWMTH_RET(bool visualStyle(OdGiVisualStyle &visualStyle) const, visualStyle(visualStyle))
373 MT_VECT_VIEWMTH_RET(OdUInt32 viewportId() const, viewportId())
374 MT_VECT_VIEWMTH_RET(OdDbStub* getViewportObjectId() const, getViewportObjectId())
375 //MT_VECT_VIEWMTH_RET(bool viewExtents(OdGeBoundBlock3d& extents) const, viewExtents(extents))
376 //MT_VECT_VIEWMTH(void select(const OdGePoint2d* aPtDc, int numPoints, OdGsSelectionReactor* pReactor, OdGsView::SelectionMode mode = OdGsView::kCrossing),
377 // select(aPtDc, numPoints, pReactor, mode))
378 MT_VECT_VIEWMTH_RET(bool isSnapping() const, isSnapping())
379 //MT_VECT_VIEWMTH(void setSnapping(bool val), setSnapping(val))
380 MT_VECT_VIEWMTH_RET(bool isRegenOnDrawForbidden() const, isRegenOnDrawForbidden())
381 //MT_VECT_VIEWMTH(void setRegenOnDrawForbidden(bool val), setRegenOnDrawForbidden())
382 //MT_VECT_VIEWMTH(void clearLinetypeCache(), clearLinetypeCache())
383 MT_VECT_VIEWMTH_RET(double linetypeAlternateScaleMultiplier() const, linetypeAlternateScaleMultiplier())
384 MT_VECT_VIEWMTH_RET(OdUInt32 frozenLayers() const, frozenLayers())
386 MT_VECT_VIEWMTH_RET(bool isLayerVisible(OdDbStub* layerId) const, isLayerVisible(layerId))
387 MT_VECT_VIEWMTH_RET(int lineweightToPixels(OdDb::LineWeight lineweight) const, lineweightToPixels(lineweight))
388 MT_VECT_VIEWMTH_RET(double lineweightToPixels(double lineweight) const, lineweightToPixels(lineweight))
389 MT_VECT_VIEWMTH(void screenRect(OdGsDCPoint &lowerLeft, OdGsDCPoint &upperRight) const, screenRect(lowerLeft, upperRight))
390 MT_VECT_VIEWMTH(void screenRect(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const, screenRect(lowerLeft, upperRight))
391 MT_VECT_VIEWMTH(void screenRectNorm(OdGsDCRect& normalizedRect) const, screenRectNorm(normalizedRect))
392 MT_VECT_VIEWMTH(void viewportDcCorners(OdGePoint2d& lower_left, OdGePoint2d& upper_right) const, viewportDcCorners(lower_left, upper_right))
393 MT_VECT_VIEWMTH_RET(bool doPerspectivePt(OdGePoint3d& point) const, doPerspectivePt(point))
394 MT_VECT_VIEWMTH_RET(bool doInversePerspectivePt(OdGePoint3d& point) const, doInversePerspectivePt(point))
395 MT_VECT_VIEWMTH_RET(OdGeMatrix3d eyeToScreenMatrix() const, eyeToScreenMatrix())
396 MT_VECT_VIEWMTH_RET(const OdGeMatrix3d& eyeToWorldMatrix() const, eyeToWorldMatrix())
397 MT_VECT_VIEWMTH_RET(const OdGeMatrix3d& worldToEyeMatrix() const, worldToEyeMatrix())
398 MT_VECT_VIEWMTH_RET(ClearColor clearColor() const, clearColor())
399 MT_VECT_VIEWMTH(void invalidate(const OdGeExtents3d& worldExt, OdDb::LineWeight extendByLineweight = OdDb::kLnWt000),
400 invalidate(worldExt, extendByLineweight))
401 MT_VECT_VIEWMTH(void invalidateRegion(const OdGiPathNode& path), invalidateRegion(path))
402 MT_VECT_VIEWMTH_RET(OdGsDCRectArray invalidRects() const, invalidRects())
403 MT_VECT_VIEWMTH_RET(bool isViewportOnScreen() const, isViewportOnScreen())
404 MT_VECT_VIEWMTH_RET(bool isCompletelyVisible() const, isCompletelyVisible())
405 //MT_VECT_VIEWMTH(void setInversion(bool invertedX, bool invertedY), setInversion(invertexX, invertexY))
406 MT_VECT_VIEWMTH_RET(OdGiRegenType getRegenType() const, getRegenType())
407 MT_VECT_VIEWMTH_RET(double focalLength() const, focalLength())
408 MT_VECT_VIEWMTH_RET(const OdGeVector3d& eyeVector() const, eyeVector())
409 MT_VECT_VIEWMTH_RET(const OdGeVector3d& xVector() const, xVector())
410 MT_VECT_VIEWMTH_RET(double getLinetypeScaleMultiplier() const, getLinetypeScaleMultiplier())
411 MT_VECT_VIEWMTH_RET(double getLinetypeGenerationCriteria() const, getLinetypeGenerationCriteria())
412 MT_VECT_VIEWMTH_RET(double getDeviation(const OdGiDeviationType deviationType, const OdGePoint3d& pointOnCurve, bool bRecalculate = false) const,
413 getDeviation(deviationType, pointOnCurve, bRecalculate))
414 //MT_VECT_VIEWMTH(void initDeviation(), initDeviation())
415 MT_VECT_VIEWMTH_RET(int cachedDrawables() const, cachedDrawables())
416 MT_VECT_VIEWMTH_RET(OdUInt32 localViewportId(const OdGsBaseModel *pModel) const, localViewportId(pModel))
417 MT_VECT_VIEWMTH_RET(OdGsViewLocalId &getViewLocalId(), getViewLocalId())
418 //MT_VECT_VIEWMTH_RET(bool sceneDept(double& zNear, double& zFar, OdGsOverlayId nOverlay = kGsMainOverlay) const, sceneDept(zNear, zFar, nOverlay))
419 //MT_VECT_VIEWMTH_RET(bool usesDept(double* pMinDeptSupported = 0, double* pMaxDeptSupported = 0) const, usesDept(pMinDeptSupported, pMaxDepSupported))
420 MT_VECT_VIEWMTH_RET(bool isNonRectClipped() const, isNonRectClipped())
421 MT_VECT_VIEWMTH_RET(bool hasLweights() const, hasLweights())
422 MT_VECT_VIEWMTH_RET(const OdGePoint2d& dcScreenMin() const, dcScreenMin())
423 MT_VECT_VIEWMTH_RET(const OdGePoint2d& dcScreenMax() const, dcScreenMax())
424 MT_VECT_VIEWMTH_RET(const OdGePoint2d& dcLowerLeft() const, dcLowerLeft())
425 MT_VECT_VIEWMTH_RET(const OdGePoint2d& dcUpperRight() const, dcUpperRight())
426 MT_VECT_VIEWMTH_RET(OdGeMatrix3d perspectiveMatrix() const, perspectiveMatrix())
427 //MT_VECT_VIEWMTH(void invalidateCachedViewportGeometry(OdUInt32 mask), invalidateCachedViewportGeometry(mask))
428 MT_VECT_VIEWMTH_RET(double calcDeviation(const OdGiDeviationType type, const OdGePoint3d& pt) const, calcDeviation(type, pt))
430 MT_VECT_VIEWMTH_RET(bool updateViewportProperties(OdUInt32 incFlags), updateViewportProperties(incFlags))
432 MT_VECT_VIEWMTH_RET(const OdGeMatrix3d& rotationMatrix() const, rotationMatrix())
433 MT_VECT_VIEWMTH_RET(short viewportRotation() const, viewportRotation())
434 MT_VECT_VIEWMTH_RET(bool isRotated() const, isRotated())
435 MT_VECT_VIEWMTH_RET(double unrotatedFieldHeight() const, unrotatedFieldHeight())
436 MT_VECT_VIEWMTH_RET(double unrotatedFieldWidth() const, unrotatedFieldWidth())
437 //MT_VECT_VIEWMTH(void initCullingVolume(), initCullingVolume())
438 //MT_VECT_VIEWMTH(void setCullingVolume(OdGsCullingVolumePtr newVol), setCullingVolume(newVol))
439 MT_VECT_VIEWMTH_RET(OdGsCullingVolumePtr cullingVolume() const, cullingVolume())
440 MT_VECT_VIEWMTH_RET(bool isCullingVolumeInitialized() const, isCullingVolumeInitialized())
441 MT_VECT_VIEWMTH_RET(bool cullingVolumeIntersectWithOpt(const OdGsCullingPrimitive &prim) const, cullingVolumeIntersectWithOpt(prim))
442 MT_VECT_VIEWMTH_RET(OdGsCullingVolume::IntersectionStatus cullingVolumeIntersectWith(const OdGsCullingPrimitive &prim) const,
444 MT_VECT_VIEWMTH(void cullingVolumeTransformBy(const OdGeMatrix3d &xfm), cullingVolumeTransformBy(xfm))
445
446#undef MT_VECT_VIEWMTH_RET
447#undef MT_VECT_VIEWMTH
448
449#endif
450};
451
459class OdGsBaseVectorizeViewDef : public OdGsBaseVectorizeViewJoin<OdGsBaseVectorizer>
460{
461 public:
466};
467
475class OdGsBaseVectorizeViewMT : public OdGsBaseVectorizeViewJoinMT<OdGsBaseVectorizer>
476{
477 public:
482
488 bool isMTView() const
489 {
490 return (&view() != this);
491 }
492};
493
501template <int SyncCount = 4>
503{
504 protected:
507 public:
509 void setEnabled(bool bEnable) { m_bEnabled = bEnable; }
510 bool isEnabled() const { return m_bEnabled; }
511 void lock(OdUInt32 nSync)
512 {
513 //if (odThreadsCounter())
514 if (m_bEnabled)
515 m_locker[nSync].get()->lock();
516 }
517 void unlock(OdUInt32 nSync)
518 {
519 //if (odThreadsCounter())
520 if (m_bEnabled)
521 m_locker[nSync].get()->unlock();
522 }
523 protected:
524 void check(int nSyncObjects) { if (nSyncObjects != SyncCount) throw OdError(eOutOfRange); }
525 public:
527 {
529 OdUInt32 m_syncType;
530 public:
532 : m_syncPoint(syncPoint), m_syncType(syncType)
533 {
534 m_syncPoint.lock(m_syncType);
535 }
537 {
538 m_syncPoint.unlock(m_syncType);
539 }
540 };
541};
542
551{
552 public:
554 {
559
561 };
562 public:
566};
567
576{
577 public:
579 : OdGsBaseDeviceMTHelpers::SyncHelper(syncPoint, syncType) {}
580};
581
582#include "TD_PackPop.h"
583
584#endif // ODGSBASEINCLUDE_INC
true
Definition: DimVarDefs.h:2046
false
Definition: DimVarDefs.h:165
OdGiRegenType
Definition: GiCommonDraw.h:51
OdGiDeviationType
Definition: GiCommonDraw.h:65
#define IMPL_VECTORIZER_DEFAULT()
#define ODRX_USING_HEAP_OPERATORS(T)
Definition: OdHeap.h:140
#define ODCOLORREF
Definition: OdPlatform.h:933
#define OD_T(x)
unsigned int OdUInt32
#define OdSaveStateFlag(type, flag, name, flags, newVal)
Definition: SaveState.h:99
FIRSTDLL_EXPORT ThreadsCounter & odThreadsCounter()
bool isNull() const
Definition: BaseObjectPtr.h:86
int lineweightToPixels(OdDb::LineWeight lineweight) const
OdGsViewImpl & view() const
virtual OdGeMatrix3d objectToDeviceMatrix() const
void unlock(SyncType nSync)
void lock(SyncType nSync)
SyncHelper(OdGsBaseDeviceMTHelpersTemplate &syncPoint, OdUInt32 syncType)
void unlock(OdUInt32 nSync)
void check(int nSyncObjects)
OdMutexPtr m_locker[SyncCount]
OdGsBaseDeviceMTSyncHelper(OdGsBaseDeviceMTHelpers &syncPoint, OdGsBaseDeviceMTHelpers::SyncType syncType)
virtual OdGiContext * userGiContext() const
void setVisualStyle(const OdGiVisualStyle &visualStyle)
int lineweightToPixels(OdDb::LineWeight lineweight) const
OdGeMatrix3d objectToDeviceMatrix() const
bool isSupportPlotStyles() const
ODRX_USING_HEAP_OPERATORS(BaseVectorizerObject)
virtual void clearLinetypeCache()
Definition: GsBaseInclude.h:67
double lineweightToPixels(double lineweight) const
virtual void releaseVectorizer(OdGsBaseVectorizer *)
virtual OdUInt32 numVectorizers() const
OdArray< OdGsViewPtr > m_vectorizers
virtual OdGsBaseVectorizer * getVectorizer(bool)
virtual void setUp(OdGsViewImpl &view)
virtual OdRxDictionaryPtr properties()=0
ClearColor
Definition: Gs.h:1044
virtual void setUserGiContext(OdGiContext *pUserGiContext)=0
virtual OdGsDevice * device() const =0
RenderMode
Definition: Gs.h:148
virtual OdGsViewPtr cloneView(bool cloneViewParameters=true, bool cloneGeometry=false)=0
OdUInt32 viewportId() const
Definition: GsViewImpl.h:1119
const OdGePoint2d & dcScreenMin() const
Definition: GsViewImpl.h:1617
virtual void invalidateCachedViewportGeometry()
virtual OdGiRegenType getRegenType() const
Definition: GsViewImpl.h:1439
OdGsClientViewInfo m_viewInfo
Definition: GsViewImpl.h:2187
bool hasLweights() const
Definition: GsViewImpl.h:1607
const OdGeMatrix3d & eyeToWorldMatrix() const
Definition: GsViewImpl.h:2328
virtual double getDeviation(const OdGiDeviationType deviationType, const OdGePoint3d &pointOnCurve, bool bRecalculate=false) const
bool isDependentViewportView() const
Definition: GsViewImpl.h:2211
double windowAspect() const
virtual OdGePoint3d position() const
virtual OdGePoint3d target() const
virtual OdGeMatrix3d screenMatrix() const
OdDbStub * getViewportObjectId() const
Definition: GsViewImpl.h:1134
bool isLayerVisible(OdDbStub *layerId) const
virtual void getNumPixelsInUnitSquare(const OdGePoint3d &givenWorldpt, OdGePoint2d &pixelArea, bool includePerspective=true) const
const OdGiContextualColors * contextualColors() const
Definition: GsViewImpl.h:2231
virtual OdDbStub * background() const
void screenRectNorm(OdGsDCRect &normalizedRect) const
OdGsDCRectArray invalidRects(OdGsOverlayId nOverlay=kGsMainOverlay) const
virtual bool isValid() const
const OdGePoint2d & dcScreenMax() const
Definition: GsViewImpl.h:1622
virtual void cullingVolumeTransformBy(const OdGeMatrix3d &xfm)
virtual OdGeVector3d upVector() const
double getLinetypeGenerationCriteria() const
OdGeMatrix3d perspectiveMatrix() const
virtual bool cullingVolumeIntersectWithOpt(const OdGsCullingPrimitive &prim) const
void invalidateRegion(const OdGiPathNode &path)
OdGsPropertiesPtr getViewportPropertiesRoot() const
double focalLength() const
void screenRect(OdGsDCPoint &lowerLeft, OdGsDCPoint &upperRight) const
virtual bool isPerspective() const
virtual double lineweightToDcScale() const
double linetypeAlternateScaleMultiplier() const
virtual double lensLength() const
virtual bool isVisible()
ClearColor clearColor() const
virtual void getViewportBorderProperties(ODCOLORREF &color, int &width) const
virtual RenderMode mode() const
virtual OdGeMatrix3d projectionMatrix() const
const OdGeMatrix3d & worldToEyeMatrix() const
Definition: GsViewImpl.h:2338
const OdGeMatrix3d & rotationMatrix() const
virtual void viewportClipRegion(OdIntArray &counts, OdGePoint2dArray &vertices) const
bool isViewportOnScreen() const
virtual void setVisualStyle(OdDbStub *visualStyleId)
virtual void invalidate()
virtual double frontClip() const
double getLinetypeScaleMultiplier() const
double calcDeviation(const OdGiDeviationType type, const OdGePoint3d &pt) const
OdUInt32 frozenLayers() const
Definition: GsViewImpl.h:1232
virtual double fieldWidth() const
bool doPerspectivePt(OdGePoint3d &point) const
virtual void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
virtual bool isStereoEnabled() const
virtual bool isCullingVolumeInitialized() const
bool isRegenOnDrawForbidden() const
Definition: GsViewImpl.h:2368
bool isHelperView() const
Definition: GsViewImpl.h:2221
int cachedDrawables() const
Definition: GsViewImpl.h:1508
virtual bool isBackClipped() const
virtual OdGeMatrix3d worldToDeviceMatrix() const
virtual bool pointInViewport(const OdGePoint2d &screenPoint) const
virtual double fieldHeight() const
double unrotatedFieldHeight() const
OdGsCullingVolumePtr cullingVolume() const
virtual OdGsCullingVolume::IntersectionStatus cullingVolumeIntersectWith(const OdGsCullingPrimitive &prim) const
virtual bool isFrontClipped() const
bool updateViewportProperties(OdUInt32 incFlags)
short viewportRotation() const
bool doInversePerspectivePt(OdGePoint3d &point) const
OdGsViewLocalId & getViewLocalId()
Definition: GsViewImpl.h:1521
bool isSnapping() const
Definition: GsViewImpl.h:2358
virtual double backClip() const
virtual OdGeMatrix3d viewingMatrix() const
void viewportDcCorners(OdGePoint2d &lower_left, OdGePoint2d &upper_right) const
const OdGePoint2d & dcLowerLeft() const
Definition: GsViewImpl.h:1627
virtual bool isViewportBorderVisible() const
bool isDependentGeometryView() const
Definition: GsViewImpl.h:2216
OdGeMatrix3d eyeToScreenMatrix(OdGsOverlayId nOverlay=kGsMainOverlay) const
bool isRotated() const
Definition: GsViewImpl.h:2317
OdGsPropertiesPtr getViewportPropertiesForType(OdGsProperties::PropertiesType type) const
virtual void getStereoParameters(double &magnitude, double &parallax) const
bool isCompletelyVisible() const
Definition: GsViewImpl.h:2388
const OdGePoint2d & dcUpperRight() const
Definition: GsViewImpl.h:1632
virtual OdDbStub * visualStyle() const
OdUInt32 localViewportId(const OdGsBaseModel *pModel) const
Definition: GsViewImpl.h:1516
double unrotatedFieldWidth() const
const OdGeVector3d & xVector() const
Definition: GsViewImpl.h:1454
bool isNonRectClipped() const
Definition: GsViewImpl.h:2312
OdGsBaseVectorizeDevice * baseDevice()
Definition: GsViewImpl.h:1139
const OdGeVector3d & eyeVector() const
Definition: GsViewImpl.h:1449
virtual double linetypeScaleMultiplier() const
void lock()
Definition: OdMutex.h:84
void unlock()
Definition: OdMutex.h:91
OdMutex * get()
virtual OdRxObjectPtr getAt(const OdString &key) const =0
virtual bool has(const OdString &key) const =0
const T * get() const
Definition: SmartPtr.h:339
GLint GLenum GLsizei width
Definition: gles2_ext.h:110
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
LineWeight
Definition: OdaDefs.h:386