CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
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;
1158 #endif // __GSINTERFACEWRAPPERS_H_INCLUDED_
virtual bool extentsInView(const OdGePoint3d &minPt, const OdGePoint3d &maxPt) const =0
bool isFrontClipped() const
double fieldWidth() const
OdGiContext * userGiContext() const
bool isViewportBorderVisible() const
virtual OdGsUpdateManagerPtr getUpdateManager(bool createIfNotExist=false)
virtual void zoomExtents(const OdGePoint3d &minPt, const OdGePoint3d &maxPt)=0
bool isPerspective() const
void setViewport(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
void invalidateCachedViewportGeometry()
OdGsClientViewInfo m_viewInfo
void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
virtual void clearFrozenLayers()=0
virtual void enableStereo(bool enabled)=0
OdGsView::RenderMode mode() const
virtual void setUserGiContext(OdGiContext *pUserGiContext)=0
OdArray< OdGsViewPtr > m_views
void setBackClip(double backClip)
OdGePoint3d target() const
virtual void eraseAll()=0
OdGePoint3d position() const
void setViewport(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
virtual OdGeVector3d upVector() const =0
bool isBackClipped() const
virtual void getSize(OdGsDCRect &outputRect) const =0
void setLensLength(double lensLength)
OdDbStub * background() const
virtual void setFrontClip(double frontClip)=0
void onRealizeBackgroundPalette()
OdGePoint3d target() const
virtual void update(OdGsDCRect *pUpdatedRect=0)=0
virtual void setViewportBorderVisibility(bool visible)=0
OdSmartPtr< OdGiContext > m_pContext
OdGsView::Projection m_projection
RedirectionBaseInterface * redirection()
bool hasRedirection() const
bool setBackgroundColor(ODCOLORREF backgroundColor)
virtual bool hasRedirection() const =0
ODCOLORREF getBackgroundColor()
virtual OdGeMatrix3d worldToDeviceMatrix() const =0
void update(OdGsDCRect *pUpdatedRect=0)
void getStereoParameters(double &magnitude, double ¶llax) const
virtual OdGeMatrix3d screenMatrix() const =0
virtual void pan(double xPan, double yPan)=0
void setDevice(OdGsDevice *pDevice)
virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect ®ion)=0
virtual void setStereoParameters(double magnitude, double parallax)=0
virtual void setViewportBorderProperties(ODCOLORREF color, int width)=0
void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const
virtual void beginInteractivity(double frameRateInHz)=0
OdGsView * viewAt(int viewIndex)
virtual void setBackClip(double backClip)=0
virtual RenderMode mode() const =0
void select(const OdGsDCPoint *pts, int nPoints, OdGsSelectionReactor *pReactor, OdGsView::SelectionMode mode=OdGsView::kCrossing)
virtual void setMode(RenderMode mode)=0
void onSize(const OdGsDCRectDouble &outputRect)
virtual bool isPerspective() const =0
virtual bool erase(OdGiDrawable *sceneGraph)=0
bool isModelCompatible(OdGsModel *pModel) const
virtual void getStereoParameters(double &magnitude, double ¶llax) const =0
void setEnableBackClip(bool enable)
void invalidate(const OdGsDCRect &screenRect)
bool setBackgroundColor(ODCOLORREF backgroundColor)
virtual bool saveDeviceState(OdGsFiler *pFiler) const
bool isFrontClipped() const
virtual const ODCOLORREF * getLogicalPalette(int &numColors) const =0
double linetypeScaleMultiplier() const
void setLensLength(double lensLength)
void setVisualStyle(OdDbStub *visualStyleId)
OdGsDevice * device() const
OdDbStub * background() const
bool eraseView(int viewIndex)
OdSmartPtr< OdRxDictionary > OdRxDictionaryPtr
void pan(double xPan, double yPan)
bool pointInView(const OdGePoint3d &pt) const
virtual void dolly(const OdGeVector3d &dollyVector)=0
virtual void initLights(OdRxIterator *pLightsIterator)=0
virtual void zoomWindow(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)=0
void setViewportBorderVisibility(bool visible)
void viewportClipRegion(OdIntArray &counts, OdGePoint2dArray &vertices) const
OdGeMatrix3d objectToDeviceMatrix() const
virtual void setViewport(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)=0
void setEnableFrontClip(bool enable)
void zoomExtents(const OdGePoint3d &minPt, const OdGePoint3d &maxPt)
void freezeLayer(OdDbStub *layerID)
void viewportClipRegion(OdIntArray &counts, OdGePoint2dArray &vertices) const
OdSmartPtr< OdGsModel > OdGsModelPtr
virtual void setUserGiContext(OdGiContext *pUserGiContext)=0
void onRealizeForegroundPalette()
void dolly(const OdGeVector3d &dollyVector)
OdDbStub * visualStyle() const
virtual void setEnableBackClip(bool enable)=0
virtual bool setBackgroundColor(ODCOLORREF backgroundColor)=0
virtual void invalidate()=0
virtual bool isViewportBorderVisible() const =0
virtual void freezeLayer(OdDbStub *layerID)=0
virtual OdGeMatrix3d viewingMatrix() const =0
OdArray< OdGsModel *, OdMemoryAllocator< OdGsModel * > > OdGsModelArray
OdGsDeviceWrapper(OdGsDevice *pRedirectionDevice=NULL)
void setViewportClipRegion(int numContours, int const *numVertices, OdGePoint2d const *vertices)
virtual void onRealizeForegroundPalette()=0
OdGsViewPtr cloneView(bool cloneViewParameters=true, bool cloneGeometry=false)
virtual const OdGiClipBoundary * viewport3dClipping(const OdGiAbstractClipBoundary **ppClipInfo=NULL) const
OdGsUpdateManagerPtr getUpdateManager(bool createIfNotExist)
virtual void roll(double rollAngle)=0
void clientViewInfo(OdGsClientViewInfo &clientViewInfo) const
OdGeVector3d upVector() const
double lensLength() const
virtual void setUpdateManager(OdGsUpdateManagerPtr pManager)
OdGiContext * userGiContext() const
void setView(const OdGePoint3d &position, const OdGePoint3d &target, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, OdGsView::Projection projectionType=OdGsView::kParallel)
void onDisplayChange(int bitsPerPixel, int xPixels, int yPixels)
virtual OdGsView * viewAt(int viewIndex)=0
void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect ®ion)
virtual OdDbStub * visualStyle() const =0
void clientViewInfo(OdGsClientViewInfo &clientViewInfo) const
OdGsViewPtr createView(const OdGsClientViewInfo *pViewInfo=0, bool enableLayerVisibilityPerView=false)
void roll(double rollAngle)
virtual bool pointInViewport(const OdGePoint2d &screenPoint) const =0
OdSmartPtr< OdGsView > OdGsViewPtr
void setViewInfo(const OdGsClientViewInfo &clientViewInfo)
virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect ®ion)=0
virtual bool isModelCompatible(OdGsModel *pModel) const
virtual double fieldHeight() const =0
void viewParameters(OdGsView *pView) const
void zoomWindow(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight)
OdGsView * viewAt(int viewIndex)
OdGsDeviceWrapperMinimalImpl(OdGsDevice *pRedirectionDevice=NULL)
void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)
bool isStereoEnabled() const
void invalidate(const OdGsDCRect &screenRect)
void getSize(OdGsDCRect &outputRect) const
virtual void getViewportBorderProperties(ODCOLORREF &color, int &width) const =0
OdArray & setPhysicalLength(size_type physLength)
OdIntArray m_nrcClipCounts
virtual const RedirectionBaseInterface * redirection() const =0
void setBackground(OdDbStub *backgroundId)
bool isBackClipped() const
void setView(const OdGePoint3d &position, const OdGePoint3d &target, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, OdGsView::Projection projectionType=OdGsView::kParallel)
OdRxDictionaryPtr properties()
virtual OdGeMatrix3d projectionMatrix() const =0
OdGsModelArray getModelList() const
virtual OdGePoint3d target() const =0
const T * asArrayPtr() const
void setViewport(const OdGsDCRect &screenRect)
void setLineweightToDcScale(double scale)
OdGePoint2dArray m_nrcClipPoints
virtual void select(const OdGsDCPoint *pts, int nPoints, OdGsSelectionReactor *pReactor, OdGsView::SelectionMode mode=OdGsView::kCrossing)=0
void setUserGiContext(OdGiContext *pUserGiContext)
void zoom(double zoomFactor)
virtual bool isValid() const =0
bool eraseView(OdGsView *pView)
void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)
void getViewport(OdGsDCRect &screenRect) const
virtual void getNumPixelsInUnitSquare(const OdGePoint3d &point, OdGePoint2d &pixelDensity, bool bUsePerspective=true) const =0
virtual void invalidate()=0
void setViewport(const OdGsDCRectDouble &screenRect)
void dolly(double xDolly, double yDolly, double zDolly)
void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect ®ion)
double lineweightToDcScale() const
OdGiContext * userGiContext() const
void setLineweightEnum(int numLineweights, const OdUInt8 *lineweights)
void setFrontClip(double frontClip)
static GE_STATIC_EXPORT const OdGeVector3d kZAxis
void thawLayer(OdDbStub *layerID)
double linetypeScaleMultiplier() const
void onSize(const OdGsDCRect &outputRect)
virtual bool eraseView(OdGsView *pView)=0
virtual void addView(OdGsView *pView)=0
bool saveDeviceState(OdGsFiler *pFiler) const
void setBackground(OdDbStub *backgroundId)
virtual double lineweightToDcScale() const =0
virtual double interactivityFrameRate() const =0
void orbit(double xOrbit, double yOrbit)
void getViewport(OdGsDCRect &screenRect) const
OdArray< ODCOLORREF, OdMemoryAllocator< ODCOLORREF > > m_palette
void getSize(OdGsDCRectDouble &outputRect) const
virtual void resetRedirection()
void viewportClipRegion(OdIntArray &counts, OdGsDCPointArray &vertices) const
void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)
virtual void onSize(const OdGsDCRect &outputRect)=0
OdGsModelPtr createModel()
void setViewportClipRegion(int numContours, int const *numVertices, OdGsDCPoint const *vertices)
virtual void setView(const OdGePoint3d &position, const OdGePoint3d &target, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, Projection projectionType=kParallel)=0
void setEnableBackClip(bool enable)
virtual double linetypeAlternateScaleMultiplier() const =0
bool eraseView(OdGsView *pView)
virtual void viewportClipRegion(OdIntArray &counts, OdGsDCPointArray &vertices) const =0
void getSize(OdGsDCRectDouble &outputRect) const
void setViewportBorderVisibility(bool visible)
virtual void eraseAllViews()=0
OdGsView::RenderMode mode() const
OdGsViewWrapperMinimalImpl(OdGsView *pRedirectionView=NULL)
OdGsView::RenderMode m_renderMode
void setFrontClip(double frontClip)
virtual void invalidateCachedViewportGeometry()=0
OdGeMatrix3d screenMatrix() const
OdGsViewPtr createView(const OdGsClientViewInfo *pViewInfo=0, bool=false)
bool eraseView(int viewIndex)
void setMode(OdGsView::RenderMode mode)
virtual double fieldWidth() const =0
virtual bool isFrontClipped() const =0
void setUserGiContext(OdGiContext *pUserGiContext)
void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)
void resize(size_type logicalLength, const T &value)
virtual bool isVisible()=0
void insert(iterator before, const_iterator first, const_iterator afterLast)
void getViewportBorderProperties(ODCOLORREF &color, int &width) const
OdGsViewWrapper(OdGsView *pRedirectionView=NULL)
virtual bool pointInView(const OdGePoint3d &pt) const =0
virtual void setLensLength(double lensLength)=0
virtual void getViewport(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const =0
void setMode(OdGsView::RenderMode mode)
GLint GLenum GLsizei width
void setViewport(const OdGsDCRect &screenRect)
void getViewport(OdGsDCRectDouble &screenRect) const
virtual int numViews() const =0
virtual void enableDefaultLighting(bool bEnable, DefaultLightingType lightType=kTwoLights)=0
virtual OdGeMatrix3d objectToDeviceMatrix() const =0
double linetypeAlternateScaleMultiplier() const
void setViewportBorderProperties(ODCOLORREF color, int width)
static GE_STATIC_EXPORT const OdGePoint3d kOrigin
OdGsAbstractRedirectionBase(RedirectionBaseInterface *=NULL)
void setLogicalPalette(const ODCOLORREF *logicalPalette, int numColors)
double lensLength() const
void onSize(const OdGsDCRect &outputRect)
virtual bool isValid() const =0
OdGsDefaultRedirectionBase(RedirectionBaseInterface *pRedirectionObj=NULL)
void onSize(const OdGsDCRectDouble &outputRect)
bool visualStyle(OdGiVisualStyle &visualStyle) const
virtual void clientViewInfo(OdGsClientViewInfo &clientViewInfo) const
virtual void setLineweightEnum(int numLineweights, const OdUInt8 *lineweights)=0
void insertView(int viewIndex, OdGsView *pView)
OdGeVector3d upVector() const
bool add(OdGiDrawable *pSceneGraph, OdGsModel *pModel)
const RedirectionBaseInterface * redirection() const
virtual RedirectionBaseInterface * redirection()=0
void setBackClip(double backClip)
OdGsDCRectDouble m_dcRect
void setUpdateManager(OdGsUpdateManagerPtr pManager)
void viewportClipRegion(OdIntArray &counts, OdGsDCPointArray &vertices) const
virtual void setLinetypeScaleMultiplier(double linetypeScaleMultiplier)=0
OdGiContext * userGiContext() const
virtual OdGePoint3d position() const =0
bool isInInteractivity() const
virtual void thawLayer(OdDbStub *layerID)=0
bool pointInViewport(const OdGePoint2d &screenPoint) const
virtual OdGsViewPtr createView(const OdGsClientViewInfo *pViewInfo=0, bool enableLayerVisibilityPerView=false)=0
virtual void zoom(double zoomFactor)=0
OdGsModel * getModel(const OdGiDrawable *pDrawable) const
void setRedirection(RedirectionBaseInterface *pRedirectionObj)
virtual void setBackground(OdDbStub *backgroundId)=0
void initLights(OdRxIterator *pLightsIterator)
virtual void insertView(int viewIndex, OdGsView *pView)=0
virtual ODCOLORREF getBackgroundColor()=0
virtual void viewParameters(OdGsView *pView) const =0
void getSize(OdGsDCRect &outputRect) const
void setViewportClipRegion(int numContours, int const *numVertices, OdGsDCPoint const *vertices)
bool extentsInView(const OdGePoint3d &minPt, const OdGePoint3d &maxPt) const
virtual bool isInInteractivity() const =0
OdDbStub * visualStyle() const
virtual bool add(OdGiDrawable *pSceneGraph, OdGsModel *pModel)=0
bool isPerspective() const
virtual double frontClip() const =0
virtual void onRealizeBackgroundPalette()=0
virtual bool loadDeviceState(OdGsFiler *pFiler)
virtual void setVisualStyle(OdDbStub *visualStyleId)=0
void getViewportBorderProperties(ODCOLORREF &color, int &width) const
void getViewport(OdGsDCRectDouble &screenRect) const
bool erase(OdGiDrawable *sceneGraph)
const ODCOLORREF * getLogicalPalette(int &numColors) const
void setUserGiContext(OdGiContext *pUserGiContext)
double fieldHeight() const
void setClearColor(OdGsView::ClearColor color)
double fieldHeight() const
bool isViewportBorderVisible() const
virtual void endInteractivity()=0
void beginInteractivity(double frameRateInHz)
static GE_STATIC_EXPORT const OdGeVector3d kYAxis
virtual void onDisplayChange(int bitsPerPixel, int xPixels, int yPixels)=0
void setEnableFrontClip(bool enable)
virtual void setLogicalPalette(const ODCOLORREF *logicalPalette, int numColors)=0
virtual void setLineweightToDcScale(double scale)=0
virtual bool isBackClipped() const =0
void enableDefaultLighting(bool bEnable, OdGsView::DefaultLightingType lightType=OdGsView::kTwoLights)
virtual OdGiContext * userGiContext() const =0
void setViewportBorderProperties(ODCOLORREF color, int width)
virtual OdGiContext * userGiContext() const =0
virtual OdGsDevice * device() const =0
virtual OdGsModel * getModel(const OdGiDrawable *pDrawable) const =0
virtual double backClip() const =0
void setLogicalPalette(const ODCOLORREF *logicalPalette, int numColors)
OdGeMatrix3d worldToDeviceMatrix() const
void setUserGiContext(OdGiContext *pUserGiContext)
void setViewport(const OdGsDCRectDouble &screenRect)
virtual void setViewportClipRegion(int numContours, int const *numVertices, OdGsDCPoint const *vertices)=0
virtual void orbit(double xOrbit, double yOrbit)=0
OdGsDevice * device() const
void setViewportClipRegion(int numContours, int const *numVertices, OdGePoint2d const *vertices)
virtual OdRxDictionaryPtr properties()=0
OdGeMatrix3d projectionMatrix() const
virtual bool exceededBounds()=0
virtual void setViewport3dClipping(const OdGiClipBoundary *pBoundary, const OdGiAbstractClipBoundary *pClipInfo=NULL)
const ODCOLORREF * getLogicalPalette(int &numColors) const
bool loadDeviceState(OdGsFiler *pFiler)
virtual void setEnableFrontClip(bool enable)=0
virtual void setRedirection(RedirectionBaseInterface *)
void insertView(int viewIndex, OdGsView *pView)
virtual void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier)=0
void setStereoParameters(double magnitude, double parallax)
void addView(OdGsView *pView)
double interactivityFrameRate() const
virtual void setClearColor(ClearColor color)=0
static GE_STATIC_EXPORT const OdGeMatrix3d kIdentity
void setLineweightToDcScale(double scale)
OdGeMatrix3d viewingMatrix() const
virtual OdDbStub * background() const =0
void getNumPixelsInUnitSquare(const OdGePoint3d &point, OdGePoint2d &pixelDensity, bool bUsePerspective=true) const
double lineweightToDcScale() const
virtual OdGsModelArray getModelList() const =0
double linetypeAlternateScaleMultiplier() const
double fieldWidth() const
ODCOLORREF getBackgroundColor()
void enableStereo(bool enabled)
void setVisualStyle(const OdGiVisualStyle &visualStyle)
virtual double lensLength() const =0
void setVisualStyle(OdDbStub *visualStyleId)
OdGePoint3d position() const
virtual bool isStereoEnabled() const =0
virtual OdGsViewPtr cloneView(bool cloneViewParameters=true, bool cloneGeometry=false)=0
virtual OdGsModelPtr createModel()=0
const OdGiClipBoundary * viewport3dClipping(const OdGiAbstractClipBoundary **ppClipInfo=NULL) const
void addView(OdGsView *pView)
void setViewport3dClipping(const OdGiClipBoundary *pBoundary, const OdGiAbstractClipBoundary *pClipInfo=NULL)
virtual double linetypeScaleMultiplier() const =0