27 #ifndef GEOM_Annotation_HeaderFile
28 #define GEOM_Annotation_HeaderFile
30 #include <Basics_OCCTVersion.hxx>
32 #include <AIS_InteractiveObject.hxx>
33 #include <Bnd_Box.hxx>
34 #include <Font_FontAspect.hxx>
36 #include <NCollection_Handle.hxx>
37 #include <NCollection_String.hxx>
38 #include <OpenGl_Element.hxx>
39 #include <OpenGl_TextParam.hxx>
40 #include <Prs3d_Presentation.hxx>
41 #include <Prs3d_LineAspect.hxx>
42 #include <Prs3d_TextAspect.hxx>
43 #include <PrsMgr_PresentationManager3d.hxx>
44 #include <Select3D_SensitiveBox.hxx>
45 #include <SelectMgr_EntityOwner.hxx>
46 #include <StdSelect_Shape.hxx>
47 #include <TCollection_ExtendedString.hxx>
49 class OpenGl_GraphicDriver;
50 class OpenGl_PrimitiveArray;
83 Standard_EXPORT
void SetText(
const TCollection_ExtendedString& theText );
94 Standard_EXPORT
void SetPosition(
const gp_Pnt& thePosition );
136 Standard_EXPORT
virtual void SetColor(
const Quantity_Color& theColor ) Standard_OVERRIDE;
139 Standard_EXPORT
void SetTextColor(
const Quantity_Color& theColor );
142 Quantity_Color
GetTextColor()
const {
return myDrawer->TextAspect()->Aspect()->Color(); }
145 Standard_EXPORT
void SetLineColor(
const Quantity_Color& theColor);
148 Quantity_Color
GetLineColor()
const {
return myDrawer->LineAspect()->Aspect()->Color(); }
151 Standard_EXPORT
void SetLineWidth(
const Standard_Real theLineWidth );
154 Standard_Real
GetLineWidth()
const {
return myDrawer->LineAspect()->Aspect()->Width(); }
157 Standard_EXPORT
void SetLineStyle(
const Aspect_TypeOfLine theStyle );
160 Aspect_TypeOfLine
GetLineStyle()
const {
return myDrawer->LineAspect()->Aspect()->Type(); }
166 Aspect_TypeOfLine
GetHiddenLineStyle()
const {
return myDrawer->HiddenLineAspect()->Aspect()->Type(); }
169 Standard_EXPORT
void SetTextHeight(
const Standard_Real theHeight );
172 Standard_Real
GetTextHeight()
const {
return myDrawer->TextAspect()->Height(); }
175 Standard_EXPORT
void SetFontAspect(
const Font_FontAspect theFontAspect );
178 Font_FontAspect
GetFontAspect()
const {
return myDrawer->TextAspect()->Aspect()->GetTextFontAspect(); }
181 Standard_EXPORT
void SetFont(
const TCollection_AsciiString& theFont );
184 TCollection_AsciiString
GetFont()
const {
return myDrawer->TextAspect()->Aspect()->Font(); }
207 Standard_EXPORT
void SetDepthCulling(
const Standard_Boolean theToEnable );
224 Standard_EXPORT
static gp_Pnt
GetDefaultPosition(
const Standard_Boolean theIsScreenFixed,
225 const gp_Pnt& theAttachPnt,
226 const Standard_Real theOffset,
227 const Handle(V3d_View)& theView );
234 const gp_Pnt& theAttach,
235 const Handle(V3d_View)& theView );
242 const gp_Pnt& theAttach,
243 const Handle(V3d_View)& theView );
254 Standard_EXPORT
void Drag(
const Standard_Integer theDx,
255 const Standard_Integer theDy,
256 const Handle(V3d_View)& theView );
259 Standard_EXPORT
void EndDrag();
266 virtual void Compute(
const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
267 const Handle(Prs3d_Presentation)& thePresentation,
268 const Standard_Integer theMode = 0 ) Standard_OVERRIDE;
271 const Standard_Integer theMode ) Standard_OVERRIDE;
279 void SetPosition(
const gp_Pnt& thePosition,
const Standard_Boolean theUpdateSelection );
307 const Standard_Integer theTextHeight,
308 const OpenGl_GraphicDriver* theDriver );
314 virtual void Release( OpenGl_Context* theCtx ) Standard_OVERRIDE;
317 virtual void Render(
const Handle(OpenGl_Workspace)& theWorkspace )
const Standard_OVERRIDE;
355 const Handle(SelectMgr_SelectableObject)& theSelectable,
356 const Standard_Integer thePriority )
366 #
if OCC_VERSION_LARGE > 0x07010001
367 const Handle(Prs3d_Drawer)& theStyle,
369 const Handle(Graphic3d_HighlightStyle)& theStyle,
371 const Standard_Integer theMode = 0 ) Standard_OVERRIDE;
376 const Standard_Integer theMode = 0 ) Standard_OVERRIDE;
381 Clear ( const
Handle(PrsMgr_PresentationManager)& thePM,
382 const Standard_Integer theMode = 0 ) Standard_OVERRIDE;
387 Handle(StdSelect_Shape) myPrsSh;
398 const Bnd_Box& theBox,
399 const Standard_Boolean theIsDepthCulling )
400 : Select3D_SensitiveBox( theOwner, theBox ),
404 virtual Standard_Boolean Matches( SelectBasics_SelectingVolumeManager& theMgr,
405 SelectBasics_PickResult& thePickResult ) Standard_OVERRIDE
407 const Standard_Boolean isMatches = Select3D_SensitiveBox::Matches( theMgr, thePickResult );
410 thePickResult = SelectBasics_PickResult( -DBL_MAX, thePickResult.DistToGeomCenter() );