Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:16:31

0001 // Created on: 1994-03-28
0002 // Created by: Remi LEQUETTE
0003 // Copyright (c) 1994-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 _DrawTrSurf_Point_HeaderFile
0018 #define _DrawTrSurf_Point_HeaderFile
0019 
0020 #include <gp_Pnt.hxx>
0021 #include <Draw_MarkerShape.hxx>
0022 #include <Draw_Color.hxx>
0023 #include <Draw_Drawable3D.hxx>
0024 #include <Draw_Interpretor.hxx>
0025 
0026 DEFINE_STANDARD_HANDLE(DrawTrSurf_Point, Draw_Drawable3D)
0027 
0028 //! A drawable point.
0029 class DrawTrSurf_Point : public Draw_Drawable3D
0030 {
0031   DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Point, Draw_Drawable3D)
0032   Draw_Drawable3D_FACTORY public :
0033 
0034       Standard_EXPORT
0035       DrawTrSurf_Point(const gp_Pnt& P, const Draw_MarkerShape Shape, const Draw_Color& Col);
0036 
0037   Standard_EXPORT DrawTrSurf_Point(const gp_Pnt2d&        P,
0038                                    const Draw_MarkerShape Shape,
0039                                    const Draw_Color&      Col);
0040 
0041   Standard_EXPORT virtual void DrawOn(Draw_Display& dis) const Standard_OVERRIDE;
0042 
0043   //! Is a 3D object. (Default True).
0044   Standard_EXPORT virtual Standard_Boolean Is3D() const Standard_OVERRIDE;
0045 
0046   gp_Pnt Point() const { return myPoint; }
0047 
0048   Standard_EXPORT void Point(const gp_Pnt& P);
0049 
0050   gp_Pnt2d Point2d() const { return gp_Pnt2d(myPoint.X(), myPoint.Y()); }
0051 
0052   Standard_EXPORT void Point2d(const gp_Pnt2d& P);
0053 
0054   void Color(const Draw_Color& theColor) { myColor = theColor; }
0055 
0056   Draw_Color Color() const { return myColor; }
0057 
0058   void Shape(const Draw_MarkerShape theS) { myShape = theS; }
0059 
0060   Draw_MarkerShape Shape() const { return myShape; }
0061 
0062   //! For variable copy.
0063   Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
0064 
0065   //! For variable dump.
0066   Standard_EXPORT virtual void Dump(Standard_OStream& S) const Standard_OVERRIDE;
0067 
0068   //! Save drawable into stream.
0069   Standard_EXPORT virtual void Save(Standard_OStream& theStream) const Standard_OVERRIDE;
0070 
0071   //! For variable whatis command.
0072   Standard_EXPORT virtual void Whatis(Draw_Interpretor& I) const Standard_OVERRIDE;
0073 
0074 private:
0075   gp_Pnt           myPoint;
0076   Standard_Boolean is3D;
0077   Draw_MarkerShape myShape;
0078   Draw_Color       myColor;
0079 };
0080 
0081 #endif // _DrawTrSurf_Point_HeaderFile