/////////////////////////////////////////////////////////////////////////////// // 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_CULLINGELEMENT_H__ #define __TNW_CULLINGELEMENT_H__ #include "NwObject.h" #include "RxSystemServices.h" #include "NwExport.h" #include "NwViewpointDistanceType.h" #include "NwBackfaceType.h" class OdNwColor; /** \details This class represents a culling element. */ class NWDBEXPORT OdNwCullingElement : public OdNwObject { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwCullingElement); //DOM-IGNORE-END public: /** \details Default constructor. Creates a new object of the OdNwCullingElement class. */ OdNwCullingElement(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwCullingElement(); public: /** \details Number of pixels below which objects are culled. \returns Number of pixels below which objectd are culled. \remarks The returned type must be in the range: 0..10000 where 0 means the option is switched off */ double getMinPixelsNum() const; /** \details Returns the distance type that should be used to cull objects near of the distance. \returns NwViewpointDistanceType::Enum value with the distance type. \remarks The returned type must be one of the following: Name Value Description NwViewpointDistanceType::AUTO 0 Automatic distance NwViewpointDistanceType::CONSTRAINED 1 Constrained distance NwViewpointDistanceType::FIXED 2 Fixed distance
Using fixed clipping planes can adversely affect system preformance and may produce unexpected results. Please use with care. */ NwViewpointDistanceType::Enum getNearDistanceType() const; /** \details A distance to the near cutting plane. \returns The value of distance to the near cutting plane. */ double getNearDistance() const; /** \details Returns the distance type that should be used to cull objects far of the distance. \returns NwViewpointDistanceType::Enum value with the distance type. \remarks The returned type must be one of the following: Name Value Description NwViewpointDistanceType::AUTO 0 Automatic distance NwViewpointDistanceType::CONSTRAINED 1 Constrained distance NwViewpointDistanceType::FIXED 2 Fixed distance
Using fixed clipping planes can adversely affect system preformance and may produce unexpected results. Please use with care. */ NwViewpointDistanceType::Enum getFarDistanceType() const; /** \details A distance to the far cutting plane. \returns The value of distance to the far cutting plane. */ double getFarDistance() const; /** \details Returns the backface culling type. \returns NwBackfaceType::Enum value with the backface type. \remarks The returned type must be one of the following: Name Value Description NwBackfaceType::OFF 0 Backface drawing is off NwBackfaceType::SOLID 1 Draw backface as solid NwBackfaceType::ON 2 Backface drawing is on
*/ NwBackfaceType::Enum getBackfaceType() const; /** \details Sets the minimum number of pixels below which objects are culled. \param dMinPxlNum [in] A double value representing the pixel threshold. \returns eOk if the pixel value is set successfully, or an appropriate error code otherwise. \remarks The pixel value must be within the range 0..10000. */ OdResult setMinPixelsNum(double dMinPxlNum); /** \details Sets the type of distance to be used for culling objects near the distance. \param nearDistType [in] The type of distance used for the near plane. \remarks The nearDistType must be one of the following: Name Value Description NwViewpointDistanceType::AUTO 0 Automatic distance NwViewpointDistanceType::CONSTRAINED 1 Constrained distance NwViewpointDistanceType::FIXED 2 Fixed distance
*/ void setNearDistanceType(NwViewpointDistanceType::Enum nearDistType); /** \details Sets the distance to the near cutting plane. \param dNear [in] The near distance value. */ void setNearDistance(double dNear); /** \details Sets the distance type to be used for culling objects beyond the far cutting plane. \param farDistType [in] The type of distance used for the far plane. \remarks The farDistType must be one of the following: Name Value Description NwViewpointDistanceType::AUTO 0 Automatic distance NwViewpointDistanceType::CONSTRAINED 1 Constrained distance NwViewpointDistanceType::FIXED 2 Fixed distance
*/ void setFarDistanceType(NwViewpointDistanceType::Enum farDistType); /** \details Sets the distance to the far cutting plane. \param dFar [in] The value specifying the far distance. */ void setFarDistance(double dFar); /** \details Sets the backface culling type. \param backFaceType [in] The type of backface culling to apply. \remarks The backFaceType must be one of the following: Name Value Description NwBackfaceType::OFF 0 Backface drawing is off NwBackfaceType::SOLID 1 Draw backface as solid NwBackfaceType::ON 2 Backface drawing is on
*/ void setBackfaceType(NwBackfaceType::Enum backFaceType); }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwCullingElement object pointers. */ typedef OdSmartPtr OdNwCullingElementPtr; #endif //__TNW_CULLINGELEMENT_H__