Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/AIS_Point.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1995-08-09
0002 // Created by: Arnaud BOUZY
0003 // Copyright (c) 1995-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _AIS_Point_HeaderFile
0018 #define _AIS_Point_HeaderFile
0019 
0020 #include <AIS_InteractiveObject.hxx>
0021 
0022 class Geom_Point;
0023 class TopoDS_Vertex;
0024 
0025 //! Constructs point datums to be used in construction of
0026 //! composite shapes. The datum is displayed as the plus marker +.
0027 class AIS_Point : public AIS_InteractiveObject
0028 {
0029   DEFINE_STANDARD_RTTIEXT(AIS_Point, AIS_InteractiveObject)
0030 public:
0031   //! Initializes the point aComponent from which the point
0032   //! datum will be built.
0033   Standard_EXPORT AIS_Point(const occ::handle<Geom_Point>& aComponent);
0034 
0035   //! Returns index 1, the default index for a point.
0036   int Signature() const override { return 1; }
0037 
0038   //! Indicates that a point is a datum.
0039   AIS_KindOfInteractive Type() const override { return AIS_KindOfInteractive_Datum; }
0040 
0041   //! Returns the component specified in SetComponent.
0042   Standard_EXPORT occ::handle<Geom_Point> Component();
0043 
0044   //! Constructs an instance of the point aComponent.
0045   Standard_EXPORT void SetComponent(const occ::handle<Geom_Point>& aComponent);
0046 
0047   //! Returns true if the display mode selected is valid for point datums.
0048   Standard_EXPORT bool AcceptDisplayMode(const int aMode) const override;
0049 
0050   //! Allows you to provide settings for the Color.
0051   Standard_EXPORT void SetColor(const Quantity_Color& theColor) override;
0052 
0053   //! Allows you to remove color settings.
0054   Standard_EXPORT void UnsetColor() override;
0055 
0056   //! Allows you to provide settings for a marker. These include
0057   //! -   type of marker,
0058   //! -   marker color,
0059   //! -   scale factor.
0060   Standard_EXPORT void SetMarker(const Aspect_TypeOfMarker aType);
0061 
0062   //! Removes the marker settings.
0063   Standard_EXPORT void UnsetMarker();
0064 
0065   //! Returns true if the point datum has a marker.
0066   bool HasMarker() const { return myHasTOM; }
0067 
0068   //! Converts a point into a vertex.
0069   Standard_EXPORT TopoDS_Vertex Vertex() const;
0070 
0071 protected:
0072   Standard_EXPORT void Compute(const occ::handle<PrsMgr_PresentationManager>& thePrsMgr,
0073                                const occ::handle<Prs3d_Presentation>&         thePrs,
0074                                const int                                      theMode) override;
0075 
0076 private:
0077   Standard_EXPORT void ComputeSelection(const occ::handle<SelectMgr_Selection>& aSelection,
0078                                         const int                               aMode) override;
0079 
0080   Standard_EXPORT void UpdatePointValues();
0081 
0082   //! Replace aspects of already computed groups with the new value.
0083   void replaceWithNewPointAspect(const occ::handle<Prs3d_PointAspect>& theAspect);
0084 
0085 private:
0086   occ::handle<Geom_Point> myComponent;
0087   bool                    myHasTOM;
0088   Aspect_TypeOfMarker     myTOM;
0089 };
0090 
0091 #endif // _AIS_Point_HeaderFile