MrDwgViewportGeometry.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 "MrDwgGeometry.h"
13 #include "MrDwgViewportDraw.h"
14 
15 #include <acgi.h>
16 
17 class MrDwgViewportGeometry : public AcGiViewportGeometry, public MrDwgGeometry
18 {
19 public:
20  ACRX_DECLARE_MEMBERS(MrDwgViewportGeometry);
23 
24  Adesk::Boolean polylineEye(const Adesk::UInt32 nbPoints, const AcGePoint3d * pPoints) const;
25  Adesk::Boolean polygonEye(const Adesk::UInt32 nbPoints, const AcGePoint3d * pPoints) const;
26  Adesk::Boolean polylineDc(const Adesk::UInt32 nbPoints, const AcGePoint3d * pPoints) const;
27  Adesk::Boolean polygonDc(const Adesk::UInt32 nbPoints, const AcGePoint3d * pPoints) const;
28  Adesk::Boolean rasterImageDc(const AcGePoint3d & origin, const AcGeVector3d & u, const AcGeVector3d & v, const AcGeMatrix2d & pixelToDc, AcDbObjectId entityId, AcGiImageOrg imageOrg, Adesk::UInt32 imageWidth, Adesk::UInt32 imageHeight, Adesk::Int16 imageColorDepth, Adesk::Boolean transparency, ImageSource source, const AcGeVector3d & unrotatedU, const AcGiImageOrg origionalImageOrg, const AcGeMatrix2d & unrotatedPixelToDc, const Adesk::UInt32 unrotatedImageWidth, const Adesk::UInt32 unrotatedImageHeight) const;
29  Adesk::Boolean ownerDrawDc(long vpnumber, long left, long top, long right, long bottom, const OwnerDraw * pOwnerDraw) const;
30  Adesk::Boolean ownerDraw3d(AcGePoint3d & minBounds, AcGePoint3d & maxBounds, OwnerDraw3d * pOwnerDraw) const;
31  Adesk::Boolean edge(const AcArray<AcGeCurve2d *> &) const;
32 
33  void getModelToWorldTransform(AcGeMatrix3d &) const;
34  void getWorldToModelTransform(AcGeMatrix3d &) const;
35 
36  Adesk::Boolean pushModelTransform(const AcGeVector3d & vNormal);
37  Adesk::Boolean pushModelTransform(const AcGeMatrix3d & xMat);
38  Adesk::Boolean popModelTransform();
39 
40  AcGeMatrix3d pushPositionTransform(AcGiPositionTransformBehavior behavior, const AcGePoint3d & offset);
41  AcGeMatrix3d pushPositionTransform(AcGiPositionTransformBehavior behavior, const AcGePoint2d & offset);
42  AcGeMatrix3d pushScaleTransform(AcGiScaleTransformBehavior behavior, const AcGePoint3d & extents);
43  AcGeMatrix3d pushScaleTransform(AcGiScaleTransformBehavior behavior, const AcGePoint2d & extents);
44  AcGeMatrix3d pushOrientationTransform(AcGiOrientationTransformBehavior behavior);
45 
46  Adesk::Boolean circle(const AcGePoint3d & center, const double radius, const AcGeVector3d & normal) const;
47  Adesk::Boolean circle(const AcGePoint3d &, const AcGePoint3d &, const AcGePoint3d &) const;
48  Adesk::Boolean circularArc(const AcGePoint3d & center, const double radius, const AcGeVector3d & normal, const AcGeVector3d & startVector, const double sweepAngle, const AcGiArcType arcType = kAcGiArcSimple) const;
49  Adesk::Boolean circularArc(const AcGePoint3d & start, const AcGePoint3d & point, const AcGePoint3d & end, const AcGiArcType arcType = kAcGiArcSimple) const;
50  Adesk::Boolean polyline(const Adesk::UInt32 nbPoints, const AcGePoint3d * pVertexList, const AcGeVector3d * pNormal = NULL, Adesk::LongPtr lBaseSubEntMarker = -1) const;
51  Adesk::Boolean polyline(const AcGiPolyline & polylineObj) const;
52  Adesk::Boolean polyPolyline(Adesk::UInt32 nbPolylines, const AcGiPolyline * pPolylines) const;
53  Adesk::Boolean polyPolygon(const Adesk::UInt32 numPolygonIndices, const Adesk::UInt32 * numPolygonPositions, const AcGePoint3d * polygonPositions, const Adesk::UInt32 * numPolygonPoints, const AcGePoint3d * polygonPoints, const AcCmEntityColor * outlineColors = NULL, const AcGiLineType * outlineTypes = NULL, const AcCmEntityColor * fillColors = NULL, const AcCmTransparency * fillOpacities = NULL) const;
54  Adesk::Boolean image(const AcGiImageBGRA32 & imageSource, const AcGePoint3d & position, const AcGeVector3d & u, const AcGeVector3d & v, TransparencyMode transparencyMode = kTransparency8Bit) const;
55  Adesk::Boolean rowOfDots(int count, const AcGePoint3d & start, const AcGeVector3d & step) const;
56  Adesk::Boolean ellipticalArc(const AcGePoint3d & center, const AcGeVector3d & normal, double majorAxisLength, double minorAxisLength, double startDegreeInRads, double endDegreeInRads, double tiltDegreeInRads, AcGiArcType arcType = kAcGiArcSimple) const;
57 
58  Adesk::Boolean polygon(const Adesk::UInt32 nbPoints, const AcGePoint3d * pVertexList) const;
59  Adesk::Boolean mesh(const Adesk::UInt32 rows, const Adesk::UInt32 columns, const AcGePoint3d * pVertexList, const AcGiEdgeData * pEdgeData = NULL, const AcGiFaceData * pFaceData = NULL, const AcGiVertexData * pVertexData = NULL, const bool bAutoGenerateNormals = true) const;
60  Adesk::Boolean shell(const Adesk::UInt32 nbVertex, const AcGePoint3d * pVertexList, const Adesk::UInt32 faceListSize, const Adesk::Int32 * pFaceList, const AcGiEdgeData * pEdgeData = NULL, const AcGiFaceData * pFaceData = NULL, const AcGiVertexData * pVertexData = NULL, const struct resbuf *pResBuf = NULL, const bool bAutoGenerateNormals = true) const;
61  Adesk::Boolean text(const AcGePoint3d & position, const AcGeVector3d & normal, const AcGeVector3d & direction, const double height, const double width, const double oblique, const ACHAR * pMsg) const;
62  Adesk::Boolean text(const AcGePoint3d & position, const AcGeVector3d & normal, const AcGeVector3d & direction, const ACHAR * pMsg, const Adesk::Int32 length, const Adesk::Boolean raw, const AcGiTextStyle & pTextStyle) const;
63  Adesk::Boolean xline(const AcGePoint3d &, const AcGePoint3d &) const;
64  Adesk::Boolean ray(const AcGePoint3d &, const AcGePoint3d &) const;
65  Adesk::Boolean pline(const AcDbPolyline & lwBuf, Adesk::UInt32 fromIndex = 0, Adesk::UInt32 numSegs = 0) const;
66 
67  Adesk::Boolean draw(AcGiDrawable *) const;
68 
69  Adesk::Boolean pushClipBoundary(AcGiClipBoundary * pBoundary);
70  void popClipBoundary();
71 
72  std::map<std::wstring, std::string> * m_pFontmap;
73  mTextData * m_pMText;
74  HC_KEY m_entitySegment;
75 };
#define HC_KEY
Definition: MrDwgGeometry.h:21
Definition: MrDwgViewportGeometry.h:17
Definition: misc.h:29