/////////////////////////////////////////////////////////////////////////////// // 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 _DAI_MODEL_PROCESSOR_H #define _DAI_MODEL_PROCESSOR_H #include "daiApplicationInstance.h" #include "TD_PackPush.h" namespace OdDAI { namespace ModelOps { /** \details Base class that contains items of entity processing and set of target attributes. */ class ModelCtx { public: /** \details Default destructor for the ModelCtx class. */ virtual ~ModelCtx(){}; /** \details Assigns target model of processable entities. \param model [in] Pointer to the model that is target for processable entities (if target one isn't the same as source). */ virtual void setTargetModel(const OdDAI::ModelPtr model) { m_targetModel = model; } /** \details Returns target model of processable entities. \returns pointer to OdDAI::Model of current context. */ virtual OdDAI::ModelPtr getTargetModel() { return m_targetModel; }; /** \details Sets new placement of entity/entities in the model. \param targetPoint [in] OdGePoint3d of new location in WCS. */ virtual void setLocation(const OdGePoint3d& targetPoint) = 0; /** \details Sets new offset of entity/entities in the model. \param targetOffset [in] OdGePoint3d that represents offset values per axis. */ virtual void setOffset(const OdGePoint3d& targetOffset) = 0; /** \details Sets new X axis direction component of entity/entities in the model. \param refDirVector [in] OdGeVector3d of new orientation placement X axis direction. */ virtual void setRotationRefDirection(const OdGeVector3d& refDirVector) = 0; /** \details Sets new Z axis direction component of entity/entities in the model. \param axisVector [in] OdGeVector3d of new orientation placement Z axis direction. */ virtual void setRotationAxis(const OdGeVector3d& axisVector) = 0; protected: OdDAI::ModelPtr m_targetModel; OdGePoint3d m_offsetValue; OdGePoint3d m_targetLocation; OdGeVector3d m_axis; OdGeVector3d m_refDirection; }; using ModelCtxPtr = std::shared_ptr; /** \details Base class that use ModelCtx for navigating and processing model entities. */ class DaiStrategy { public: /** \details Default constructor for the DaiStrategy class. */ DaiStrategy(){}; /** \details Default destructor for the ModelCtx class. */ virtual ~DaiStrategy(){}; /** \details Returns current strategy context of processable entities. \returns pointer to OdDAI::ModelOps::ModelCtx of strategy. */ virtual std::shared_ptr getContext() = 0; }; } } #include "TD_PackPop.h" #endif // _DAI_MODEL_PROCESSOR_H