CFx SDK Documentation  2022 SP0
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
OdRxObject OdDbBaseDatabase
OdSmartPtr< OdAbstractViewPE > OdAbstractViewPEPtr
#define DBROOT_EXPORT
Definition: DbRootExport.h:39
#define NULL
Definition: GsProperties.h:177
virtual void setBackground(OdRxObject *pViewport, OdDbStub *backgroundId) const =0
virtual void setDefaultLightingType(OdRxObject *pViewport, OdGiViewportTraits::DefaultLightingType lightingType) const
virtual void setFrontClipOn(OdRxObject *pViewport, bool frontClip) const =0
virtual OdDb::OrthographicView orthoUcs(const OdRxObject *pViewport, const OdDbBaseDatabase *pDb=0) const
virtual bool plotExtents(const OdRxObject *pViewport, OdGeBoundBlock3d &extents, bool bExtendOnly=false, bool bExtentsValid=true, const OdGeMatrix3d *pWorldToEye=NULL) const
virtual OdGeVector2d viewOffset(const OdRxObject *pViewport) const
virtual void setViewport(OdRxObject *pViewport, const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight) const
virtual double frontClipDistance(const OdRxObject *pViewport) const =0
virtual void setRenderMode(OdRxObject *pViewport, OdDb::RenderMode renderMode) const =0
virtual OdRxObjectPtr plotDataObject(const OdRxObject *pViewport, bool bOpenForWrite=false) const
virtual double viewTwist(const OdRxObject *pViewport) const =0
virtual bool zoomExtents(OdRxObject *pViewport, const OdGeBoundBlock3d *pExtents=0, double extCoef=1.02) const
virtual void setBackClipDistance(OdRxObject *pViewport, double backClipDistance) const =0
virtual void setDefaultLightingOn(OdRxObject *pViewport, bool isOn) const
virtual bool isPerspective(const OdRxObject *pViewport) const =0
virtual OdGiViewportTraits::DefaultLightingType defaultLightingType(const OdRxObject *pViewport) const
virtual void setView(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
virtual bool setUcs(OdRxObject *pViewport, OdDb::OrthographicView orthoUcs, const OdDbBaseDatabase *pDb=0) const
virtual bool isBackClipOn(const OdRxObject *pViewport) const =0
virtual void frozenLayers(const OdRxObject *pViewport, OdDbStubPtrArray &frozenLayers) const
virtual OdGePoint2d lowerLeftCorner(const OdRxObject *pViewport) const
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
virtual OdDbStub * compatibleCopyObject(const OdRxObject *pViewport, OdDbStub *pCopyObject) const
virtual bool hasUcs(const OdRxObject *pViewport) const
virtual bool hasViewport(const OdRxObject *pViewport) const
virtual double fieldHeight(const OdRxObject *pViewport) const =0
virtual void setFrontClipDistance(OdRxObject *pViewport, double frontClipDistance) const =0
virtual double fieldWidth(const OdRxObject *pViewport) const =0
virtual void setUcs(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
virtual void setUcs(OdRxObject *pViewport, const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis) const
virtual OdDbStub * ucsName(const OdRxObject *pViewport) const
virtual bool applyPlotSettings(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
virtual OdDbStub * visualStyle(const OdRxObject *pViewport) const =0
virtual double lensLength(const OdRxObject *pViewport) const =0
virtual void setBackClipOn(OdRxObject *pViewport, bool backClip) const =0
virtual bool hasViewOffset(const OdRxObject *pViewport) const
virtual OdGeVector3d upVector(const OdRxObject *pViewport) const =0
virtual OdDb::RenderMode renderMode(const OdRxObject *pViewport) const =0
virtual void setFrontClipAtEyeOn(OdRxObject *pViewport, bool frontClipAtEye) const =0
virtual bool setUcs(OdRxObject *pViewport, OdDbStub *ucsId) const
virtual void getUcs(const OdRxObject *pViewport, OdGePoint3d &origin, OdGeVector3d &xAxis, OdGeVector3d &yAxis) const
virtual OdGeVector3d direction(const OdRxObject *pViewport) const =0
virtual bool isFrontClipOn(const OdRxObject *pViewport) const =0
virtual double backClipDistance(const OdRxObject *pViewport) const =0
virtual void setFrozenLayers(OdRxObject *pViewport, const OdDbStubPtrArray &frozenLayers) const
virtual OdDbStub * annotationScale(const OdRxObject *pViewport) const
virtual bool viewExtents(const OdRxObject *pViewport, OdGeBoundBlock3d &extents) const =0
virtual OdGeMatrix3d worldToEye(const OdRxObject *pViewport) const
virtual OdGeMatrix3d eyeToWorld(const OdRxObject *pViewport) const
virtual void setVisualStyle(OdRxObject *pViewport, OdDbStub *visualStyleId) const =0
virtual void setLensLength(OdRxObject *pViewport, double lensLength) const =0
virtual bool isPlotting(const OdRxObject *pViewport) const
virtual bool isFrontClipAtEyeOn(const OdRxObject *pViewport) const =0
virtual bool isDefaultLightingOn(const OdRxObject *pViewport) const
ODRX_DECLARE_MEMBERS(OdAbstractViewPE)
virtual OdGePoint2d upperRightCorner(const OdRxObject *pViewport) const
virtual OdDbStub * background(const OdRxObject *pViewport) const =0
virtual double elevation(const OdRxObject *pViewport) const
virtual void setElevation(OdRxObject *pViewport, double elevation) const
virtual OdGePoint3d target(const OdRxObject *pViewport) const =0
static GE_STATIC_EXPORT const OdGeVector2d kIdentity
Definition: GeVector2d.h:65
OrthographicView
Definition: ViewportDefs.h:35
RenderMode
Definition: ViewportDefs.h:46