/////////////////////////////////////////////////////////////////////////////// // 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_LIGHTITEMSPOT_H__ #define __TNW_LIGHTITEMSPOT_H__ #include "NwLightItem.h" class OdGePoint3d; /** \details This class represents light saved item which emits a directional cone of light. */ class NWDBEXPORT OdNwLightItemSpot : public OdNwLightItem { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwLightItemSpot); //DOM-IGNORE-END public: /** \details Default constructor. Creates an object of the OdNwLightItemSpot class. */ OdNwLightItemSpot(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwLightItemSpot(); public: /** \details Returns the angle of the brightest cone of light. \returns Returns an double value with hot spot angle of this light. */ 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. */ double getFallOffAngle() 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 spot light is targeted, or false when it's free spot light. */ bool isTargeted() const; public: /** \details Sets the angle of the brightest cone of light. \param angle [in] double value with hot spot angle. \returns eOk if the light's angle sets is successfully, or an appropriate error code otherwise. The angle value must be in radian, greater than zero and less than fall off angle. */ OdResult setHotSpotAngle(double angle); /** \details Sets the outer extremity of the light, where it meets the darkness. \param angle [in] double value with fall off angle. \returns eOk if the light's angle sets is successfully, or an appropriate error code otherwise. The angle value must be in radian, less or equal to 160 degree angle and greater than hot spot angle. */ OdResult setFallOffAngle(double angle); /** \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 OdNwLightItemSpot object pointers. */ typedef OdSmartPtr OdNwLightItemSpotPtr; #endif //__TNW_SAVEDVIEWSPOT_H__