/////////////////////////////////////////////////////////////////////////////// // 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 __TNW_LIGHTITEMWEB_H__ #define __TNW_LIGHTITEMWEB_H__ #include "NwLightItem.h" #include "NwLightWebState.h" class OdGePoint3d; class OdGeVector3d; class OdStreamBuf; /** \details This template class is a specialization of the OdSmartPtr class for OdStreamBuf object pointers. */ typedef OdSmartPtr OdStreamBufPtr; /** \details This class represents light saved item which provide real-world light distribution. */ class NWDBEXPORT OdNwLightItemWeb : public OdNwLightItem { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwLightItemWeb); //DOM-IGNORE-END public: /** \details Default constructor. Creates an object of the OdNwLightItemWeb class. */ OdNwLightItemWeb(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwLightItemWeb(); public: /** \details Returns the rotational offset of the web about the optical X, Y and Z axis. \returns Returns OdGeVector3d with web rotation. */ OdGeVector3d getRotationOffset() const; /** \details Return current status of web light state. \returns NwLightWebState::Enum with web light state. \remarks The return type must be one of the following: Name Value Description NwLightWebState::kWebAsSpot 0 Web light doesn't has web file and work as spot light. NwLightWebState::kWebFileEmbedded 1 Web light has embedded .ies file. NwLightWebState::kWebFileExternal 2 Web light has external .ies file.
*/ NwLightWebState::Enum getWebState() const; /** \details Returns string with absolute path to external file describing the intensity distribution of the light. \returns OdString value with path to external IES file. \remarks The return empty string if light web state is not NwLightWebState::kWebFileExternal. */ OdString getWebFileExternal() const; /** \details Returns data file describing the intensity distribution of the light. \returns Smart pointer to the OdStreamBuf object with photometric data in the IES format. \remarks The return empty smart pointer if light web state is not NwLightWebState::kWebFileEmbedded. */ OdStreamBufPtr getWebFileEmbedded() const; /** \details Returns the position of the light. \returns Returns an OdGePoint3d value with the light position. */ OdGePoint3d getPosition() const; /** \details Returns the target of the light. \returns Returns an OdGePoint3d value with the light target. */ OdGePoint3d getTarget() const; /** \details Returns the flag is spot light targeted. \returns Returns true if it is targeted web light, or false if it is free web light. */ bool isTargeted() const; /** \details Returns the angle of the brightest cone of light. \returns Returns an double value with hot spot angle of this light. \remarks This method is work only for web light in spot state. */ double getHotSpotAngle() const; /** \details Returns the outer extremity of the light, where it meets the darkness. \returns Returns an double value with fall off angle of this light. \remarks This method is work only for web light in spot state. */ double getFallOffAngle() const; public: /** \details Sets the rotational offset of the web about the optical X, Y and Z axis. \param offset [in] constant reference to vector with web rotation offset. \returns eOk if the light's rotation offset sets is successfully, or an appropriate error code otherwise. */ OdResult setRotationOffset(const OdGeVector3d& offset); /** \details Sets absolute path to external file describing the intensity distribution of the light. \param sIesPath [in] string value with full path to .ies file. \returns eOk if the light's path to ies file sets is successfully, or an appropriate error code otherwise. */ OdResult setWebFile(const OdString& sIesPath); /** \details Sets the position of the light. \param ptPosition [in] constant reference to point with light's position. \returns eOk if the light's position sets is successfully, or an appropriate error code otherwise. */ OdResult setPosition(const OdGePoint3d& ptPosition); /** \details Sets the target of the light. \param ptTarget [in] constant reference to point with light's target. \returns eOk if the light's target sets is successfully, or an appropriate error code otherwise. */ OdResult setTarget(const OdGePoint3d& ptTarget); /** \details Sets the flag is spot light targeted. \param isTargeted [in] boolean value of light's targeting status. \returns eOk if the light's targeted status is successfully, or an appropriate error code otherwise. */ OdResult setTargeted(bool isTargeted); }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwLightItemWeb object pointers. */ typedef OdSmartPtr OdNwLightItemWebPtr; #endif //__TNW_SAVEDVIEWWEB_H__