X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketcherPrs%2FSketcherPrs_Parallel.h;h=83ff20bb85e3683d0c480dde1b37e22dda256e85;hb=4f565b2204d3fba046aa8c851abada2a5a17bf6c;hp=5e39abb8f9ce7e5ae8903e138a4daade630c9b5d;hpb=694482299ca580d780c221cc6a3e7574e59fd2c3;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_Parallel.h b/src/SketcherPrs/SketcherPrs_Parallel.h index 5e39abb8f..83ff20bb8 100644 --- a/src/SketcherPrs/SketcherPrs_Parallel.h +++ b/src/SketcherPrs/SketcherPrs_Parallel.h @@ -7,50 +7,41 @@ #ifndef SketcherPrs_Parallel_H #define SketcherPrs_Parallel_H -#include -#include +#include "SketcherPrs_SymbolPrs.h" -#include -#include -#include -#include -class SketchPlugin_Constraint; -class SketchPlugin_Sketch; - - -DEFINE_STANDARD_HANDLE(SketcherPrs_Parallel, AIS_InteractiveObject) +DEFINE_STANDARD_HANDLE(SketcherPrs_Parallel, SketcherPrs_SymbolPrs) /** * \ingroup GUI * A redefinition of standard AIS Interactive Object in order to provide -* presentation of coincident constraint +* presentation of parallel constraint */ -class SketcherPrs_Parallel: public AIS_InteractiveObject +class SketcherPrs_Parallel: public SketcherPrs_SymbolPrs { public: /// Constructor - /// \param theResult a result object - Standard_EXPORT SketcherPrs_Parallel(SketchPlugin_Constraint* theConstraint, + /// \param theConstraint a constraint feature + /// \param thePlane a coordinate plane of current sketch + Standard_EXPORT SketcherPrs_Parallel(ModelAPI_Feature* theConstraint, const std::shared_ptr& thePlane); + DEFINE_STANDARD_RTTIEXT(SketcherPrs_Parallel, SketcherPrs_SymbolPrs) + /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation + /// \param theConstraint a constraint feature + /// \param thePlane a coordinate plane of current sketch + /// \return boolean result value + static bool IsReadyToDisplay(ModelAPI_Feature* theConstraint, + const std::shared_ptr& thePlane); - DEFINE_STANDARD_RTTI(SketcherPrs_Parallel) protected: - /// Redefinition of virtual function - Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager, - const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0); - - /// Redefinition of virtual function - Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) ; + virtual const char* iconName() const { return "parallel.png"; } -private: + virtual void drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const; - SketchPlugin_Constraint* myConstraint; - std::shared_ptr myPlane; - Handle(Graphic3d_AspectMarker3d) myAspect; - Handle(Graphic3d_ArrayOfPoints) myPntArray; + /// Update myPntArray according to presentation positions + /// \return true in case of success + virtual bool updateIfReadyToDisplay(double theStep) const; }; #endif \ No newline at end of file