/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef OD_GI_SR_GEOMETRY #define OD_GI_SR_GEOMETRY #include "TD_PackPush.h" #include "Gi/GiGeometrySimplifier.h" #include "data/metafile/SrMetafile.h" class OdGsSrVectorizeView; class OdSrMetafilePackager; class OdSrMetafile; class OdGeVector3d; template void processRecord(OdSrMetafilePackager* pPackager, OdSrFrameContext* pContext, OdGsSrVectorizeView*, Values... values) { if (pPackager->isPacking()) { auto pRec = T::createObject(values...); pPackager->addRecord(pRec); } else T::play(*pContext, values...); } class OdGiSrGeometry : public OdGiGeometrySimplifier { public: OdGiSrGeometry(); ~OdGiSrGeometry() override; void polylineOut(OdInt32 nPts, const OdGePoint3d* points) override; void polylineProc(OdInt32 numPoints, const OdGePoint3d* vertexList, const OdGeVector3d* pNormal = 0, const OdGeVector3d* pExtrusion = 0, OdGsMarker baseSubEntMarker = -1) override; virtual void initTexture(const OdGePoint3d& origin, const OdGeVector3d& u, const OdGeVector3d& v, const OdGiRasterImage* pImage, bool transparency, double brightness, double contrast, double fade) ODRX_OVERRIDE; virtual void uninitTexture() ODRX_OVERRIDE; void addRecord(OdSrRecord* pRec); //void circularArcProc( // const OdGePoint3d& center, // double radius, // const OdGeVector3d& normal, // const OdGeVector3d& startVector, // double sweepAngle, // OdGiArcType arcType, // const OdGeVector3d* pExtrusion = 0); void circleProc(const OdGePoint3d& center, double radius, const OdGeVector3d& normal, const OdGeVector3d* pExtrusion = 0) override; //virtual void ellipArcProc( // const OdGeEllipArc3d& ellipArc, // const OdGePoint3d* endPointOverrides = 0, // OdGiArcType arcType = kOdGiArcSimple, // const OdGeVector3d* pExtrusion = 0); void onTraitsModified(); void polygonProc(OdInt32 numPoints, const OdGePoint3d* vertexList, const OdGeVector3d* pNormal = 0, const OdGeVector3d* pExtrusion = 0) override; void triangleOut(const OdInt32* vertices, const OdGeVector3d* pNormal) override; void shellFaceOut(OdInt32 faceListSize, const OdInt32* pFaceList, const OdGeVector3d* pNormal) override; void beginMetafile(OdRxObject* pMetafile, OdGsBaseVectorizer* pVectorizer); void endMetafile(OdRxObject* pMetafile); void startPacking(); void stopPacking(); void setRenderMode(OdGsView::RenderMode mode); void setModelToEye(const OdGeMatrix3d* model2Eye); OdSrTextureTransform getRasterImageTransform(OdInt32 rasterWidth, OdInt32 rasterHeight, const OdGePoint3d& rasterOrigin, const OdGeVector3d& rasterU, const OdGeVector3d& rasterV); bool m_drawClipBuffer; private: OdSrMetafilePackager* m_pPackager; OdGsSrVectorizeView* m_vecView = nullptr; const OdGeMatrix3d* model2EyeWhenVectorizing = nullptr; OdSmartPtr m_pMetafile; ODCOLORREF m_color; OdDb::LineWeight m_lineweight; int m_lineweightPixels; OdGiFillType m_fillType; bool bLineweightOverrideInitialized; }; #include "TD_PackPop.h" #endif // OD_GI_SR_GEOMETRY