/////////////////////////////////////////////////////////////////////////////// // 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. /////////////////////////////////////////////////////////////////////////////// #pragma once #include #include "TD_PackPush.h" class ShellDrawable : public OdGiDrawableImpl { public: ShellDrawable(const OdGiSubEntityTraitsData& traits, OdGsBaseVectorizer& vect, OdInt32 numVertices, const OdGePoint3d* vertexList, OdInt32 faceListSize, const OdInt32* faceList, const OdGiEdgeData* pEdgeData, const OdGiFaceData* pFaceData, const OdGiVertexData* pVertexData) : m_numVertices(numVertices), m_vertexList(vertexList), m_faceListSize(faceListSize), m_faceList(faceList), m_pEdgeData(pEdgeData), m_pFaceData(pFaceData), m_pVertexData(pVertexData), m_traits(traits) { if (vect.view().userGiContext()->isPlotGeneration() && vect.view().userGiContext()->plotStyleType() != OdGiContext::kPsNone) { const OdPsPlotStyleData& ps = vect.effectivePlotStyle(); if (ps.color().isByColor()) m_traits.setTrueColor(ps.color()); else m_traits.setColor(ps.color().colorIndex()); } } OdInt32 numVertices() const { return m_numVertices; } const OdGePoint3d* vertexList() const { return m_vertexList; } OdInt32 faceListSize() const { return m_faceListSize; } const OdInt32* faceList() const { return m_faceList; } const OdGiEdgeData* edgeData() const { return m_pEdgeData; } const OdGiFaceData* faceData() const { return m_pFaceData; } private: OdUInt32 subSetAttributes(OdGiDrawableTraits* traits) const override { return 0; } bool subWorldDraw(OdGiWorldDraw* wd) const override { wd->subEntityTraits().setTrueColor(m_traits.trueColor()); wd->subEntityTraits().setFillType(m_traits.fillType()); wd->geometry().shell(m_numVertices, m_vertexList, m_faceListSize, m_faceList, m_pEdgeData, m_pFaceData, m_pVertexData); return false; } OdInt32 m_numVertices; const OdGePoint3d* m_vertexList; OdInt32 m_faceListSize; const OdInt32* m_faceList; const OdGiEdgeData* m_pEdgeData; const OdGiFaceData* m_pFaceData; const OdGiVertexData* m_pVertexData; OdGiSubEntityTraitsData m_traits; }; #include "TD_PackPop.h"