0024420: Add methods to switch the type of sensitivity in AIS_Circle and AIS_Plane
[occt.git] / src / AIS / AIS_DiameterDimension.hxx
CommitLineData
a6eb515f 1// Copyright (c) 1995-1999 Matra Datavision
2// Copyright (c) 1999-2012 OPEN CASCADE SAS
3//
4// The content of this file is subject to the Open CASCADE Technology Public
5// License Version 6.5 (the "License"). You may not use the content of this file
6// except in compliance with the License. Please obtain a copy of the License
7// at http://www.opencascade.org and read it completely before using this file.
8//
9// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11//
12// The Original Code and all software distributed under the License is
13// distributed on an "AS IS" basis, without warranty of any kind, and the
14// Initial Developer hereby disclaims all such warranties, including without
15// limitation, any warranties of merchantability, fitness for a particular
16// purpose or non-infringement. Please see the License for the specific terms
17// and conditions governing the rights and limitations under the License.
18#ifndef _AIS_DiameterDimension_HeaderFile
19#define _AIS_DiameterDimension_HeaderFile
20
21#include <AIS.hxx>
22#include <AIS_Dimension.hxx>
23#include <gp_Pnt.hxx>
24#include <gp_Circ.hxx>
25#include <Standard.hxx>
26#include <Standard_Macro.hxx>
27#include <Standard_DefineHandle.hxx>
28
29DEFINE_STANDARD_HANDLE(AIS_DiameterDimension,AIS_Dimension)
30
31//! A framework to display diameter dimensions. <br>
32//! A diameter is displayed with arrows and text. The <br>
33//! text gives the length of the diameter. <br>
34//! The algorithm takes a length along a face and <br>
35//! analyzes it as an arc. It then reconstructs the circle <br>
36//! corresponding to the arc and calculates the <br>
37//! diameter of this circle. This diameter serves as a <br>
38//! relational reference in 3d presentations of the surface. <br>
39class AIS_DiameterDimension : public AIS_Dimension
40{
41public:
42 //! Constructs a diameter display object defined by the <br>
43 //! circle <theCircle>
44 Standard_EXPORT AIS_DiameterDimension(const gp_Circ& theCircle);
45 //! Consctructor that allows to set a attach point <br>
46 //! on the circle <theCircle> where to attach dimension
47 Standard_EXPORT AIS_DiameterDimension (const gp_Circ& theCircle,
48 const gp_Pnt& theAttachPoint);
49
a6eb515f 50 Standard_EXPORT AIS_DiameterDimension (const TopoDS_Shape& theShape);
51
a6eb515f 52 DEFINE_STANDARD_RTTI(AIS_DiameterDimension)
53
54protected:
55
d7bffd44 56 Standard_EXPORT virtual void computeValue();
57
a6eb515f 58 //! Fills default plane object if it is possible to count plane automatically.
d7bffd44 59 Standard_EXPORT virtual void countDefaultPlane();
a6eb515f 60
61private:
62
63 virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
64 const Handle(Prs3d_Presentation)& thePresentation,
65 const Standard_Integer theMode = 0);
66
67// Fields
d7bffd44 68private:
a6eb515f 69
a6eb515f 70 gp_Circ myCircle;
71};
72#endif