Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/BRepClass_FacePassiveClassifier.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: 1992-11-18
0002 // Created by: Remi LEQUETTE
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 _BRepClass_FacePassiveClassifier_HeaderFile
0018 #define _BRepClass_FacePassiveClassifier_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <gp_Lin2d.hxx>
0024 #include <TopTrans_CurveTransition.hxx>
0025 #include <BRepClass_Intersector.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <TopAbs_State.hxx>
0028 #include <TopAbs_Orientation.hxx>
0029 class Standard_DomainError;
0030 class BRepClass_Edge;
0031 class BRepClass_Intersector;
0032 class gp_Lin2d;
0033 
0034 class BRepClass_FacePassiveClassifier
0035 {
0036 public:
0037   DEFINE_STANDARD_ALLOC
0038 
0039   //! Creates an undefined classifier.
0040   Standard_EXPORT BRepClass_FacePassiveClassifier();
0041 
0042   //! Starts a classification process. The point to
0043   //! classify is the origin of the line <L>. <P> is
0044   //! the original length of the segment on <L> used to
0045   //! compute intersections. <Tol> is the tolerance
0046   //! attached to the line segment in intersections.
0047   Standard_EXPORT void Reset(const gp_Lin2d& L, const double P, const double Tol);
0048 
0049   //! Updates the classification process with the edge
0050   //! <E> from the boundary.
0051   Standard_EXPORT void Compare(const BRepClass_Edge& E, const TopAbs_Orientation Or);
0052 
0053   //! Returns the current value of the parameter.
0054   double Parameter() const { return myParam; }
0055 
0056   //! Returns the intersecting algorithm.
0057   BRepClass_Intersector& Intersector() { return myIntersector; }
0058 
0059   //! Returns 0 if the last compared edge had no
0060   //! relevant intersection. Else returns the index of
0061   //! this intersection in the last intersection
0062   //! algorithm.
0063   int ClosestIntersection() const { return myClosest; }
0064 
0065   //! Returns the current state of the point.
0066   TopAbs_State State() const { return myState; }
0067 
0068   //! Returns the true if the closest intersection point
0069   //! represents head or end of the edge. Returns false
0070   //! otherwise.
0071   bool IsHeadOrEnd() const { return myIsHeadOrEnd; }
0072 
0073 private:
0074   bool                     myIsSet;
0075   bool                     myFirstCompare;
0076   bool                     myFirstTrans;
0077   gp_Lin2d                 myLin;
0078   double                   myParam;
0079   double                   myTolerance;
0080   TopTrans_CurveTransition myTrans;
0081   BRepClass_Intersector    myIntersector;
0082   int                      myClosest;
0083   TopAbs_State             myState;
0084   bool                     myIsHeadOrEnd;
0085 };
0086 
0087 #endif // _BRepClass_FacePassiveClassifier_HeaderFile