MrDwgViewport.h
1 // Copyright (c) Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 #pragma once
11 
12 #include <acgi.h>
13 
14 class MrDwgViewport : public AcGiViewport
15 {
16 public:
17  ACRX_DECLARE_MEMBERS(AcGiViewport);
18  MrDwgViewport();
19  ~MrDwgViewport();
20 
21  void getModelToEyeTransform(AcGeMatrix3d& mx) const;
22  void getEyeToModelTransform(AcGeMatrix3d& mx) const;
23  void getWorldToEyeTransform(AcGeMatrix3d& mx) const;
24  void getEyeToWorldTransform(AcGeMatrix3d& mx) const;
25 
26  Adesk::Boolean isPerspective() const;
27  Adesk::Boolean doPerspective(AcGePoint3d&) const;
28  Adesk::Boolean doInversePerspective(AcGePoint3d&) const;
29 
30  void getNumPixelsInUnitSquare(const AcGePoint3d& givenWorldpt, AcGePoint2d& pixelArea, bool includePerspective = true) const;
31 
32  void getCameraLocation(AcGePoint3d& location) const;
33  void getCameraTarget(AcGePoint3d& target) const;
34  void getCameraUpVector(AcGeVector3d& upVector) const;
35 
36  Adesk::ULongPtr viewportId() const;
37  Adesk::Int16 acadWindowId() const;
38  void getViewportDcCorners(AcGePoint2d& lower_left,AcGePoint2d& upper_right) const;
39 
40  Adesk::Boolean getFrontAndBackClipValues(Adesk::Boolean& clip_front, Adesk::Boolean& clip_back, double& front, double& back) const;
41  double linetypeScaleMultiplier() const;
42  double linetypeGenerationCriteria() const;
43 
44  AcGeVector3d viewDir() const;
45 
46 protected:
47  AcGePoint3d cameraTarget;
48  AcGePoint3d cameraLocation;
49  AcGeVector3d cameraUpVector;
50 };
Definition: MrDwgViewport.h:14