Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

MrDwgViewport.h
00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc.
00002 //
00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
00004 // and considered a trade secret as defined under civil and criminal statutes.
00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
00006 // unauthorized use or misappropriation of its trade secrets.  Use of this information
00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
00009 
00010 #pragma once
00011 
00012 #include <acgi.h>
00013 
00014 class MrDwgViewport : public AcGiViewport
00015 {
00016 public:
00017     ACRX_DECLARE_MEMBERS(AcGiViewport);
00018     MrDwgViewport();
00019     ~MrDwgViewport();
00020 
00021     void getModelToEyeTransform(AcGeMatrix3d& mx) const;
00022     void getEyeToModelTransform(AcGeMatrix3d& mx) const;
00023     void getWorldToEyeTransform(AcGeMatrix3d& mx) const;
00024     void getEyeToWorldTransform(AcGeMatrix3d& mx) const;
00025 
00026     Adesk::Boolean isPerspective() const;
00027     Adesk::Boolean doPerspective(AcGePoint3d&) const;
00028     Adesk::Boolean doInversePerspective(AcGePoint3d&) const;
00029 
00030     void getNumPixelsInUnitSquare(const AcGePoint3d& givenWorldpt, AcGePoint2d& pixelArea, bool includePerspective = true) const;
00031 
00032     void getCameraLocation(AcGePoint3d& location) const;
00033     void getCameraTarget(AcGePoint3d& target) const;
00034     void getCameraUpVector(AcGeVector3d& upVector) const;
00035 
00036     Adesk::ULongPtr viewportId() const;
00037     Adesk::Int16  acadWindowId() const;
00038     void getViewportDcCorners(AcGePoint2d& lower_left,AcGePoint2d& upper_right) const;
00039 
00040     Adesk::Boolean getFrontAndBackClipValues(Adesk::Boolean& clip_front, Adesk::Boolean& clip_back, double& front, double& back) const;
00041     double linetypeScaleMultiplier() const;
00042     double linetypeGenerationCriteria() const;
00043 
00044     AcGeVector3d viewDir() const;
00045 
00046 protected:
00047     AcGePoint3d cameraTarget;
00048     AcGePoint3d cameraLocation;
00049     AcGeVector3d cameraUpVector;
00050 };