CFx SDK Documentation  2020SP3
AbstractViewPE.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 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 OD_ABSTRACTVIEWPE_H
25 #define OD_ABSTRACTVIEWPE_H
26 
27 #include "DbRootExport.h"
28 #include "Ge/GePoint3d.h"
29 #include "Ge/GeVector3d.h"
30 #include "ViewportDefs.h"
31 #include "DbStubPtrArray.h"
32 #include "Gi/GiViewportTraits.h"
33 
34 class OdGeBoundBlock3d;
35 
37 
38 #include "TD_PackPush.h"
39 
57 {
58 public:
60 
61  // Viewport methods:
62 
72  virtual OdGePoint2d lowerLeftCorner(const OdRxObject* pViewport) const;
82  virtual OdGePoint2d upperRightCorner(const OdRxObject* pViewport) const;
94  virtual void setViewport(OdRxObject* pViewport, const OdGePoint2d& lowerLeft, const OdGePoint2d& upperRight) const;
99  virtual bool hasViewport(const OdRxObject* pViewport) const;
100 
101  // View methods:
102 
107  virtual OdGePoint3d target(const OdRxObject* pViewport) const = 0;
108 
113  virtual OdGeVector3d direction(const OdRxObject* pViewport) const = 0;
114 
119  virtual OdGeVector3d upVector (const OdRxObject* pViewport) const = 0;
126  virtual double fieldWidth(const OdRxObject* pViewport) const = 0;
133  virtual double fieldHeight(const OdRxObject* pViewport) const = 0;
134 
139  virtual bool isPerspective(const OdRxObject* pViewport) const = 0;
140 
145  virtual OdGeVector2d viewOffset(const OdRxObject* pViewport) const;
150  virtual bool hasViewOffset(const OdRxObject* pViewport) const;
151 
156  virtual double viewTwist(const OdRxObject* pViewport) const = 0;
157 
172  virtual void setView(
173  OdRxObject* pViewport,
174  const OdGePoint3d& target,
175  const OdGeVector3d& direction,
176  const OdGeVector3d& upVector,
177  double fieldWidth,
178  double fieldHeight,
179  bool isPerspective,
180  const OdGeVector2d& viewOffset = OdGeVector2d::kIdentity) const = 0;
181 
187  virtual void setLensLength(OdRxObject* pViewport, double lensLength) const = 0;
192  virtual double lensLength(const OdRxObject* pViewport) const = 0;
193 
198  virtual bool isFrontClipOn(const OdRxObject* pViewport) const = 0;
199 
205  virtual void setFrontClipOn(OdRxObject* pViewport, bool frontClip) const = 0;
206 
211  virtual bool isBackClipOn(const OdRxObject* pViewport) const = 0;
212 
218  virtual void setBackClipOn(OdRxObject* pViewport, bool backClip) const = 0;
219 
226  virtual bool isFrontClipAtEyeOn(const OdRxObject* pViewport) const = 0;
227 
236  virtual void setFrontClipAtEyeOn(OdRxObject* pViewport, bool frontClipAtEye) const = 0;
237 
242  virtual double frontClipDistance(const OdRxObject* pViewport) const = 0;
243 
249  virtual void setFrontClipDistance(OdRxObject* pViewport, double frontClipDistance) const = 0;
250 
255  virtual double backClipDistance(const OdRxObject* pViewport) const = 0;
261  virtual void setBackClipDistance(OdRxObject* pViewport, double backClipDistance) const = 0;
262 
283  virtual void setRenderMode(OdRxObject* pViewport, OdDb::RenderMode renderMode) const = 0;
284 
304  virtual OdDb::RenderMode renderMode(const OdRxObject* pViewport) const = 0;
305 
311  virtual void setVisualStyle(OdRxObject* pViewport, OdDbStub* visualStyleId) const = 0;
316  virtual OdDbStub* visualStyle(const OdRxObject* pViewport) const = 0;
317 
323  virtual void setBackground(OdRxObject* pViewport, OdDbStub* backgroundId) const = 0;
328  virtual OdDbStub* background(const OdRxObject* pViewport) const = 0;
329 
334  virtual bool isDefaultLightingOn(const OdRxObject* pViewport) const;
340  virtual void setDefaultLightingOn(OdRxObject* pViewport, bool isOn) const;
341 
352  virtual void setDefaultLightingType(OdRxObject* pViewport, OdGiViewportTraits::DefaultLightingType lightingType) const;
353 
360  virtual void frozenLayers(const OdRxObject* pViewport, OdDbStubPtrArray& frozenLayers) const;
361 
368  virtual void setFrozenLayers(OdRxObject* pViewport, const OdDbStubPtrArray& frozenLayers) const;
369 
379  virtual void setView(OdRxObject* pDestinationView, const OdRxObject* pSourceView) const;
380 
381  // UCS methods:
382 
388  virtual bool hasUcs(const OdRxObject* pViewport) const;
389 
410  virtual OdDb::OrthographicView orthoUcs(const OdRxObject* pViewport, const OdDbBaseDatabase* pDb = 0) const;
411 
432  virtual bool setUcs(OdRxObject* pViewport, OdDb::OrthographicView orthoUcs, const OdDbBaseDatabase* pDb = 0) const;
433 
438  virtual OdDbStub* ucsName(const OdRxObject* pViewport) const;
439 
448  virtual bool setUcs(OdRxObject* pViewport, OdDbStub* ucsId) const;
449 
456  virtual void getUcs(const OdRxObject* pViewport, OdGePoint3d& origin, OdGeVector3d& xAxis, OdGeVector3d& yAxis) const;
457 
466  virtual void setUcs(OdRxObject* pViewport, const OdGePoint3d& origin, const OdGeVector3d& xAxis, const OdGeVector3d& yAxis) const;
467 
472  virtual double elevation(const OdRxObject* pViewport) const;
473 
479  virtual void setElevation(OdRxObject* pViewport, double elevation) const;
488  virtual void setUcs(OdRxObject* pDestinationView, const OdRxObject* pSourceView) const;
489 
490  // Util methods:
491 
506  virtual bool viewExtents(
507  const OdRxObject* pViewport,
508  OdGeBoundBlock3d& extents) const = 0;
509 
527  virtual bool plotExtents(
528  const OdRxObject* pViewport,
529  OdGeBoundBlock3d& extents,
530  bool bExtendOnly = false,
531  bool bExtentsValid = true,
532  const OdGeMatrix3d *pWorldToEye = NULL) const;
533 
547  virtual bool zoomExtents(
548  OdRxObject* pViewport,
549  const OdGeBoundBlock3d* pExtents = 0,
550  double extCoef = 1.02) const;
551 
559  virtual OdGeMatrix3d worldToEye(const OdRxObject* pViewport) const;
567  virtual OdGeMatrix3d eyeToWorld(const OdRxObject* pViewport) const;
568 
573  virtual bool isPlotting(const OdRxObject* pViewport) const;
585  virtual OdRxObjectPtr plotDataObject(const OdRxObject* pViewport, bool bOpenForWrite = false) const;
593  virtual bool applyPlotSettings(OdRxObject* pDestinationView, const OdRxObject* pSourceView) const;
594 
599  virtual OdDbStub* annotationScale(const OdRxObject* pViewport) const;
600 
607  virtual OdDbStub* compatibleCopyObject(const OdRxObject* pViewport, OdDbStub* pCopyObject) const;
608 };
609 
614 
615 #include "TD_PackPop.h"
616 
617 #endif // OD_ABSTRACTVIEWPE_H
OdAbstractViewPE::orthoUcs
virtual OdDb::OrthographicView orthoUcs(const OdRxObject *pViewport, const OdDbBaseDatabase *pDb=0) const
OdGeVector3d
Definition: GeVector3d.h:54
NULL
#define NULL
Definition: GsProperties.h:177
OdRxObjectPtr
Definition: RxObject.h:345
OdAbstractViewPE::annotationScale
virtual OdDbStub * annotationScale(const OdRxObject *pViewport) const
OdAbstractViewPE::viewExtents
virtual bool viewExtents(const OdRxObject *pViewport, OdGeBoundBlock3d &extents) const =0
OdAbstractViewPE::renderMode
virtual OdDb::RenderMode renderMode(const OdRxObject *pViewport) const =0
GiViewportTraits.h
OdAbstractViewPE::upperRightCorner
virtual OdGePoint2d upperRightCorner(const OdRxObject *pViewport) const
OdAbstractViewPE::setDefaultLightingOn
virtual void setDefaultLightingOn(OdRxObject *pViewport, bool isOn) const
OdAbstractViewPE::setRenderMode
virtual void setRenderMode(OdRxObject *pViewport, OdDb::RenderMode renderMode) const =0
OdAbstractViewPE::setBackClipDistance
virtual void setBackClipDistance(OdRxObject *pViewport, double backClipDistance) const =0
OdRxObject
Definition: RxObject.h:564
OdAbstractViewPE::isPerspective
virtual bool isPerspective(const OdRxObject *pViewport) const =0
OdAbstractViewPE::setView
virtual void setView(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
OdDbBaseDatabase
OdRxObject OdDbBaseDatabase
Definition: AbstractViewPE.h:34
OdAbstractViewPE::isDefaultLightingOn
virtual bool isDefaultLightingOn(const OdRxObject *pViewport) const
OdArray< OdDbStub *, OdMemoryAllocator< OdDbStub * > >
TD_PackPop.h
OdAbstractViewPE::elevation
virtual double elevation(const OdRxObject *pViewport) const
OdAbstractViewPE::frozenLayers
virtual void frozenLayers(const OdRxObject *pViewport, OdDbStubPtrArray &frozenLayers) const
OdAbstractViewPE::visualStyle
virtual OdDbStub * visualStyle(const OdRxObject *pViewport) const =0
OdAbstractViewPE::target
virtual OdGePoint3d target(const OdRxObject *pViewport) const =0
OdGeMatrix3d
Definition: GeMatrix3d.h:73
DbRootExport.h
OdAbstractViewPE::hasUcs
virtual bool hasUcs(const OdRxObject *pViewport) const
OdAbstractViewPE::setFrozenLayers
virtual void setFrozenLayers(OdRxObject *pViewport, const OdDbStubPtrArray &frozenLayers) const
OdAbstractViewPE::frontClipDistance
virtual double frontClipDistance(const OdRxObject *pViewport) const =0
OdAbstractViewPE::defaultLightingType
virtual OdGiViewportTraits::DefaultLightingType defaultLightingType(const OdRxObject *pViewport) const
OdAbstractViewPE::backClipDistance
virtual double backClipDistance(const OdRxObject *pViewport) const =0
OdAbstractViewPE::viewTwist
virtual double viewTwist(const OdRxObject *pViewport) const =0
OdSmartPtr
Definition: SmartPtr.h:58
OdGePoint3d
Definition: GePoint3d.h:55
OdAbstractViewPE::plotDataObject
virtual OdRxObjectPtr plotDataObject(const OdRxObject *pViewport, bool bOpenForWrite=false) const
OdAbstractViewPE::setElevation
virtual void setElevation(OdRxObject *pViewport, double elevation) const
OdAbstractViewPE::setVisualStyle
virtual void setVisualStyle(OdRxObject *pViewport, OdDbStub *visualStyleId) const =0
OdAbstractViewPE::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdAbstractViewPE)
GePoint3d.h
OdGeVector2d::kIdentity
static GE_STATIC_EXPORT const OdGeVector2d kIdentity
Definition: GeVector2d.h:65
OdAbstractViewPE::setUcs
virtual bool setUcs(OdRxObject *pViewport, OdDbStub *ucsId) const
OdAbstractViewPE::isFrontClipAtEyeOn
virtual bool isFrontClipAtEyeOn(const OdRxObject *pViewport) const =0
OdAbstractViewPE::setUcs
virtual void setUcs(OdRxObject *pViewport, const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis) const
OdAbstractViewPE::hasViewOffset
virtual bool hasViewOffset(const OdRxObject *pViewport) const
OdAbstractViewPE::setBackClipOn
virtual void setBackClipOn(OdRxObject *pViewport, bool backClip) const =0
OdAbstractViewPE::setBackground
virtual void setBackground(OdRxObject *pViewport, OdDbStub *backgroundId) const =0
OdAbstractViewPE::setLensLength
virtual void setLensLength(OdRxObject *pViewport, double lensLength) const =0
OdGeVector2d
Definition: GeVector2d.h:51
OdAbstractViewPE::setFrontClipDistance
virtual void setFrontClipDistance(OdRxObject *pViewport, double frontClipDistance) const =0
OdAbstractViewPE::viewOffset
virtual OdGeVector2d viewOffset(const OdRxObject *pViewport) const
OdAbstractViewPE::setDefaultLightingType
virtual void setDefaultLightingType(OdRxObject *pViewport, OdGiViewportTraits::DefaultLightingType lightingType) const
OdDb::RenderMode
RenderMode
Definition: ViewportDefs.h:46
TD_PackPush.h
GeVector3d.h
OdAbstractViewPE::zoomExtents
virtual bool zoomExtents(OdRxObject *pViewport, const OdGeBoundBlock3d *pExtents=0, double extCoef=1.02) const
OdDb::OrthographicView
OrthographicView
Definition: ViewportDefs.h:35
OdAbstractViewPE::isFrontClipOn
virtual bool isFrontClipOn(const OdRxObject *pViewport) const =0
OdGeBoundBlock3d
Definition: GeBoundBlock3d.h:43
OdAbstractViewPEPtr
OdSmartPtr< OdAbstractViewPE > OdAbstractViewPEPtr
Definition: AbstractViewPE.h:613
OdAbstractViewPE::setView
virtual void setView(OdRxObject *pViewport, const OdGePoint3d &target, const OdGeVector3d &direction, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, bool isPerspective, const OdGeVector2d &viewOffset=OdGeVector2d::kIdentity) const =0
OdAbstractViewPE::plotExtents
virtual bool plotExtents(const OdRxObject *pViewport, OdGeBoundBlock3d &extents, bool bExtendOnly=false, bool bExtentsValid=true, const OdGeMatrix3d *pWorldToEye=NULL) const
OdAbstractViewPE::fieldWidth
virtual double fieldWidth(const OdRxObject *pViewport) const =0
DBROOT_EXPORT
#define DBROOT_EXPORT
Definition: DbRootExport.h:39
OdAbstractViewPE::getUcs
virtual void getUcs(const OdRxObject *pViewport, OdGePoint3d &origin, OdGeVector3d &xAxis, OdGeVector3d &yAxis) const
OdAbstractViewPE::setFrontClipOn
virtual void setFrontClipOn(OdRxObject *pViewport, bool frontClip) const =0
OdAbstractViewPE
Definition: AbstractViewPE.h:57
OdAbstractViewPE::hasViewport
virtual bool hasViewport(const OdRxObject *pViewport) const
OdAbstractViewPE::compatibleCopyObject
virtual OdDbStub * compatibleCopyObject(const OdRxObject *pViewport, OdDbStub *pCopyObject) const
OdAbstractViewPE::ucsName
virtual OdDbStub * ucsName(const OdRxObject *pViewport) const
OdAbstractViewPE::setUcs
virtual bool setUcs(OdRxObject *pViewport, OdDb::OrthographicView orthoUcs, const OdDbBaseDatabase *pDb=0) const
OdAbstractViewPE::applyPlotSettings
virtual bool applyPlotSettings(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
OdAbstractViewPE::fieldHeight
virtual double fieldHeight(const OdRxObject *pViewport) const =0
DbStubPtrArray.h
OdAbstractViewPE::setViewport
virtual void setViewport(OdRxObject *pViewport, const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight) const
OdAbstractViewPE::background
virtual OdDbStub * background(const OdRxObject *pViewport) const =0
OdGiViewportTraits::DefaultLightingType
DefaultLightingType
Definition: GiViewportTraits.h:181
OdAbstractViewPE::upVector
virtual OdGeVector3d upVector(const OdRxObject *pViewport) const =0
ViewportDefs.h
OdAbstractViewPE::worldToEye
virtual OdGeMatrix3d worldToEye(const OdRxObject *pViewport) const
OdAbstractViewPE::setFrontClipAtEyeOn
virtual void setFrontClipAtEyeOn(OdRxObject *pViewport, bool frontClipAtEye) const =0
OdAbstractViewPE::setUcs
virtual void setUcs(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
OdAbstractViewPE::lowerLeftCorner
virtual OdGePoint2d lowerLeftCorner(const OdRxObject *pViewport) const
OdAbstractViewPE::direction
virtual OdGeVector3d direction(const OdRxObject *pViewport) const =0
OdAbstractViewPE::isBackClipOn
virtual bool isBackClipOn(const OdRxObject *pViewport) const =0
OdAbstractViewPE::eyeToWorld
virtual OdGeMatrix3d eyeToWorld(const OdRxObject *pViewport) const
OdAbstractViewPE::isPlotting
virtual bool isPlotting(const OdRxObject *pViewport) const
OdGePoint2d
Definition: GePoint2d.h:60
OdAbstractViewPE::lensLength
virtual double lensLength(const OdRxObject *pViewport) const =0