24 #ifndef __GSINTERFACEWRAPPERS_H_INCLUDED_
25 #define __GSINTERFACEWRAPPERS_H_INCLUDED_
47 template <
typename RedirectionBaseInterface,
typename RedirectionInterface>
51 RedirectionBaseInterface *m_pRedirectionObj;
54 : m_pRedirectionObj(pRedirectionObj)
58 const RedirectionBaseInterface *
redirection()
const {
return m_pRedirectionObj; }
59 RedirectionBaseInterface *
redirection() {
return m_pRedirectionObj; }
60 void setRedirection(RedirectionBaseInterface *pRedirectionObj) { m_pRedirectionObj = pRedirectionObj; }
71 template <
typename RedirectionBaseInterface,
typename RedirectionInterface>
79 virtual const RedirectionBaseInterface *
redirection()
const = 0;
92 template <
typename GsViewInterface = OdGsView,
typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsView, GsViewInterface> >
101 : RedirectionBase(pRedirectionView)
109 return trCall()->
device();
243 return trCall()->
target();
368 return trCall()->
mode();
375 return trCall()->
add(pSceneGraph, pModel);
381 return trCall()->
erase(sceneGraph);
393 return trCall()->
getModel(pDrawable);
498 trCall()->
select(pts, nPoints, pReactor,
mode);
504 trCall()->
dolly(dollyVector);
506 void dolly(
double xDolly,
double yDolly,
double zDolly)
509 trCall()->
dolly(xDolly, yDolly, zDolly);
514 trCall()->
roll(rollAngle);
516 void orbit(
double xOrbit,
double yOrbit)
519 trCall()->
orbit(xOrbit, yOrbit);
524 trCall()->
zoom(zoomFactor);
526 void pan(
double xPan,
double yPan)
529 trCall()->
pan(xPan, yPan);
559 return trCall()->
cloneView(cloneViewParameters, cloneGeometry);
646 OdGePoint2d& pixelDensity,
bool bUsePerspective =
true)
const
707 template <
typename GsDeviceInterface = OdGsDevice,
typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface> >
716 : RedirectionBase(pRedirectionDevice)
760 trCall()->
update(pUpdatedRect);
766 trCall()->
onSize(outputRect);
771 trCall()->
onSize(outputRect);
804 return trCall()->
createView(pViewInfo, enableLayerVisibilityPerView);
870 return trCall()->
viewAt(viewIndex);
884 return ODRGB(0, 0, 0);
931 template <
typename GsViewInterface = OdGsView,
typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsView, GsViewInterface> >
1007 int numVertexes = 0;
1008 for (
int numContour = 0; numContour < numContours; numContour++)
1009 numVertexes += numVertices[numContour],
m_nrcClipCounts[numContour] = numVertices[numContour];
1011 for (
int numVertex = 0; numVertex < numVertexes; numVertex++)
1017 int numVertexes = 0;
1018 for (
int numContour = 0; numContour < numContours; numContour++)
1019 numVertexes += numVertices[numContour],
m_nrcClipCounts[numContour] = numVertices[numContour];
1021 for (
int numVertex = 0; numVertex < numVertexes; numVertex++)
1028 vertices.
resize(nPoints);
1030 for (
OdUInt32 nPt = 0; nPt < nPoints; nPt++)
1096 template <
typename GsDeviceInterface = OdGsDevice,
typename RedirectionBase = OdGsDefaultRedirectionBase<OdGsDevice, GsDeviceInterface> >
1127 if (pViewInfo) pView->setViewInfo(*pViewInfo);
1129 pView->setDevice(
this);
return pView;
OdArray< OdGsModel *, OdMemoryAllocator< OdGsModel * > > OdGsModelArray
OdSmartPtr< OdGsView > OdGsViewPtr
OdSmartPtr< OdGsModel > OdGsModelPtr
OdSmartPtr< OdRxDictionary > OdRxDictionaryPtr
void insert(iterator before, const_iterator first, const_iterator afterLast)
const T * asArrayPtr() const
void resize(size_type logicalLength, const T &value)
OdArray & setPhysicalLength(size_type physLength)
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 const RedirectionBaseInterface * redirection() const =0
virtual void resetRedirection()
virtual void setRedirection(RedirectionBaseInterface *)
virtual bool hasRedirection() const =0
virtual RedirectionBaseInterface * redirection()=0
const RedirectionBaseInterface * redirection() const
OdGsDefaultRedirectionBase(RedirectionBaseInterface *pRedirectionObj=NULL)
RedirectionBaseInterface * redirection()
bool hasRedirection() const
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 const ODCOLORREF * getLogicalPalette(int &numColors) const =0
virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect ®ion)=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 bool loadDeviceState(OdGsFiler *pFiler)
virtual OdGsView * viewAt(int viewIndex)=0
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 int numViews() const =0
OdRxDictionaryPtr properties()
void update(OdGsDCRect *pUpdatedRect=0)
void onSize(const OdGsDCRectDouble &outputRect)
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)
const ODCOLORREF * getLogicalPalette(int &numColors) const
bool loadDeviceState(OdGsFiler *pFiler)
OdGsView * viewAt(int viewIndex)
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()
bool setBackgroundColor(ODCOLORREF backgroundColor)
void onRealizeBackgroundPalette()
OdGsModelPtr createModel()
OdGiContext * userGiContext() const
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)
OdGsView * viewAt(int viewIndex)
bool eraseView(OdGsView *pView)
OdArray< OdGsViewPtr > m_views
bool setBackgroundColor(ODCOLORREF backgroundColor)
OdSmartPtr< OdGiContext > m_pContext
OdGsDeviceWrapperMinimalImpl(OdGsDevice *pRedirectionDevice=NULL)
OdArray< ODCOLORREF, OdMemoryAllocator< ODCOLORREF > > m_palette
ODCOLORREF getBackgroundColor()
bool eraseView(int viewIndex)
void getSize(OdGsDCRectDouble &outputRect) const
OdGiContext * userGiContext() 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)
OdGsViewPtr createView(const OdGsClientViewInfo *pViewInfo=0, bool=false)
const ODCOLORREF * getLogicalPalette(int &numColors) const
void getSize(OdGsDCRect &outputRect) const
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 zoomExtents(const OdGePoint3d &minPt, const OdGePoint3d &maxPt)=0
virtual void invalidate()=0
virtual void setViewportBorderVisibility(bool visible)=0
virtual bool erase(OdGiDrawable *sceneGraph)=0
virtual void pan(double xPan, double yPan)=0
virtual void beginInteractivity(double frameRateInHz)=0
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 void setView(const OdGePoint3d &position, const OdGePoint3d &target, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, Projection projectionType=kParallel)=0
virtual const OdGiClipBoundary * viewport3dClipping(const OdGiAbstractClipBoundary **ppClipInfo=NULL) const
virtual void clearFrozenLayers()=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 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 OdGsDevice * device() const =0
virtual bool isPerspective() const =0
virtual void invalidateCachedViewportGeometry()=0
virtual void setViewportBorderProperties(ODCOLORREF color, int width)=0
virtual double fieldHeight() const =0
virtual void setLensLength(double lensLength)=0
virtual void clientViewInfo(OdGsClientViewInfo &clientViewInfo) const
virtual void eraseAll()=0
virtual OdDbStub * background() const =0
virtual void setStereoParameters(double magnitude, double parallax)=0
virtual void setLineweightEnum(int numLineweights, const OdUInt8 *lineweights)=0
virtual bool add(OdGiDrawable *pSceneGraph, OdGsModel *pModel)=0
virtual void viewParameters(OdGsView *pView) const =0
virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect ®ion)=0
virtual bool isViewportBorderVisible() const =0
virtual double linetypeAlternateScaleMultiplier() const =0
virtual OdDbStub * visualStyle() 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
virtual OdGiContext * userGiContext() const =0
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 setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)=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 ¶llax) const =0
virtual void setMode(RenderMode mode)=0
virtual OdGsModel * getModel(const OdGiDrawable *pDrawable) const =0
virtual void setEnableFrontClip(bool enable)=0
virtual void orbit(double xOrbit, double yOrbit)=0
virtual bool pointInView(const OdGePoint3d &pt) 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
virtual OdGsViewPtr cloneView(bool cloneViewParameters=true, bool cloneGeometry=false)=0
virtual void thawLayer(OdDbStub *layerID)=0
virtual void dolly(const OdGeVector3d &dollyVector)=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)
OdGeMatrix3d viewingMatrix() const
void setViewport(const OdGsDCRectDouble &screenRect)
double linetypeScaleMultiplier() const
void setBackground(OdDbStub *backgroundId)
void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)
double linetypeAlternateScaleMultiplier() const
OdGiContext * userGiContext() const
OdGeMatrix3d worldToDeviceMatrix() const
void pan(double xPan, double yPan)
void freezeLayer(OdDbStub *layerID)
void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)
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)
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)
OdDbStub * background() const
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
OdDbStub * visualStyle() const
void initLights(OdRxIterator *pLightsIterator)
void zoomWindow(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
void invalidate(const OdGsDCRect &screenRect)
bool isFrontClipped() const
double lineweightToDcScale() const
void setLineweightToDcScale(double scale)
OdGsModel * getModel(const OdGiDrawable *pDrawable) const
bool visualStyle(OdGiVisualStyle &visualStyle) const
OdGeMatrix3d objectToDeviceMatrix() 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)
void enableStereo(bool enabled)
bool isInInteractivity() const
void getStereoParameters(double &magnitude, double ¶llax) const
void setClearColor(OdGsView::ClearColor color)
void dolly(const OdGeVector3d &dollyVector)
void clientViewInfo(OdGsClientViewInfo &clientViewInfo) const
void setBackClip(double backClip)
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)
bool pointInViewport(const OdGePoint2d &screenPoint) const
OdGeMatrix3d screenMatrix() const
OdGsModelArray getModelList() const
bool isViewportBorderVisible() const
void setUserGiContext(OdGiContext *pUserGiContext)
void zoomExtents(const OdGePoint3d &minPt, const OdGePoint3d &maxPt)
OdGsDevice * device() const
OdGeMatrix3d projectionMatrix() const
void getViewportBorderProperties(ODCOLORREF &color, int &width) const
OdGePoint3d target() const
OdGsView::RenderMode mode() const
const OdGiClipBoundary * viewport3dClipping(const OdGiAbstractClipBoundary **ppClipInfo=NULL) const
OdGsViewWrapperMinimalImpl(OdGsView *pRedirectionView=NULL)
void setEnableBackClip(bool enable)
OdGiContext * userGiContext() const
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)
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)
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)
void setEnableFrontClip(bool enable)
void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)
OdIntArray m_nrcClipCounts
double linetypeScaleMultiplier() const
OdDbStub * background() const
OdDbStub * visualStyle() const
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)
OdGsDevice * device() const
double linetypeAlternateScaleMultiplier() const
void setVisualStyle(OdDbStub *visualStyleId)
void setDevice(OdGsDevice *pDevice)
void setViewInfo(const OdGsClientViewInfo &clientViewInfo)
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