Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:25

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