0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / TopClass / TopClass_Intersection3d.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-03-30
2// Created by: Laurent BUCHARD
3// Copyright (c) 1994-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _TopClass_Intersection3d_HeaderFile
18#define _TopClass_Intersection3d_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Real.hxx>
25#include <Standard_Boolean.hxx>
26#include <TopAbs_State.hxx>
27class gp_Lin;
28class TopoDS_Face;
29class IntCurveSurface_IntersectionPoint;
30
31
32//! Template class for the intersection algorithm required
33//! by the 3D classifications.
34//!
35//! (a intersection point near the origin of the line, ie.
36//! at a distance less or equal than <tolerance>, will be
37//! returned even if it has a negative parameter.)
38class TopClass_Intersection3d
39{
40public:
41
42 DEFINE_STANDARD_ALLOC
43
44
45 //! Perform the intersection between the
46 //! segment L(0) ... L(Prm) and the Face <Face>.
47 //!
48 //! Only the point with the smallest parameter on the
49 //! line is returned.
50 //!
51 //! The Tolerance <Tol> is used to determine if the
52 //! first point of the segment is near the face. In
53 //! that case, the parameter of the intersection point
54 //! on the line can be a negative value (greater than -Tol).
55 Standard_EXPORT virtual void Perform (const gp_Lin& L, const Standard_Real Prm, const Standard_Real Tol, const TopoDS_Face& Face) = 0;
56
57 //! True is returned when the intersection have been computed.
58 Standard_EXPORT virtual Standard_Boolean IsDone() const = 0;
59
60 //! True is returned if a point has been found.
61 Standard_EXPORT virtual Standard_Boolean HasAPoint() const = 0;
62
63 //! Returns the Intersection Point.
64 Standard_EXPORT virtual const IntCurveSurface_IntersectionPoint& Point() const = 0;
65
66 //! Returns the state of the point on the face.
67 //! The values can be either TopAbs_IN
68 //! ( the point is in the face)
69 //! or TopAbs_ON
70 //! ( the point is on a boudary of the face).
71 Standard_EXPORT virtual TopAbs_State State() const = 0;
72
73
74
75
76protected:
77
78
79 //! Empty constructor.
80 Standard_EXPORT TopClass_Intersection3d();
81
82
83
84
85private:
86
87
88
89
90
91};
92
93
94
95
96
97
98
99#endif // _TopClass_Intersection3d_HeaderFile