0027756: Visualization - add Draw() method taking Graphic3d_Group to tools Prs3d_Arro...
[occt.git] / src / AIS / AIS_Point.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-08-09
2// Created by: Arnaud BOUZY
3// Copyright (c) 1995-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 _AIS_Point_HeaderFile
18#define _AIS_Point_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Boolean.hxx>
24#include <Aspect_TypeOfMarker.hxx>
25#include <AIS_InteractiveObject.hxx>
26#include <Standard_Integer.hxx>
27#include <AIS_KindOfInteractive.hxx>
28#include <PrsMgr_PresentationManager3d.hxx>
29#include <SelectMgr_Selection.hxx>
30#include <Quantity_NameOfColor.hxx>
31class Geom_Point;
32class Prs3d_Presentation;
33class Prs3d_Projector;
34class Geom_Transformation;
35class Quantity_Color;
36class TopoDS_Vertex;
37
38
39class AIS_Point;
40DEFINE_STANDARD_HANDLE(AIS_Point, AIS_InteractiveObject)
41
42//! Constructs point datums to be used in construction of
43//! composite shapes. The datum is displayed as the plus marker +.
44class AIS_Point : public AIS_InteractiveObject
45{
46
47public:
48
49
50
51 //! Initializes the point aComponent from which the point
52 //! datum will be built.
53 Standard_EXPORT AIS_Point(const Handle(Geom_Point)& aComponent);
54
55 //! Returns index 1, the default index for a point.
56 virtual Standard_Integer Signature() const Standard_OVERRIDE;
57
58 //! Indicates that a point is a datum.
59 virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE;
60
61 //! Returns the component specified in SetComponent.
62 Standard_EXPORT Handle(Geom_Point) Component();
63
64 //! Constructs an instance of the point aComponent.
65 Standard_EXPORT void SetComponent (const Handle(Geom_Point)& aComponent);
66
67 //! Returns true if the display mode selected is valid for point datums.
68 Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE;
69
70 //! computes the presentation according to a point of view
71 //! given by <aProjector>.
72 //! To be Used when the associated degenerated Presentations
73 //! have been transformed by <aTrsf> which is not a Pure
74 //! Translation. The HLR Prs can't be deducted automatically
75 //! WARNING :<aTrsf> must be applied
76 //! to the object to display before computation !!!
77 Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
78
79 //! Allows you to provide settings for the cp;pr aColor.
80 Standard_EXPORT void SetColor (const Quantity_NameOfColor aColor) Standard_OVERRIDE;
81
82 Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE;
83
84 //! Allows you to remove color settings.
85 Standard_EXPORT void UnsetColor() Standard_OVERRIDE;
86
87 //! Allows you to provide settings for a marker. These include
88 //! - type of marker,
89 //! - marker color,
90 //! - scale factor.
91 Standard_EXPORT void SetMarker (const Aspect_TypeOfMarker aType);
92
93 //! Removes the marker settings.
94 Standard_EXPORT void UnsetMarker();
95
96 //! Returns true if the point datum has a marker.
97 Standard_Boolean HasMarker() const;
98
99 //! Converts a point into a vertex.
100 Standard_EXPORT TopoDS_Vertex Vertex() const;
101
102
103
104
92efcf78 105 DEFINE_STANDARD_RTTIEXT(AIS_Point,AIS_InteractiveObject)
42cf5bc1 106
107protected:
108
109
110 Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
111
112
113
114private:
115
116
117 Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
118
79104795 119 Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
42cf5bc1 120
121 Standard_EXPORT void UpdatePointValues();
122
123 Handle(Geom_Point) myComponent;
124 Standard_Boolean myHasTOM;
125 Aspect_TypeOfMarker myTOM;
126
127
128};
129
130
131#include <AIS_Point.lxx>
132
133
134
135
136
137#endif // _AIS_Point_HeaderFile