/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2024, 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-2024 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #pragma once #include "DbEvalGraph.h" #include "DbBlockParameter.h" #include "DbBlockElement.h" #include "DbBlockFlipParameter.h" #include "DbBlockLookUpParameter.h" /** \details Base class for the dynamic block grip point representation */ class DYNBLOCKS_EXPORT OdDbBlockGrip : public OdDbBlockElement { public: ODDB_EVAL_DECLARE_MEMBERS(OdDbBlockGrip); OdDbBlockGrip(); /** \details * Returns the flag indicating if the grip participates in the grip cycling when inserting the block */ bool insertionCycling() const; /** \details * Sets the flag indicating if the grip participates in the grip cycling when inserting the block */ void setInsertionCycling(bool); /** \details * Returns the weight of the grip defining ordering in cycling when inserting the block */ OdInt32 insertionCyclingWeight() const; /** \details * Sets the weight of the grip defining ordering in cycling when inserting the block */ void setInsertionCyclingWeight(OdInt32); /** \details * Returns the grip location (depends on the actual parameter position) */ OdGePoint3d location() const; /** \details * Returns the grip location for display */ OdGePoint3d displayLocation() const; /** \details * Sets the grip location for display */ void setDisplayLocation(class OdGePoint3d const&); /** \details * Returns the grip offset from the parameter base point (by default is the same as definitionGripOffset, but may be overloaded) */ OdGeVector3d gripOffset(); /** \details * Returns the grip offset from the parameter base point */ OdGeVector3d definitionGripOffset() const; /** \details * Returns the grip updated location */ OdGePoint3d updatedLocation(); /** \details * Sets the grip updated location */ void setUpdatedLocation(class OdGePoint3d const&); /** \details * Returns the associated parameter for this grip */ OdDbBlockParameterPtr getAssociatedParameter(OdDb::OpenMode mode = OdDb::kForRead) const; /** \details * Returns the associated parameter base point for this grip */ OdGePoint3d paramBasePoint() const; /** \details * Returns the associated parameter component for this grip */ OdDbBlockParameter::ParameterComponent getAssociatedParameterComponent() const; protected: void addedToGraph(OdDbEvalGraph*) override; void removedFromGraph(OdDbEvalGraph*) override; void graphEvalEnd(bool active) override; }; typedef OdSmartPtr OdDbBlockGripPtr;