CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GsInterfaceWrappers.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 __GSINTERFACEWRAPPERS_H_INCLUDED_
25#define __GSINTERFACEWRAPPERS_H_INCLUDED_
26
27#include "Gs/Gs.h"
28#include "Ge/GePoint3d.h"
29#include "Ge/GeVector3d.h"
30#include "Ge/GeMatrix3d.h"
31#include "Gs/GsModel.h"
32#include "Gs/GsUpdateManager.h"
33
34#include "UInt8Array.h"
35#include "IntArray.h"
36#include "Ge/GePoint2dArray.h"
37
38#include "TD_PackPush.h"
39
47template <typename RedirectionBaseInterface, typename RedirectionInterface>
48class OdGsDefaultRedirectionBase : public RedirectionInterface
49{
50 private:
51 RedirectionBaseInterface *m_pRedirectionObj;
52 public:
58 OdGsDefaultRedirectionBase(RedirectionBaseInterface *pRedirectionObj = NULL)
59 : m_pRedirectionObj(pRedirectionObj)
60 {}
61
67 bool hasRedirection() const { return m_pRedirectionObj != NULL; }
68
72 const RedirectionBaseInterface *redirection() const { return m_pRedirectionObj; }
73
77 RedirectionBaseInterface *redirection() { return m_pRedirectionObj; }
78
84 void setRedirection(RedirectionBaseInterface *pRedirectionObj) { m_pRedirectionObj = pRedirectionObj; }
85
89 void resetRedirection() { m_pRedirectionObj = NULL; }
90};
91
99template <typename RedirectionBaseInterface, typename RedirectionInterface>
100class OdGsAbstractRedirectionBase : public RedirectionInterface
101{
102 public:
106 OdGsAbstractRedirectionBase(RedirectionBaseInterface * /*pRedirectionObj*/ = NULL)
107 {}
108
114 virtual bool hasRedirection() const = 0;
115
119 virtual const RedirectionBaseInterface *redirection() const = 0;
120
124 virtual RedirectionBaseInterface *redirection() = 0;
125
131 virtual void setRedirection(RedirectionBaseInterface * /*pRedirectionObj*/) {}
132
136 virtual void resetRedirection() {}
137};
138
150template <typename GsViewInterface = OdGsView, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsView, GsViewInterface> >
151class OdGsViewWrapper : public RedirectionBase
152{
153 private:
154 bool trHas() const { return this->hasRedirection(); }
155 const OdGsView *trCall() const { return this->redirection(); }
156 OdGsView *trCall() { return this->redirection(); }
157 public:
163 OdGsViewWrapper(OdGsView *pRedirectionView = NULL)
164 : RedirectionBase(pRedirectionView)
165 {}
166
167 // OdGsView wrappers
168
174 {
175 if (trHas())
176 return trCall()->device();
177 return NULL;
178 }
179
185 {
186 if (trHas())
187 return trCall()->userGiContext();
188 return NULL;
189 }
195 void setUserGiContext(OdGiContext* pUserGiContext)
196 {
197 if (trHas())
198 trCall()->setUserGiContext(pUserGiContext);
199 }
200
207 double lineweightToDcScale() const
208 {
209 if (trHas())
210 return trCall()->lineweightToDcScale();
211 return 1.0;
212 }
213
221 {
222 if (trHas())
223 trCall()->setLineweightToDcScale(scale);
224 }
225
233 void setLineweightEnum(int numLineweights, const OdUInt8* lineweights)
234 {
235 if (trHas())
236 trCall()->setLineweightEnum(numLineweights, lineweights);
237 }
238
248 void setViewport(const OdGePoint2d& lowerLeft, const OdGePoint2d& upperRight)
249 {
250 if (trHas())
251 trCall()->setViewport(lowerLeft, upperRight);
252 }
253
263 void setViewport(const OdGsDCRect& screenRect)
264 {
265 if (trHas())
266 trCall()->setViewport(screenRect);
267 }
268
277 void setViewport(const OdGsDCRectDouble& screenRect)
278 {
279 if (trHas())
280 trCall()->setViewport(screenRect);
281 }
282
295 void getViewport(OdGePoint2d& lowerLeft, OdGePoint2d& upperRight) const
296 {
297 if (trHas())
298 trCall()->getViewport(lowerLeft, upperRight);
299 }
300
311 void getViewport(OdGsDCRect& screenRect) const
312 {
313 if (trHas())
314 trCall()->getViewport(screenRect);
315 }
316
324 void getViewport(OdGsDCRectDouble& screenRect) const
325 {
326 if (trHas())
327 trCall()->getViewport(screenRect);
328 }
329
337 void setViewportClipRegion(int numContours, int const* numVertices, OdGsDCPoint const* vertices)
338 {
339 if (trHas())
340 trCall()->setViewportClipRegion(numContours, numVertices, vertices);
341 }
342
350 void setViewportClipRegion(int numContours, int const* numVertices, OdGePoint2d const* vertices)
351 {
352 if (trHas())
353 trCall()->setViewportClipRegion(numContours, numVertices, vertices);
354 }
355
362 void viewportClipRegion(OdIntArray& counts, OdGsDCPointArray& vertices) const
363 {
364 if (trHas())
365 trCall()->viewportClipRegion(counts, vertices);
366 }
367
374 void viewportClipRegion(OdIntArray& counts, OdGePoint2dArray& vertices) const
375 {
376 if (trHas())
377 trCall()->viewportClipRegion(counts, vertices);
378 }
379
386 void setViewport3dClipping(const OdGiClipBoundary* pBoundary, const OdGiAbstractClipBoundary* pClipInfo = NULL)
387 {
388 if (trHas())
389 trCall()->setViewport3dClipping(pBoundary, pClipInfo);
390 }
391
400 const OdGiClipBoundary *viewport3dClipping(const OdGiAbstractClipBoundary** ppClipInfo = NULL) const
401 {
402 if (trHas())
403 return trCall()->viewport3dClipping(ppClipInfo);
404 return NULL;
405 }
406
413 {
414 if (trHas())
415 trCall()->setViewportBorderProperties(color, width);
416 }
417
424 {
425 if (trHas())
426 trCall()->getViewportBorderProperties(color, width);
427 }
428
434 {
435 if (trHas())
436 trCall()->setViewportBorderVisibility(visible);
437 }
438
446 {
447 if (trHas())
448 return trCall()->isViewportBorderVisible();
449 return false;
450 }
451
473 double fieldWidth, double fieldHeight, OdGsView::Projection projectionType = OdGsView::kParallel)
474 {
475 if (trHas())
476 trCall()->setView(position, target, upVector, fieldWidth, fieldHeight, projectionType);
477 }
478
484 {
485 if (trHas())
486 return trCall()->position();
488 }
489
495 {
496 if (trHas())
497 return trCall()->target();
499 }
500
506 {
507 if (trHas())
508 return trCall()->upVector();
510 }
511
516 double lensLength() const
517 {
518 if (trHas())
519 return trCall()->lensLength();
520 return 50.0;
521 }
522
528 {
529 if (trHas())
530 trCall()->setLensLength(lensLength);
531 }
532
539 bool isPerspective() const
540 {
541 if (trHas())
542 return trCall()->isPerspective();
543 return false;
544 }
545
550 double fieldWidth() const
551 {
552 if (trHas())
553 return trCall()->fieldWidth();
554 return 1.0;
555 }
556
561 double fieldHeight() const
562 {
563 if (trHas())
564 return trCall()->fieldHeight();
565 return 1.0;
566 }
567
572 void setEnableFrontClip(bool enable)
573 {
574 if (trHas())
575 trCall()->setEnableFrontClip(enable);
576 }
577
584 bool isFrontClipped() const
585 {
586 if (trHas())
587 return trCall()->isFrontClipped();
588 return false;
589 }
590
596 {
597 if (trHas())
598 trCall()->setFrontClip(frontClip);
599 }
600
605 double frontClip() const
606 {
607 if (trHas())
608 return trCall()->frontClip();
609 return 0.0;
610 }
611
616 void setEnableBackClip(bool enable)
617 {
618 if (trHas())
619 trCall()->setEnableBackClip(enable);
620 }
621
628 bool isBackClipped() const
629 {
630 if (trHas())
631 return trCall()->isBackClipped();
632 return false;
633 }
634
640 {
641 if (trHas())
642 trCall()->setBackClip(backClip);
643 }
644
649 double backClip() const
650 {
651 if (trHas())
652 return trCall()->backClip();
653 return 0.0;
654 }
655
661 {
662 if (trHas())
663 return trCall()->viewingMatrix();
665 }
666
672 {
673 if (trHas())
674 return trCall()->projectionMatrix();
676 }
677
683 {
684 if (trHas())
685 return trCall()->screenMatrix();
687 }
688
698 {
699 if (trHas())
700 return trCall()->worldToDeviceMatrix();
702 }
703
709 {
710 if (trHas())
711 return trCall()->objectToDeviceMatrix();
713 }
714
736 {
737 if (trHas())
738 trCall()->setMode(mode);
739 }
740
761 {
762 if (trHas())
763 return trCall()->mode();
764 return OdGsView::kNone;
765 }
766
783 bool add(OdGiDrawable* pSceneGraph, OdGsModel* pModel)
784 {
785 if (trHas())
786 return trCall()->add(pSceneGraph, pModel);
787 return false;
788 }
789
794 int numRootDrawables() const {
795 if (trHas())
796 return trCall()->numRootDrawables();
797 return 0;
798 }
799
806 OdDbStub* rootDrawableIdAt(int i, OdGsModelPtr* pModelReturn /*= 0*/) const {
807 if (trHas())
808 return trCall()->rootDrawableIdAt(i, pModelReturn);
809 return 0;
810 }
811
818 OdGiDrawablePtr rootDrawableAt(int i, OdGsModelPtr* pModelReturn /*= 0*/) const {
819 if (trHas())
820 return trCall()->rootDrawableAt(i, pModelReturn);
821 return OdGiDrawablePtr();
822 }
823
832 bool erase(OdGiDrawable* sceneGraph)
833 {
834 if (trHas())
835 return trCall()->erase(sceneGraph);
836 return false;
837 }
838
844 void eraseAll()
845 {
846 if (trHas())
847 trCall()->eraseAll();
848 }
849
856 OdGsModel *getModel(const OdGiDrawable *pDrawable) const
857 {
858 if (trHas())
859 return trCall()->getModel(pDrawable);
860 return NULL;
861 }
862
868 {
869 if (trHas())
870 return trCall()->getModelList();
871 return OdGsModelArray();
872 }
873
878 {
879 if (trHas())
880 trCall()->invalidate();
881 }
882
888 void invalidate(const OdGsDCRect &screenRect)
889 {
890 if (trHas())
891 trCall()->invalidate(screenRect);
892 }
893
906 bool isValid() const
907 {
908 if (trHas())
909 return trCall()->isValid();
910 return false;
911 }
912
919 void update()
920 {
921 if (trHas())
922 trCall()->update();
923 }
924
935 void beginInteractivity(double frameRateInHz)
936 {
937 if (trHas())
938 trCall()->beginInteractivity(frameRateInHz);
939 }
940
948 {
949 if (trHas())
950 trCall()->endInteractivity();
951 }
952
961 bool isInInteractivity() const
962 {
963 if (trHas())
964 return trCall()->isInInteractivity();
965 return false;
966 }
967
975 {
976 if (trHas())
977 return trCall()->interactivityFrameRate();
978 return 0.0;
979 }
980
987 void flush()
988 {
989 if (trHas())
990 trCall()->flush();
991 }
992
996 void hide()
997 {
998 if (trHas())
999 trCall()->hide();
1000 }
1001
1005 void show()
1006 {
1007 if (trHas())
1008 trCall()->show();
1009 }
1010
1018 {
1019 if (trHas())
1020 return trCall()->isVisible();
1021 return false;
1022 }
1023
1032 void freezeLayer(OdDbStub* layerID)
1033 {
1034 if (trHas())
1035 trCall()->freezeLayer(layerID);
1036 }
1037
1046 void thawLayer(OdDbStub* layerID)
1047 {
1048 if (trHas())
1049 trCall()->thawLayer(layerID);
1050 }
1051
1060 {
1061 if (trHas())
1062 trCall()->clearFrozenLayers();
1063 }
1064
1069 {
1070 if (trHas())
1072 }
1073
1084 void select(const OdGsDCPoint* pts, int nPoints, OdGsSelectionReactor* pReactor,
1086 {
1087 if (trHas())
1088 trCall()->select(pts, nPoints, pReactor, mode);
1089 }
1090
1101 void dolly(const OdGeVector3d& dollyVector)
1102 {
1103 if (trHas())
1104 trCall()->dolly(dollyVector);
1105 }
1106
1119 void dolly(double xDolly, double yDolly, double zDolly)
1120 {
1121 if (trHas())
1122 trCall()->dolly(xDolly, yDolly, zDolly);
1123 }
1124
1139 void roll(double rollAngle)
1140 {
1141 if (trHas())
1142 trCall()->roll(rollAngle);
1143 }
1144
1161 void orbit(double xOrbit, double yOrbit)
1162 {
1163 if (trHas())
1164 trCall()->orbit(xOrbit, yOrbit);
1165 }
1166
1172 void zoom(double zoomFactor)
1173 {
1174 if (trHas())
1175 trCall()->zoom(zoomFactor);
1176 }
1177
1194 void pan(double xPan, double yPan)
1195 {
1196 if (trHas())
1197 trCall()->pan(xPan, yPan);
1198 }
1199
1206 void zoomExtents(const OdGePoint3d &minPt, const OdGePoint3d &maxPt)
1207 {
1208 if (trHas())
1209 trCall()->zoomExtents(minPt, maxPt);
1210 }
1211
1218 void zoomWindow(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
1219 {
1220 if (trHas())
1221 trCall()->zoomWindow(lowerLeft, upperRight);
1222 }
1223
1232 bool pointInView(const OdGePoint3d &pt) const
1233 {
1234 if (trHas())
1235 return trCall()->pointInView(pt);
1236 return false;
1237 }
1238
1248 bool extentsInView(const OdGePoint3d &minPt, const OdGePoint3d &maxPt) const
1249 {
1250 if (trHas())
1251 return trCall()->extentsInView(minPt, maxPt);
1252 return false;
1253 }
1254
1264 OdGsViewPtr cloneView(bool cloneViewParameters = true, bool cloneGeometry = false)
1265 {
1266 if (trHas())
1267 return trCall()->cloneView(cloneViewParameters, cloneGeometry);
1268 return OdGsViewPtr();
1269 }
1270
1275 void viewParameters(OdGsView* pView) const
1276 {
1277 if (trHas())
1278 trCall()->viewParameters(pView);
1279 }
1280
1300 {
1301 if (trHas())
1302 return trCall()->exceededBounds();
1303 return false;
1304 }
1305
1311 void enableStereo(bool enabled)
1312 {
1313 if (trHas())
1314 trCall()->enableStereo(enabled);
1315 }
1316
1323 bool isStereoEnabled() const
1324 {
1325 if (trHas())
1326 return trCall()->isStereoEnabled();
1327 return false;
1328 }
1329
1345 void setStereoParameters(double magnitude, double parallax)
1346 {
1347 if (trHas())
1348 trCall()->setStereoParameters(magnitude, parallax);
1349 }
1350
1366 void getStereoParameters(double& magnitude, double& parallax) const
1367 {
1368 if (trHas())
1369 trCall()->getStereoParameters(magnitude, parallax);
1370 }
1371
1376 void initLights(OdRxIterator* pLightsIterator)
1377 {
1378 if (trHas())
1379 trCall()->initLights(pLightsIterator);
1380 }
1381
1388 {
1389 if (trHas())
1391 }
1392
1400 {
1401 if (trHas())
1402 return trCall()->linetypeScaleMultiplier();
1403 return 1.0;
1404 }
1405
1414 {
1415 if (trHas())
1417 }
1418
1426 {
1427 if (trHas())
1428 return trCall()->linetypeAlternateScaleMultiplier();
1429 return 1.0;
1430 }
1431
1438 {
1439 if (trHas())
1440 trCall()->clientViewInfo(clientViewInfo);
1441 }
1442
1449 {
1450 if (trHas())
1451 trCall()->setClearColor(color);
1452 }
1453
1462 bool pointInViewport(const OdGePoint2d& screenPoint) const
1463 {
1464 if (trHas())
1465 return trCall()->pointInViewport(screenPoint);
1466 return false;
1467 }
1468
1481 OdGePoint2d& pixelDensity, bool bUsePerspective = true) const
1482 {
1483 if (trHas())
1484 trCall()->getNumPixelsInUnitSquare(point, pixelDensity, bUsePerspective);
1485 }
1486
1494 void setBackground(OdDbStub *backgroundId)
1495 {
1496 if (trHas())
1497 trCall()->setBackground(backgroundId);
1498 }
1499
1506 OdDbStub *background() const
1507 {
1508 if (trHas())
1509 return trCall()->background();
1510 return NULL;
1511 }
1512
1520 void setVisualStyle(OdDbStub *visualStyleId)
1521 {
1522 if (trHas())
1523 trCall()->setVisualStyle(visualStyleId);
1524 }
1525
1532 OdDbStub *visualStyle() const
1533 {
1534 if (trHas())
1535 return trCall()->visualStyle();
1536 return NULL;
1537 }
1538
1547 {
1548 if (trHas())
1549 trCall()->setVisualStyle(visualStyle);
1550 }
1551
1564 {
1565 if (trHas())
1566 return trCall()->visualStyle(visualStyle);
1567 return false;
1568 }
1569
1579 {
1580 if (trHas())
1581 trCall()->enableDefaultLighting(bEnable, lightType);
1582 }
1583
1592 void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect &region)
1593 {
1594 if (trHas())
1595 trCall()->getSnapShot(pImage, region);
1596 }
1597
1613 void collide( OdGiPathNode const*const* pInputList, OdUInt32 nInputListSize, OdGsCollisionDetectionReactor* pReactor,
1614 OdGiPathNode const*const* pCollisionWithList = NULL, OdUInt32 nCollisionWithListSize = 0,
1615 const OdGsCollisionDetectionContext* pCtx = NULL )
1616 {
1617 if( trHas())
1618 trCall()->collide( pInputList, nInputListSize, pReactor, pCollisionWithList, nCollisionWithListSize, pCtx );
1619 }
1620
1627 {
1628 if (trHas())
1629 trCall()->enableAntiAliasing(nMode);
1630 }
1631
1636 {
1637 if (trHas())
1638 return trCall()->antiAliasingMode();
1639 return 3;
1640 }
1641
1647 void enableSSAO(bool bEnable) ODRX_OVERRIDE
1648 {
1649 if (trHas())
1650 trCall()->enableSSAO(bEnable);
1651 }
1652
1659 {
1660 if (trHas())
1661 return trCall()->ssaoMode();
1662 return false;
1663 }
1664};
1665
1673template <typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface> >
1674class OdGsDeviceWrapper : public RedirectionBase
1675{
1676 private:
1677 bool trHas() const { return this->hasRedirection(); }
1678 const OdGsDevice *trCall() const { return this->redirection(); }
1679 OdGsDevice *trCall() { return this->redirection(); }
1680 public:
1681
1687 OdGsDeviceWrapper(OdGsDevice *pRedirectionDevice = NULL)
1688 : RedirectionBase(pRedirectionDevice)
1689 {}
1690
1691 // OdGsDevice wrappers
1692
1701 {
1702 if (trHas())
1703 return trCall()->properties();
1704 return OdRxDictionaryPtr();
1705 }
1706
1712 {
1713 if (trHas())
1714 return trCall()->userGiContext();
1715 return NULL;
1716 }
1717
1722 void setUserGiContext(OdGiContext* pUserGiContext)
1723 {
1724 if (trHas())
1725 trCall()->setUserGiContext(pUserGiContext);
1726 }
1727
1732 {
1733 if (trHas())
1734 trCall()->invalidate();
1735 }
1736
1742 void invalidate(const OdGsDCRect &screenRect)
1743 {
1744 if (trHas())
1745 trCall()->invalidate(screenRect);
1746 }
1747
1760 bool isValid() const
1761 {
1762 if (trHas())
1763 return trCall()->isValid();
1764 return false;
1765 }
1766
1776 void update(OdGsDCRect* pUpdatedRect = 0)
1777 {
1778 if (trHas())
1779 trCall()->update(pUpdatedRect);
1780 }
1781
1790 void onSize(const OdGsDCRect& outputRect)
1791 {
1792 if (trHas())
1793 trCall()->onSize(outputRect);
1794 }
1795
1804 void onSize(const OdGsDCRectDouble& outputRect)
1805 {
1806 if (trHas())
1807 trCall()->onSize(outputRect);
1808 }
1809
1815 void getSize(OdGsDCRect& outputRect) const
1816 {
1817 if (trHas())
1818 trCall()->getSize(outputRect);
1819 }
1820
1826 void getSize(OdGsDCRectDouble& outputRect) const
1827 {
1828 if (trHas())
1829 trCall()->getSize(outputRect);
1830 }
1831
1836 {
1837 if (trHas())
1838 trCall()->onRealizeForegroundPalette();
1839 }
1840
1845 {
1846 if (trHas())
1847 trCall()->onRealizeBackgroundPalette();
1848 }
1849
1860 void onDisplayChange(int bitsPerPixel, int xPixels, int yPixels)
1861 {
1862 if (trHas())
1863 trCall()->onDisplayChange(bitsPerPixel, xPixels, yPixels);
1864 }
1865
1877 OdGsViewPtr createView(const OdGsClientViewInfo* pViewInfo = 0, bool enableLayerVisibilityPerView = false)
1878 {
1879 if (trHas())
1880 return trCall()->createView(pViewInfo, enableLayerVisibilityPerView);
1881 return OdGsViewPtr();
1882 }
1883
1889 void addView(OdGsView* pView)
1890 {
1891 if (trHas())
1892 trCall()->addView(pView);
1893 }
1894
1903 {
1904 if (trHas())
1905 return trCall()->createModel();
1906 return OdGsModelPtr();
1907 }
1908
1925 bool isModelCompatible(OdGsModel* pModel) const
1926 {
1927 if (trHas())
1928 return trCall()->isModelCompatible(pModel);
1929 return false;
1930 }
1931
1940 bool saveDeviceState(OdGsFiler *pFiler) const
1941 {
1942 if (trHas())
1943 return trCall()->saveDeviceState(pFiler);
1944 return false;
1945 }
1946
1956 {
1957 if (trHas())
1958 return trCall()->loadDeviceState(pFiler);
1959 return false;
1960 }
1961
1968 void insertView(int viewIndex, OdGsView* pView)
1969 {
1970 if (trHas())
1971 trCall()->insertView(viewIndex, pView);
1972 }
1973
1982 bool eraseView(OdGsView* pView)
1983 {
1984 if (trHas())
1985 return trCall()->eraseView(pView);
1986 return false;
1987 }
1988
1997 bool eraseView(int viewIndex)
1998 {
1999 if (trHas())
2000 return trCall()->eraseView(viewIndex);
2001 return false;
2002 }
2003
2008 {
2009 if (trHas())
2010 trCall()->eraseAllViews();
2011 }
2012
2017 int numViews() const
2018 {
2019 if (trHas())
2020 return trCall()->numViews();
2021 return 0;
2022 }
2023
2029 OdGsView* viewAt(int viewIndex)
2030 {
2031 if (trHas())
2032 return trCall()->viewAt(viewIndex);
2033 return NULL;
2034 }
2035
2043 bool setBackgroundColor(ODCOLORREF backgroundColor)
2044 {
2045 if (trHas())
2046 return trCall()->setBackgroundColor(backgroundColor);
2047 return false;
2048 }
2049
2055 {
2056 if (trHas())
2057 return trCall()->getBackgroundColor();
2058 return ODRGB(0, 0, 0);
2059 }
2060
2070 void setLogicalPalette(const ODCOLORREF* logicalPalette, int numColors)
2071 {
2072 if (trHas())
2073 trCall()->setLogicalPalette(logicalPalette, numColors);
2074 }
2075
2082 const ODCOLORREF* getLogicalPalette(int &numColors) const
2083 {
2084 if (trHas())
2085 return trCall()->getLogicalPalette(numColors);
2086 return NULL;
2087 }
2088
2098 void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect &region)
2099 {
2100 if (trHas())
2101 trCall()->getSnapShot(pImage, region);
2102 }
2103
2111 {
2112 if( trHas())
2113 {
2114 return trCall()->getUpdateManager( createIfNotExist );
2115 }
2117 return res;
2118 }
2119
2126 {
2127 if( trHas() )
2128 {
2129 trCall()->setUpdateManager( pManager );
2130 }
2131 }
2132};
2133
2141template <typename GsViewInterface = OdGsView, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsView, GsViewInterface> >
2142class OdGsViewWrapperMinimalImpl : public OdGsViewWrapper<GsViewInterface, RedirectionBase>
2143{
2144 protected:
2168 public:
2169
2199 OdGsViewWrapperMinimalImpl(OdGsView *pRedirectionView = NULL)
2200 : OdGsViewWrapper<GsViewInterface, RedirectionBase>(pRedirectionView)
2201 , m_pDevice(NULL)
2202 , m_pContext(NULL)
2203 , m_lwdDcScale(0.0)
2204 , m_borderColor(0)
2205 , m_borderWidth(1)
2207 , m_target(OdGePoint3d::kOrigin + OdGeVector3d::kZAxis)
2208 , m_upVector(OdGeVector3d::kYAxis)
2209 , m_fieldsWidth(1.0)
2210 , m_fieldsHeight(1.0)
2211 , m_projection(OdGsView::kParallel)
2212 , m_lensLength(50.0)
2215 , m_frontClip(0.0)
2216 , m_backClip(0.0)
2217 , m_renderMode(OdGsView::k2DOptimized)
2218 , m_bHidden(false)
2219 , m_ltpMult1(1.0)
2220 , m_ltpMult2(1.0)
2221 , m_bkgnd(NULL)
2222 , m_visualStyle(NULL)
2224 {}
2225
2226 // OdGsView wrappers
2227
2233 OdGsDevice* device() const { return m_pDevice; }
2234
2240 void setDevice(OdGsDevice *pDevice) { m_pDevice = pDevice; }
2241
2246
2252 void setUserGiContext(OdGiContext* pUserGiContext) { m_pContext = pUserGiContext; }
2253
2259 double lineweightToDcScale() const { return m_lwdDcScale; }
2260
2268
2278 void setViewport(const OdGePoint2d& lowerLeft, const OdGePoint2d& upperRight)
2279 { m_llVpt = lowerLeft; m_urVpt = upperRight; }
2280
2290 void setViewport(const OdGsDCRect& screenRect) { m_dcRect = OdGsDCRectDouble(screenRect); }
2291
2300 void setViewport(const OdGsDCRectDouble& screenRect) { m_dcRect = screenRect; }
2301
2313 void getViewport(OdGePoint2d& lowerLeft, OdGePoint2d& upperRight) const
2314 { lowerLeft = m_llVpt; upperRight = m_urVpt; }
2315
2326 void getViewport(OdGsDCRect& screenRect) const { screenRect = m_dcRect.round(); }
2327
2335 void getViewport(OdGsDCRectDouble& screenRect) const { screenRect = m_dcRect; }
2336
2344 void setViewportClipRegion(int numContours, int const* numVertices, OdGsDCPoint const* vertices)
2345 {
2346 m_nrcClipCounts.resize(numContours);
2347 int numVertexes = 0;
2348 for (int numContour = 0; numContour < numContours; numContour++)
2349 numVertexes += numVertices[numContour], m_nrcClipCounts[numContour] = numVertices[numContour];
2350 m_nrcClipPoints.resize(numVertexes);
2351 for (int numVertex = 0; numVertex < numVertexes; numVertex++)
2352 m_nrcClipPoints[numVertex].set(vertices[numVertex].x, vertices[numVertex].y);
2353 }
2354
2362 void setViewportClipRegion(int numContours, int const* numVertices, OdGePoint2d const* vertices)
2363 {
2364 m_nrcClipCounts.resize(numContours);
2365 int numVertexes = 0;
2366 for (int numContour = 0; numContour < numContours; numContour++)
2367 numVertexes += numVertices[numContour], m_nrcClipCounts[numContour] = numVertices[numContour];
2368 m_nrcClipPoints.resize(numVertexes);
2369 for (int numVertex = 0; numVertex < numVertexes; numVertex++)
2370 m_nrcClipPoints[numVertex] = vertices[numVertex];
2371 }
2372
2379 void viewportClipRegion(OdIntArray& counts, OdGsDCPointArray& vertices) const
2380 {
2381 counts = m_nrcClipCounts;
2382 const OdUInt32 nPoints = m_nrcClipPoints.size();
2383 vertices.resize(nPoints);
2384 OdGsDCPoint *pPt = vertices.asArrayPtr();
2385 for (OdUInt32 nPt = 0; nPt < nPoints; nPt++)
2386 pPt[nPt].x = (long)m_nrcClipPoints[nPt].x, pPt[nPt].y = (long)m_nrcClipPoints[nPt].y;
2387 }
2388
2395 void viewportClipRegion(OdIntArray& counts, OdGePoint2dArray& vertices) const
2396 { counts = m_nrcClipCounts; vertices = m_nrcClipPoints; }
2397
2404 { m_borderColor = color; m_borderWidth = width; }
2405
2412 { color = m_borderColor; width = m_borderWidth; }
2413
2418 void setViewportBorderVisibility(bool visible) { m_bBorderVisible = visible; }
2419
2426
2448 double fieldWidth, double fieldHeight, OdGsView::Projection projectionType = OdGsView::kParallel)
2449 {
2452 }
2453
2457 OdGePoint3d position() const { return m_position; }
2458
2462 OdGePoint3d target() const { return m_target; }
2463
2468
2472 double lensLength() const { return m_lensLength; }
2473
2479
2486
2490 double fieldWidth() const { return m_fieldsWidth; }
2491
2495 double fieldHeight() const { return m_fieldsHeight; }
2496
2501 void setEnableFrontClip(bool enable) { m_bFrontClip = enable; }
2502
2508 bool isFrontClipped() const { return m_bFrontClip; }
2509
2515
2519 double frontClip() const { return m_frontClip; }
2520
2525 void setEnableBackClip(bool enable) { m_bBackClip = enable; }
2526
2532 bool isBackClipped() const { return m_bBackClip; }
2533
2539
2543 double backClip() const { return m_backClip; }
2544
2566
2586
2590 void hide() { m_bHidden = true; }
2591
2595 void show() { m_bHidden = false; }
2596
2602 bool isVisible() { return !m_bHidden; }
2603
2610
2616 double linetypeScaleMultiplier() const { return m_ltpMult1; }
2617
2626
2633
2640
2647
2655 void setBackground(OdDbStub *backgroundId) { m_bkgnd = backgroundId; }
2656
2662 OdDbStub *background() const { return m_bkgnd; }
2663
2671 void setVisualStyle(OdDbStub *visualStyleId) { m_visualStyle = visualStyleId; }
2672
2678 OdDbStub *visualStyle() const { return m_visualStyle; }
2679
2686
2691};
2692
2700template <typename GsDeviceInterface = OdGsDevice, typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface> >
2701class OdGsDeviceWrapperMinimalImpl : public OdGsDeviceWrapper<GsDeviceInterface, RedirectionBase>
2702{
2703 protected:
2709 public:
2715 OdGsDeviceWrapperMinimalImpl(OdGsDevice *pRedirectionDevice = NULL)
2716 : OdGsDeviceWrapper<GsDeviceInterface, RedirectionBase>(pRedirectionDevice)
2717 , m_backColor(0)
2718 {}
2719
2720 // OdGsDevice wrappers
2721
2727
2732 void setUserGiContext(OdGiContext* pUserGiContext)
2733 { m_pContext = pUserGiContext;
2734 for (OdUInt32 nView = 0; nView < m_views.size(); nView++)
2735 m_views[nView]->setUserGiContext(pUserGiContext);
2736 }
2737
2746 void onSize(const OdGsDCRect& outputRect) { m_size = OdGsDCRectDouble(outputRect); }
2747
2756 void onSize(const OdGsDCRectDouble& outputRect) { m_size = outputRect; }
2757
2763 void getSize(OdGsDCRect& outputRect) const { outputRect = m_size.round(); }
2764
2770 void getSize(OdGsDCRectDouble& outputRect) const { outputRect = m_size; }
2771
2783 OdGsViewPtr createView(const OdGsClientViewInfo* pViewInfo = 0, bool /*enableLayerVisibilityPerView*/ = false)
2785 if (pViewInfo) pView->setViewInfo(*pViewInfo);
2786 pView->setUserGiContext(m_pContext.get());
2787 pView->setDevice(this); return pView;
2788 }
2789
2801 void addView(OdGsView* pView) { m_views.push_back(pView); }
2802
2809 void insertView(int viewIndex, OdGsView* pView) { m_views.insertAt(viewIndex, pView); }
2810
2818 bool eraseView(OdGsView* pView) { m_views.remove(pView); return true; }
2819
2827 bool eraseView(int viewIndex) { m_views.removeAt(viewIndex); return true; }
2828
2832 void eraseAllViews() { m_views.clear(); }
2833
2837 int numViews() const { return m_views.size(); }
2838
2843 OdGsView* viewAt(int viewIndex) { return m_views.at(viewIndex); }
2844
2851 bool setBackgroundColor(ODCOLORREF backgroundColor) { m_backColor = backgroundColor; return true; }
2852
2857
2867 void setLogicalPalette(const ODCOLORREF* logicalPalette, int numColors)
2868 {
2870 if (numColors)
2871 m_palette.insert(m_palette.end(), logicalPalette, logicalPalette + numColors);
2872 }
2873
2879 const ODCOLORREF* getLogicalPalette(int &numColors) const
2880 {
2881 numColors = (int)m_palette.size();
2882 return m_palette.getPtr();
2883 }
2884};
2885
2886#include "TD_PackPop.h"
2887
2888#endif // __GSINTERFACEWRAPPERS_H_INCLUDED_
scale
Definition: DimVarDefs.h:1684
false
Definition: DimVarDefs.h:165
OdSmartPtr< OdGiDrawable > OdGiDrawablePtr
Definition: GiCommonDraw.h:45
OdArray< OdGsModel *, OdMemoryAllocator< OdGsModel * > > OdGsModelArray
Definition: Gs.h:78
OdSmartPtr< OdGsView > OdGsViewPtr
Definition: Gs.h:66
OdSmartPtr< OdGsModel > OdGsModelPtr
Definition: Gs.h:73
OdSmartPtr< OdRxDictionary > OdRxDictionaryPtr
Definition: Gs.h:92
#define ODRGB(r, g, b)
Definition: OdPlatform.h:934
#define ODCOLORREF
Definition: OdPlatform.h:933
unsigned int OdUInt32
unsigned char OdUInt8
#define ODRX_OVERRIDE
const T * asArrayPtr() const
Definition: OdArray.h:1590
iterator end()
Definition: OdArray.h:1041
OdArray & setPhysicalLength(size_type physLength)
Definition: OdArray.h:2223
size_type size() const
Definition: OdArray.h:1247
void insert(iterator before, const_iterator first, const_iterator afterLast)
Definition: OdArray.h:1101
const T * getPtr() const
Definition: OdArray.h:1600
void resize(size_type logicalLength, const T &value)
Definition: OdArray.h:1185
static GE_STATIC_EXPORT const OdGeMatrix3d kIdentity
Definition: GeMatrix3d.h:97
static GE_STATIC_EXPORT const OdGePoint3d kOrigin
Definition: GePoint3d.h:106
static GE_STATIC_EXPORT const OdGeVector3d kZAxis
Definition: GeVector3d.h:103
static GE_STATIC_EXPORT const OdGeVector3d kYAxis
Definition: GeVector3d.h:102
OdGsAbstractRedirectionBase(RedirectionBaseInterface *=NULL)
virtual RedirectionBaseInterface * redirection()=0
virtual const RedirectionBaseInterface * redirection() const =0
virtual void setRedirection(RedirectionBaseInterface *)
virtual bool hasRedirection() const =0
OdInt32 y
Definition: GsDefs.h:145
OdGsDCRect round() const
Definition: GsDefs.h:459
const RedirectionBaseInterface * redirection() const
OdGsDefaultRedirectionBase(RedirectionBaseInterface *pRedirectionObj=NULL)
RedirectionBaseInterface * redirection()
void setRedirection(RedirectionBaseInterface *pRedirectionObj)
virtual void onRealizeForegroundPalette()=0
virtual void setLogicalPalette(const ODCOLORREF *logicalPalette, int numColors)=0
virtual void insertView(int viewIndex, OdGsView *pView)=0
virtual OdGsModelPtr createModel()=0
virtual bool eraseView(OdGsView *pView)=0
virtual void onSize(const OdGsDCRect &outputRect)=0
virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect &region)=0
virtual void invalidate()=0
virtual OdRxDictionaryPtr properties()=0
virtual void setUpdateManager(OdGsUpdateManagerPtr pManager)
virtual ODCOLORREF getBackgroundColor()=0
virtual OdGsUpdateManagerPtr getUpdateManager(bool createIfNotExist=false)
virtual bool isValid() const =0
virtual void setUserGiContext(OdGiContext *pUserGiContext)=0
virtual void getSize(OdGsDCRect &outputRect) const =0
virtual void update(OdGsDCRect *pUpdatedRect=0)=0
virtual bool saveDeviceState(OdGsFiler *pFiler) const
virtual OdGsViewPtr createView(const OdGsClientViewInfo *pViewInfo=0, bool enableLayerVisibilityPerView=false)=0
virtual OdGsView * viewAt(int viewIndex)=0
virtual bool loadDeviceState(OdGsFiler *pFiler)
virtual void addView(OdGsView *pView)=0
virtual void onRealizeBackgroundPalette()=0
virtual void eraseAllViews()=0
virtual void onDisplayChange(int bitsPerPixel, int xPixels, int yPixels)=0
virtual bool setBackgroundColor(ODCOLORREF backgroundColor)=0
virtual bool isModelCompatible(OdGsModel *pModel) const
virtual OdGiContext * userGiContext() const =0
virtual const ODCOLORREF * getLogicalPalette(int &numColors) const =0
virtual int numViews() const =0
OdRxDictionaryPtr properties()
void update(OdGsDCRect *pUpdatedRect=0)
void onSize(const OdGsDCRectDouble &outputRect)
const ODCOLORREF * getLogicalPalette(int &numColors) const
bool eraseView(OdGsView *pView)
OdGsUpdateManagerPtr getUpdateManager(bool createIfNotExist)
bool isModelCompatible(OdGsModel *pModel) const
void getSize(OdGsDCRectDouble &outputRect) const
void invalidate(const OdGsDCRect &screenRect)
void setUpdateManager(OdGsUpdateManagerPtr pManager)
OdGsView * viewAt(int viewIndex)
bool loadDeviceState(OdGsFiler *pFiler)
void onSize(const OdGsDCRect &outputRect)
void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect &region)
OdGsDeviceWrapper(OdGsDevice *pRedirectionDevice=NULL)
void insertView(int viewIndex, OdGsView *pView)
bool eraseView(int viewIndex)
ODCOLORREF getBackgroundColor()
OdGiContext * userGiContext() const
bool setBackgroundColor(ODCOLORREF backgroundColor)
OdGsModelPtr createModel()
void setLogicalPalette(const ODCOLORREF *logicalPalette, int numColors)
bool saveDeviceState(OdGsFiler *pFiler) const
void setUserGiContext(OdGiContext *pUserGiContext)
void addView(OdGsView *pView)
void onDisplayChange(int bitsPerPixel, int xPixels, int yPixels)
void getSize(OdGsDCRect &outputRect) const
OdGsViewPtr createView(const OdGsClientViewInfo *pViewInfo=0, bool enableLayerVisibilityPerView=false)
void insertView(int viewIndex, OdGsView *pView)
const ODCOLORREF * getLogicalPalette(int &numColors) const
OdArray< OdGsViewPtr > m_views
bool setBackgroundColor(ODCOLORREF backgroundColor)
OdSmartPtr< OdGiContext > m_pContext
OdGsDeviceWrapperMinimalImpl(OdGsDevice *pRedirectionDevice=NULL)
OdArray< ODCOLORREF, OdMemoryAllocator< ODCOLORREF > > m_palette
OdGiContext * userGiContext() const
void getSize(OdGsDCRectDouble &outputRect) const
void setUserGiContext(OdGiContext *pUserGiContext)
void setLogicalPalette(const ODCOLORREF *logicalPalette, int numColors)
void onSize(const OdGsDCRect &outputRect)
void onSize(const OdGsDCRectDouble &outputRect)
OdGsView * viewAt(int viewIndex)
OdGsViewPtr createView(const OdGsClientViewInfo *pViewInfo=0, bool=false)
void getSize(OdGsDCRect &outputRect) const
Definition: Gs.h:140
virtual OdGePoint3d position() const =0
virtual void setViewportClipRegion(int numContours, int const *numVertices, OdGsDCPoint const *vertices)=0
virtual void getViewportBorderProperties(ODCOLORREF &color, int &width) const =0
virtual void enableSSAO(bool bEnable)=0
virtual OdDbStub * rootDrawableIdAt(int i, OdGsModelPtr *pModelReturn=0) const =0
virtual void zoomExtents(const OdGePoint3d &minPt, const OdGePoint3d &maxPt)=0
virtual void invalidate()=0
virtual void setViewportBorderVisibility(bool visible)=0
virtual OdGsModel * getModel(const OdGiDrawable *pDrawable) const =0
virtual bool erase(OdGiDrawable *sceneGraph)=0
virtual void pan(double xPan, double yPan)=0
virtual void beginInteractivity(double frameRateInHz)=0
virtual int numRootDrawables() const =0
virtual const OdGiClipBoundary * viewport3dClipping(const OdGiAbstractClipBoundary **ppClipInfo=NULL) const
ClearColor
Definition: Gs.h:1044
virtual void setUserGiContext(OdGiContext *pUserGiContext)=0
virtual double lineweightToDcScale() const =0
virtual OdGeMatrix3d projectionMatrix() const =0
virtual bool extentsInView(const OdGePoint3d &minPt, const OdGePoint3d &maxPt) const =0
virtual bool isValid() const =0
virtual OdUInt32 antiAliasingMode() const =0
virtual OdDbStub * background() const =0
virtual void setView(const OdGePoint3d &position, const OdGePoint3d &target, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, Projection projectionType=kParallel)=0
DefaultLightingType
Definition: Gs.h:187
@ kTwoLights
Definition: Gs.h:189
virtual void clearFrozenLayers()=0
virtual OdGsDevice * device() const =0
virtual OdGeVector3d upVector() const =0
virtual void zoom(double zoomFactor)=0
virtual void setViewport(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)=0
virtual bool isStereoEnabled() const =0
virtual void select(const OdGsDCPoint *pts, int nPoints, OdGsSelectionReactor *pReactor, OdGsView::SelectionMode mode=OdGsView::kCrossing)=0
virtual OdDbStub * visualStyle() const =0
virtual void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const =0
virtual void viewportClipRegion(OdIntArray &counts, OdGsDCPointArray &vertices) const =0
virtual OdGeMatrix3d screenMatrix() const =0
virtual bool isInInteractivity() const =0
virtual void setLineweightToDcScale(double scale)=0
virtual bool isPerspective() const =0
virtual void invalidateCachedViewportGeometry()=0
virtual void setViewportBorderProperties(ODCOLORREF color, int width)=0
virtual double fieldHeight() const =0
SelectionMode
Definition: Gs.h:173
@ kCrossing
Definition: Gs.h:175
virtual void setLensLength(double lensLength)=0
virtual void clientViewInfo(OdGsClientViewInfo &clientViewInfo) const
virtual void hide()=0
virtual void eraseAll()=0
virtual OdGiContext * userGiContext() const =0
virtual void setStereoParameters(double magnitude, double parallax)=0
virtual void setLineweightEnum(int numLineweights, const OdUInt8 *lineweights)=0
virtual void enableAntiAliasing(OdUInt32 nMode)=0
virtual bool add(OdGiDrawable *pSceneGraph, OdGsModel *pModel)=0
virtual void viewParameters(OdGsView *pView) const =0
virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect &region)=0
virtual bool isViewportBorderVisible() const =0
virtual bool ssaoMode() const =0
virtual double linetypeAlternateScaleMultiplier() const =0
virtual double linetypeScaleMultiplier() const =0
virtual void initLights(OdRxIterator *pLightsIterator)=0
virtual void setBackClip(double backClip)=0
virtual OdGsModelArray getModelList() const =0
virtual void setEnableBackClip(bool enable)=0
virtual void endInteractivity()=0
virtual RenderMode mode() const =0
RenderMode
Definition: Gs.h:148
@ kNone
Definition: Gs.h:157
virtual void enableDefaultLighting(bool bEnable, DefaultLightingType lightType=kTwoLights)=0
virtual OdGeMatrix3d viewingMatrix() const =0
virtual bool pointInViewport(const OdGePoint2d &screenPoint) const =0
virtual void setVisualStyle(OdDbStub *visualStyleId)=0
virtual void roll(double rollAngle)=0
virtual OdGeMatrix3d objectToDeviceMatrix() const =0
virtual void freezeLayer(OdDbStub *layerID)=0
virtual double backClip() const =0
virtual void setViewport3dClipping(const OdGiClipBoundary *pBoundary, const OdGiAbstractClipBoundary *pClipInfo=NULL)
virtual void enableStereo(bool enabled)=0
virtual void show()=0
virtual void flush()=0
virtual void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)=0
virtual void collide(OdGiPathNode const *const *pInputList, OdUInt32 nInputListSize, OdGsCollisionDetectionReactor *pReactor, OdGiPathNode const *const *pCollisionWithList=NULL, OdUInt32 nCollisionWithListSize=0, const OdGsCollisionDetectionContext *pCtx=NULL)=0
virtual bool isFrontClipped() const =0
virtual double fieldWidth() const =0
virtual void getNumPixelsInUnitSquare(const OdGePoint3d &point, OdGePoint2d &pixelDensity, bool bUsePerspective=true) const =0
virtual void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)=0
virtual void getStereoParameters(double &magnitude, double &parallax) const =0
virtual void setMode(RenderMode mode)=0
virtual void setEnableFrontClip(bool enable)=0
virtual void orbit(double xOrbit, double yOrbit)=0
virtual bool pointInView(const OdGePoint3d &pt) const =0
virtual OdGiDrawablePtr rootDrawableAt(int i, OdGsModelPtr *pModelReturn=0) const =0
virtual void setClearColor(ClearColor color)=0
virtual double frontClip() const =0
virtual void setBackground(OdDbStub *backgroundId)=0
virtual OdGePoint3d target() const =0
virtual bool isBackClipped() const =0
virtual OdGeMatrix3d worldToDeviceMatrix() const =0
virtual double lensLength() const =0
virtual bool exceededBounds()=0
virtual void setFrontClip(double frontClip)=0
virtual double interactivityFrameRate() const =0
virtual void zoomWindow(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)=0
Projection
Definition: Gs.h:164
@ kParallel
Definition: Gs.h:165
@ kPerspective
Definition: Gs.h:166
virtual OdGsViewPtr cloneView(bool cloneViewParameters=true, bool cloneGeometry=false)=0
virtual void thawLayer(OdDbStub *layerID)=0
virtual void dolly(const OdGeVector3d &dollyVector)=0
virtual void update()=0
virtual bool isVisible()=0
bool isBackClipped() const
OdGsViewWrapper(OdGsView *pRedirectionView=NULL)
void beginInteractivity(double frameRateInHz)
void orbit(double xOrbit, double yOrbit)
void setStereoParameters(double magnitude, double parallax)
void setViewportClipRegion(int numContours, int const *numVertices, OdGsDCPoint const *vertices)
void setFrontClip(double frontClip)
OdDbStub * rootDrawableIdAt(int i, OdGsModelPtr *pModelReturn) const
OdGeMatrix3d viewingMatrix() const
void setViewport(const OdGsDCRectDouble &screenRect)
double linetypeScaleMultiplier() const
OdGsDevice * device() const
void setBackground(OdDbStub *backgroundId)
void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)
double linetypeAlternateScaleMultiplier() const
OdGeMatrix3d worldToDeviceMatrix() const
void pan(double xPan, double yPan)
void freezeLayer(OdDbStub *layerID)
void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)
const OdGiClipBoundary * viewport3dClipping(const OdGiAbstractClipBoundary **ppClipInfo=NULL) const
OdGsModel * getModel(const OdGiDrawable *pDrawable) const
void enableDefaultLighting(bool bEnable, OdGsView::DefaultLightingType lightType=OdGsView::kTwoLights)
void setViewportBorderProperties(ODCOLORREF color, int width)
void getNumPixelsInUnitSquare(const OdGePoint3d &point, OdGePoint2d &pixelDensity, bool bUsePerspective=true) const
void setLineweightEnum(int numLineweights, const OdUInt8 *lineweights)
void collide(OdGiPathNode const *const *pInputList, OdUInt32 nInputListSize, OdGsCollisionDetectionReactor *pReactor, OdGiPathNode const *const *pCollisionWithList=NULL, OdUInt32 nCollisionWithListSize=0, const OdGsCollisionDetectionContext *pCtx=NULL)
bool isStereoEnabled() const
OdGeVector3d upVector() const
bool add(OdGiDrawable *pSceneGraph, OdGsModel *pModel)
void setViewportClipRegion(int numContours, int const *numVertices, OdGePoint2d const *vertices)
void setMode(OdGsView::RenderMode mode)
double backClip() const
void viewParameters(OdGsView *pView) const
void zoom(double zoomFactor)
void setView(const OdGePoint3d &position, const OdGePoint3d &target, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, OdGsView::Projection projectionType=OdGsView::kParallel)
void dolly(double xDolly, double yDolly, double zDolly)
double fieldHeight() const
double frontClip() const
void select(const OdGsDCPoint *pts, int nPoints, OdGsSelectionReactor *pReactor, OdGsView::SelectionMode mode=OdGsView::kCrossing)
OdGsViewPtr cloneView(bool cloneViewParameters=true, bool cloneGeometry=false)
double fieldWidth() const
void setViewport(const OdGsDCRect &screenRect)
void roll(double rollAngle)
bool isPerspective() const
void initLights(OdRxIterator *pLightsIterator)
void zoomWindow(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
OdGiDrawablePtr rootDrawableAt(int i, OdGsModelPtr *pModelReturn) const
void invalidate(const OdGsDCRect &screenRect)
bool isFrontClipped() const
double lineweightToDcScale() const
void setLineweightToDcScale(double scale)
bool visualStyle(OdGiVisualStyle &visualStyle) const
OdGeMatrix3d objectToDeviceMatrix() const
OdUInt32 antiAliasingMode() const
OdGePoint3d position() const
void viewportClipRegion(OdIntArray &counts, OdGsDCPointArray &vertices) const
void setViewportBorderVisibility(bool visible)
bool extentsInView(const OdGePoint3d &minPt, const OdGePoint3d &maxPt) const
bool erase(OdGiDrawable *sceneGraph)
OdDbStub * visualStyle() const
void enableStereo(bool enabled)
void enableAntiAliasing(OdUInt32 nMode)
bool isInInteractivity() const
void getStereoParameters(double &magnitude, double &parallax) const
void setClearColor(OdGsView::ClearColor color)
OdGiContext * userGiContext() const
void dolly(const OdGeVector3d &dollyVector)
void enableSSAO(bool bEnable) ODRX_OVERRIDE
void clientViewInfo(OdGsClientViewInfo &clientViewInfo) const
void setBackClip(double backClip)
bool ssaoMode() const ODRX_OVERRIDE
double lensLength() const
void setLensLength(double lensLength)
void getViewport(OdGsDCRect &screenRect) const
void setViewport3dClipping(const OdGiClipBoundary *pBoundary, const OdGiAbstractClipBoundary *pClipInfo=NULL)
double interactivityFrameRate() const
void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect &region)
void thawLayer(OdDbStub *layerID)
void getViewport(OdGsDCRectDouble &screenRect) const
void setEnableBackClip(bool enable)
void invalidateCachedViewportGeometry()
void setVisualStyle(OdDbStub *visualStyleId)
void setViewport(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
void viewportClipRegion(OdIntArray &counts, OdGePoint2dArray &vertices) const
bool pointInView(const OdGePoint3d &pt) const
void setVisualStyle(const OdGiVisualStyle &visualStyle)
void setEnableFrontClip(bool enable)
int numRootDrawables() const
bool pointInViewport(const OdGePoint2d &screenPoint) const
OdGeMatrix3d screenMatrix() const
OdGsModelArray getModelList() const
OdDbStub * background() const
bool isViewportBorderVisible() const
void setUserGiContext(OdGiContext *pUserGiContext)
void zoomExtents(const OdGePoint3d &minPt, const OdGePoint3d &maxPt)
OdGeMatrix3d projectionMatrix() const
void getViewportBorderProperties(ODCOLORREF &color, int &width) const
OdGePoint3d target() const
OdGsView::RenderMode mode() const
OdGsViewWrapperMinimalImpl(OdGsView *pRedirectionView=NULL)
void getViewport(OdGsDCRect &screenRect) const
void setViewportBorderVisibility(bool visible)
void viewportClipRegion(OdIntArray &counts, OdGePoint2dArray &vertices) const
void setFrontClip(double frontClip)
void setViewport(const OdGsDCRect &screenRect)
void viewportClipRegion(OdIntArray &counts, OdGsDCPointArray &vertices) const
void setLineweightToDcScale(double scale)
void setViewport(const OdGsDCRectDouble &screenRect)
void setViewportClipRegion(int numContours, int const *numVertices, OdGsDCPoint const *vertices)
void setLensLength(double lensLength)
OdGsView::RenderMode mode() const
void setViewportClipRegion(int numContours, int const *numVertices, OdGePoint2d const *vertices)
OdGiContext * userGiContext() const
void setViewport(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
void getViewport(OdGsDCRectDouble &screenRect) const
OdGsView::RenderMode m_renderMode
void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)
void setMode(OdGsView::RenderMode mode)
void setEnableFrontClip(bool enable)
void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)
void setUserGiContext(OdGiContext *pUserGiContext)
void setView(const OdGePoint3d &position, const OdGePoint3d &target, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, OdGsView::Projection projectionType=OdGsView::kParallel)
OdGsView::Projection m_projection
void setBackground(OdDbStub *backgroundId)
void getViewportBorderProperties(ODCOLORREF &color, int &width) const
void setBackClip(double backClip)
double linetypeAlternateScaleMultiplier() const
void setVisualStyle(OdDbStub *visualStyleId)
void enableAntiAliasing(OdUInt32 nMode)
void setDevice(OdGsDevice *pDevice)
void setViewInfo(const OdGsClientViewInfo &clientViewInfo)
void setViewportBorderProperties(ODCOLORREF color, int width)
void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
void clientViewInfo(OdGsClientViewInfo &clientViewInfo) const
const T * get() const
Definition: SmartPtr.h:339
GLint GLenum GLsizei width
Definition: gles2_ext.h:110
GLfloat x
Definition: gles2_ext.h:314
GLfloat GLfloat y
Definition: gles2_ext.h:316