/////////////////////////////////////////////////////////////////////////////// // 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_DB_LIGHTIES__ #define __OD_DB_LIGHTIES__ #include "TD_PackPush.h" #include "OdIesnaFile.h" class OdLightIes : public OdIesnaFile { public: ODRX_HEAP_OPERATORS(); OdLightIes(); ~OdLightIes() override; void buildInternalRepresentation(double *vertAngles, OdInt32 numVertAngles, double *horzAngles, OdInt32 numHorzAngles, double **candelaDistribution, double lumensLamp, double multiplier, OdGiWebLightTraits::WebFileType fileType); void render(OdGiGeometry *pWD, double scale, OdInt32 interpolation = 0) const override; double *vertAngles() const override; OdInt32 numVertAngles() const override; double *horzAngles() const override; OdInt32 numHorzAngles() const override; double **candelaDistribution() const override; double maxCandela() const override; OdGiWebLightTraits::WebFileType fileType() const override; OdGiWebLightTraits::WebSymmetry fileSymmetry() const override; bool isHorzAng90To270() const override; double getLumensLamp() const override; double getMultiplier() const override; double getValue(double theta, double phi) const override; double getValue_ipl(double theta, double phi) const override; bool load(const OdChar *pFileName, OdDbBaseHostAppServices *pSvcs, OdDbBaseDatabase *pDb = nullptr); bool load(OdStreamBufPtr& pStreamBuf, OdDbBaseHostAppServices* pSvcs, OdDbBaseDatabase* pDb = nullptr); OdIesnaLoaderPtr m_pLockMe; private: double *_vertAngles; OdInt32 _numVertAngles; double *_horzAngles; OdInt32 _numHorzAngles; double **_candelaDistribution; double _maxCandela; OdGiWebLightTraits::WebFileType _fileType; OdGiWebLightTraits::WebSymmetry _symmetryType; bool _horzAng90To270; double _lumensLamp; double _multiplier; void drawCandelaDistribution(OdGiGeometry *pWD, double scale) const; void drawCandelaDistribution_ipl(OdGiGeometry *pWD, double scale, int level) const; }; class OdLightIesModule : public OdIesnaLoader { public: ODRX_HEAP_OPERATORS(); OdLightIesModule(); ~OdLightIesModule() override; OdIesnaFilePtr load(const OdChar *pFileName, OdDbBaseHostAppServices *pSvcs, OdDbBaseDatabase *pDb = nullptr) override; OdIesnaFilePtr load(OdStreamBufPtr& pStreamBuf, OdDbBaseHostAppServices* pSvcs, OdDbBaseDatabase* pDb = nullptr) override; void initApp() override; void uninitApp() override; }; #include "TD_PackPop.h" #endif // __OD_DB_LIGHTIES__