24#ifndef __GSINTERFACEWRAPPERS_H_INCLUDED_
25#define __GSINTERFACEWRAPPERS_H_INCLUDED_
47template <
typename RedirectionBaseInterface,
typename RedirectionInterface>
51 RedirectionBaseInterface *m_pRedirectionObj;
59 : m_pRedirectionObj(pRedirectionObj)
72 const RedirectionBaseInterface *
redirection()
const {
return m_pRedirectionObj; }
77 RedirectionBaseInterface *
redirection() {
return m_pRedirectionObj; }
84 void setRedirection(RedirectionBaseInterface *pRedirectionObj) { m_pRedirectionObj = pRedirectionObj; }
99template <
typename RedirectionBaseInterface,
typename RedirectionInterface>
150template <
typename GsViewInterface = OdGsView,
typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsView, GsViewInterface> >
164 : RedirectionBase(pRedirectionView)
176 return trCall()->device();
187 return trCall()->userGiContext();
198 trCall()->setUserGiContext(pUserGiContext);
210 return trCall()->lineweightToDcScale();
223 trCall()->setLineweightToDcScale(
scale);
236 trCall()->setLineweightEnum(numLineweights, lineweights, altSourceLwds);
251 trCall()->setViewport(lowerLeft, upperRight);
266 trCall()->setViewport(screenRect);
280 trCall()->setViewport(screenRect);
298 trCall()->getViewport(lowerLeft, upperRight);
314 trCall()->getViewport(screenRect);
327 trCall()->getViewport(screenRect);
340 trCall()->setViewportClipRegion(numContours, numVertices, vertices);
353 trCall()->setViewportClipRegion(numContours, numVertices, vertices);
365 trCall()->viewportClipRegion(counts, vertices);
377 trCall()->viewportClipRegion(counts, vertices);
389 trCall()->setViewport3dClipping(pBoundary, pClipInfo);
403 return trCall()->viewport3dClipping(ppClipInfo);
415 trCall()->setViewportBorderProperties(color,
width);
426 trCall()->getViewportBorderProperties(color,
width);
436 trCall()->setViewportBorderVisibility(visible);
448 return trCall()->isViewportBorderVisible();
486 return trCall()->position();
497 return trCall()->target();
508 return trCall()->upVector();
519 return trCall()->lensLength();
542 return trCall()->isPerspective();
553 return trCall()->fieldWidth();
564 return trCall()->fieldHeight();
575 trCall()->setEnableFrontClip(enable);
587 return trCall()->isFrontClipped();
608 return trCall()->frontClip();
619 trCall()->setEnableBackClip(enable);
631 return trCall()->isBackClipped();
652 return trCall()->backClip();
663 return trCall()->viewingMatrix();
674 return trCall()->projectionMatrix();
685 return trCall()->screenMatrix();
700 return trCall()->worldToDeviceMatrix();
711 return trCall()->objectToDeviceMatrix();
738 trCall()->setMode(
mode);
763 return trCall()->mode();
786 return trCall()->add(pSceneGraph, pModel);
796 return trCall()->numRootDrawables();
808 return trCall()->rootDrawableIdAt(i, pModelReturn);
820 return trCall()->rootDrawableAt(i, pModelReturn);
835 return trCall()->erase(sceneGraph);
847 trCall()->eraseAll();
859 return trCall()->getModel(pDrawable);
870 return trCall()->getModelList();
880 trCall()->invalidate();
891 trCall()->invalidate(screenRect);
909 return trCall()->isValid();
938 trCall()->beginInteractivity(frameRateInHz);
950 trCall()->endInteractivity();
964 return trCall()->isInInteractivity();
977 return trCall()->interactivityFrameRate();
1020 return trCall()->isVisible();
1035 trCall()->freezeLayer(layerID);
1049 trCall()->thawLayer(layerID);
1062 trCall()->clearFrozenLayers();
1071 trCall()->invalidateCachedViewportGeometry();
1088 trCall()->select(pts, nPoints, pReactor,
mode);
1104 trCall()->dolly(dollyVector);
1119 void dolly(
double xDolly,
double yDolly,
double zDolly)
1122 trCall()->dolly(xDolly, yDolly, zDolly);
1142 trCall()->roll(rollAngle);
1161 void orbit(
double xOrbit,
double yOrbit)
1164 trCall()->orbit(xOrbit, yOrbit);
1175 trCall()->zoom(zoomFactor);
1194 void pan(
double xPan,
double yPan)
1197 trCall()->pan(xPan, yPan);
1209 trCall()->zoomExtents(minPt, maxPt);
1221 trCall()->zoomWindow(lowerLeft, upperRight);
1235 return trCall()->pointInView(pt);
1251 return trCall()->extentsInView(minPt, maxPt);
1267 return trCall()->
cloneView(cloneViewParameters, cloneGeometry);
1278 trCall()->viewParameters(pView);
1302 return trCall()->exceededBounds();
1314 trCall()->enableStereo(enabled);
1326 return trCall()->isStereoEnabled();
1348 trCall()->setStereoParameters(magnitude, parallax);
1369 trCall()->getStereoParameters(magnitude, parallax);
1379 trCall()->initLights(pLightsIterator);
1402 return trCall()->linetypeScaleMultiplier();
1428 return trCall()->linetypeAlternateScaleMultiplier();
1451 trCall()->setClearColor(color);
1465 return trCall()->pointInViewport(screenPoint);
1481 OdGePoint2d& pixelDensity,
bool bUsePerspective =
true)
const
1484 trCall()->getNumPixelsInUnitSquare(point, pixelDensity, bUsePerspective);
1497 trCall()->setBackground(backgroundId);
1509 return trCall()->background();
1523 trCall()->setVisualStyle(visualStyleId);
1535 return trCall()->visualStyle();
1581 trCall()->enableDefaultLighting(bEnable, lightType);
1595 trCall()->getSnapShot(pImage, region);
1618 trCall()->collide( pInputList, nInputListSize, pReactor, pCollisionWithList, nCollisionWithListSize, pCtx );
1636 trCall()->rayTrace(rayOrigin, rayDirection, pReactor, bSortedSelection, pObjectList, nObjectListSize);
1647 trCall()->enableAntiAliasing(nMode);
1656 return trCall()->antiAliasingMode();
1668 trCall()->enableSSAO(bEnable);
1679 return trCall()->ssaoMode();
1691template <
typename GsDeviceInterface = OdGsDevice,
typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface> >
1706 : RedirectionBase(pRedirectionDevice)
1721 return trCall()->properties();
1732 return trCall()->userGiContext();
1743 trCall()->setUserGiContext(pUserGiContext);
1752 trCall()->invalidate();
1763 trCall()->invalidate(screenRect);
1781 return trCall()->isValid();
1797 trCall()->update(pUpdatedRect);
1811 trCall()->onSize(outputRect);
1825 trCall()->onSize(outputRect);
1836 trCall()->getSize(outputRect);
1847 trCall()->getSize(outputRect);
1856 trCall()->onRealizeForegroundPalette();
1865 trCall()->onRealizeBackgroundPalette();
1881 trCall()->onDisplayChange(bitsPerPixel, xPixels, yPixels);
1898 return trCall()->createView(pViewInfo, enableLayerVisibilityPerView);
1910 trCall()->addView(pView);
1923 return trCall()->createModel();
1946 return trCall()->isModelCompatible(pModel);
1961 return trCall()->saveDeviceState(pFiler);
1976 return trCall()->loadDeviceState(pFiler);
1989 trCall()->insertView(viewIndex, pView);
2003 return trCall()->eraseView(pView);
2018 return trCall()->eraseView(viewIndex);
2028 trCall()->eraseAllViews();
2038 return trCall()->numViews();
2050 return trCall()->viewAt(viewIndex);
2064 return trCall()->setBackgroundColor(backgroundColor);
2075 return trCall()->getBackgroundColor();
2076 return ODRGB(0, 0, 0);
2091 trCall()->setLogicalPalette(logicalPalette, numColors);
2103 return trCall()->getLogicalPalette(numColors);
2119 trCall()->getSnapShot(pImage, region);
2132 return trCall()->getUpdateManager( createIfNotExist );
2147 trCall()->setUpdateManager( pManager );
2159template <
typename GsViewInterface = OdGsView,
typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsView, GsViewInterface> >
2365 int numVertexes = 0;
2366 for (
int numContour = 0; numContour < numContours; numContour++)
2367 numVertexes += numVertices[numContour],
m_nrcClipCounts[numContour] = numVertices[numContour];
2369 for (
int numVertex = 0; numVertex < numVertexes; numVertex++)
2383 int numVertexes = 0;
2384 for (
int numContour = 0; numContour < numContours; numContour++)
2385 numVertexes += numVertices[numContour],
m_nrcClipCounts[numContour] = numVertices[numContour];
2387 for (
int numVertex = 0; numVertex < numVertexes; numVertex++)
2401 vertices.
resize(nPoints);
2403 for (
OdUInt32 nPt = 0; nPt < nPoints; nPt++)
2718template <
typename GsDeviceInterface = OdGsDevice,
typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface> >
2803 if (pViewInfo) pView->setViewInfo(*pViewInfo);
2805 pView->setDevice(
this);
return pView;
OdSmartPtr< OdGiRasterImage > OdGiRasterImagePtr
OdArray< OdGePoint2d, OdMemoryAllocator< OdGePoint2d > > OdGePoint2dArray
OdSmartPtr< OdGiDrawable > OdGiDrawablePtr
OdSmartPtr< OdGsUpdateManager > OdGsUpdateManagerPtr
OdArray< OdGsModel *, OdMemoryAllocator< OdGsModel * > > OdGsModelArray
OdSmartPtr< OdGsView > OdGsViewPtr
OdSmartPtr< OdGsModel > OdGsModelPtr
OdSmartPtr< OdRxDictionary > OdRxDictionaryPtr
OdArray< OdGsDCPoint, OdMemoryAllocator< OdGsDCPoint > > OdGsDCPointArray
OdArray< int, OdMemoryAllocator< int > > OdIntArray
const T * asArrayPtr() const
void resize(size_type logicalLength, const T &value)
static GE_STATIC_EXPORT const OdGeMatrix3d kIdentity
static GE_STATIC_EXPORT const OdGePoint3d kOrigin
static GE_STATIC_EXPORT const OdGeVector3d kZAxis
static GE_STATIC_EXPORT const OdGeVector3d kYAxis
OdGsAbstractRedirectionBase(RedirectionBaseInterface *=NULL)
virtual RedirectionBaseInterface * redirection()=0
virtual const RedirectionBaseInterface * redirection() const =0
virtual void resetRedirection()
virtual void setRedirection(RedirectionBaseInterface *)
virtual bool hasRedirection() const =0
const RedirectionBaseInterface * redirection() const
OdGsDefaultRedirectionBase(RedirectionBaseInterface *pRedirectionObj=NULL)
RedirectionBaseInterface * redirection()
bool hasRedirection() const
void setRedirection(RedirectionBaseInterface *pRedirectionObj)
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 onRealizeForegroundPalette()
void setUpdateManager(OdGsUpdateManagerPtr pManager)
OdGsView * viewAt(int viewIndex)
bool loadDeviceState(OdGsFiler *pFiler)
void onSize(const OdGsDCRect &outputRect)
void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect ®ion)
OdGsDeviceWrapper(OdGsDevice *pRedirectionDevice=NULL)
void insertView(int viewIndex, OdGsView *pView)
bool eraseView(int viewIndex)
ODCOLORREF getBackgroundColor()
OdGiContext * userGiContext() const
bool setBackgroundColor(ODCOLORREF backgroundColor)
void onRealizeBackgroundPalette()
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)
bool eraseView(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
ODCOLORREF getBackgroundColor()
OdGiContext * userGiContext() const
bool eraseView(int viewIndex)
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)
void addView(OdGsView *pView)
OdGsView * viewAt(int viewIndex)
OdGsViewPtr createView(const OdGsClientViewInfo *pViewInfo=0, bool=false)
void getSize(OdGsDCRect &outputRect) const
virtual OdGsViewPtr cloneView(bool cloneViewParameters=true, bool cloneGeometry=false)=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 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)
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
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 setLineweightEnum(int numLineweights, const OdUInt8 *lineweights, const OdUInt16 *altSourceLwds=NULL)
void setLineweightToDcScale(double scale)
bool visualStyle(OdGiVisualStyle &visualStyle) const
OdGeMatrix3d objectToDeviceMatrix() const
OdUInt32 antiAliasingMode() const
void rayTrace(const OdGePoint3d &rayOrigin, const OdGeVector3d &rayDirection, OdGsRayTraceReactor *pReactor, bool bSortedSelection=false, OdGiPathNode const *const *pObjectList=NULL, OdUInt32 nObjectListSize=0)
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 ¶llax) 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 ®ion)
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 setEnableBackClip(bool enable)
void getViewport(OdGsDCRect &screenRect) const
void setViewportBorderVisibility(bool visible)
void viewportClipRegion(OdIntArray &counts, OdGePoint2dArray &vertices) const
double fieldHeight() const
void setFrontClip(double frontClip)
void setViewport(const OdGsDCRect &screenRect)
OdGsDevice * device() const
OdDbStub * background() const
void viewportClipRegion(OdIntArray &counts, OdGsDCPointArray &vertices) const
OdGePoint3d target() const
void setLineweightToDcScale(double scale)
void setViewport(const OdGsDCRectDouble &screenRect)
OdGeVector3d upVector() const
void setViewportClipRegion(int numContours, int const *numVertices, OdGsDCPoint const *vertices)
void setLensLength(double lensLength)
OdGsView::RenderMode mode() const
bool isViewportBorderVisible() const
OdGePoint3d position() const
void setViewportClipRegion(int numContours, int const *numVertices, OdGePoint2d const *vertices)
OdGiContext * userGiContext() const
bool isFrontClipped() const
void setViewport(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
bool isPerspective() const
OdGePoint2dArray m_nrcClipPoints
void getViewport(OdGsDCRectDouble &screenRect) const
OdGsView::RenderMode m_renderMode
void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)
double lensLength() const
void setMode(OdGsView::RenderMode mode)
OdDbStub * visualStyle() const
void setEnableFrontClip(bool enable)
void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)
OdIntArray m_nrcClipCounts
double linetypeScaleMultiplier() const
OdUInt32 m_antiAliasingMode
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
OdGsClientViewInfo m_viewInfo
void setBackClip(double backClip)
double linetypeAlternateScaleMultiplier() const
void setVisualStyle(OdDbStub *visualStyleId)
void enableAntiAliasing(OdUInt32 nMode)
void setDevice(OdGsDevice *pDevice)
void setViewInfo(const OdGsClientViewInfo &clientViewInfo)
OdUInt32 antiAliasingMode() const
void setViewportBorderProperties(ODCOLORREF color, int width)
void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
double lineweightToDcScale() const
void clientViewInfo(OdGsClientViewInfo &clientViewInfo) const
OdGsDCRectDouble m_dcRect
double fieldWidth() const
bool isBackClipped() const
GLint GLenum GLsizei width