Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1992-08-21
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1992-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 _HLRBRep_BiPnt2D_HeaderFile
0018 #define _HLRBRep_BiPnt2D_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <gp_Pnt2d.hxx>
0024 #include <TopoDS_Shape.hxx>
0025 
0026 //! Contains the colors of a shape.
0027 class HLRBRep_BiPnt2D 
0028 {
0029 public:
0030 
0031   DEFINE_STANDARD_ALLOC
0032 
0033   HLRBRep_BiPnt2D()
0034   : myRg1Line (false),
0035     myRgNLine (false),
0036     myOutLine (false),
0037     myIntLine (false)
0038   {
0039   }
0040 
0041   HLRBRep_BiPnt2D(const Standard_Real x1, const Standard_Real y1, const Standard_Real x2, const Standard_Real y2, const TopoDS_Shape& S, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl)
0042   : myP1(x1,y1),
0043       myP2(x2,y2),
0044       myShape(S),
0045     myRg1Line (reg1),
0046     myRgNLine (regn),
0047     myOutLine (outl),
0048     myIntLine (intl)
0049   {
0050   }
0051 
0052   HLRBRep_BiPnt2D(
0053       const gp_XY& thePoint1,
0054       const gp_XY& thePoint2,
0055       const TopoDS_Shape& S,
0056       const Standard_Boolean reg1,
0057       const Standard_Boolean regn,
0058       const Standard_Boolean outl,
0059       const Standard_Boolean intl) :
0060     myP1(thePoint1),
0061     myP2(thePoint2),
0062     myShape(S),
0063     myRg1Line (reg1),
0064     myRgNLine (regn),
0065     myOutLine (outl),
0066     myIntLine (intl)
0067   {
0068   }
0069 
0070   const gp_Pnt2d& P1() const { return myP1; }
0071 
0072   const gp_Pnt2d& P2() const { return myP2; }
0073 
0074   const TopoDS_Shape& Shape() const { return myShape; }
0075 
0076   void Shape (const TopoDS_Shape& S) { myShape = S; }
0077 
0078   Standard_Boolean Rg1Line() const { return myRg1Line; }
0079 
0080   void Rg1Line (const Standard_Boolean B) { myRg1Line = B; }
0081 
0082   Standard_Boolean RgNLine() const { return myRgNLine; }
0083 
0084   void RgNLine (const Standard_Boolean B) { myRgNLine = B; }
0085 
0086   Standard_Boolean OutLine() const { return myOutLine; }
0087 
0088   void OutLine (const Standard_Boolean B) { myOutLine = B; }
0089 
0090   Standard_Boolean IntLine() const { return myIntLine; }
0091 
0092   void IntLine (const Standard_Boolean B) { myIntLine = B; }
0093 
0094 private:
0095 
0096   gp_Pnt2d myP1;
0097   gp_Pnt2d myP2;
0098   TopoDS_Shape myShape;
0099   Standard_Boolean myRg1Line;
0100   Standard_Boolean myRgNLine;
0101   Standard_Boolean myOutLine;
0102   Standard_Boolean myIntLine;
0103 };
0104 
0105 #endif // _HLRBRep_BiPnt2D_HeaderFile