mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0028990: Coding Rules - deprecate redundant class Prs3d_Root
Prs3d_Root usage has been replaced by direct calls to Prs3d_Presentation methods.
This commit is contained in:
@@ -17,19 +17,19 @@
|
||||
#ifndef _Prs3d_Arrow_HeaderFile
|
||||
#define _Prs3d_Arrow_HeaderFile
|
||||
|
||||
#include <Prs3d_Root.hxx>
|
||||
|
||||
#include <Graphic3d_ArrayOfTriangles.hxx>
|
||||
#include <Graphic3d_ArrayOfSegments.hxx>
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class gp_Ax1;
|
||||
class gp_Pnt;
|
||||
class gp_Dir;
|
||||
|
||||
//! Provides class methods to draw an arrow at a given location, along a given direction and using a given angle.
|
||||
class Prs3d_Arrow : public Prs3d_Root
|
||||
class Prs3d_Arrow
|
||||
{
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! Defines the representation of the arrow as shaded triangulation.
|
||||
//! @param theAxis axis definition (arrow origin and direction)
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
const Standard_Real theAngle,
|
||||
const Standard_Real theLength)
|
||||
{
|
||||
Draw (Prs3d_Root::CurrentGroup (thePrs), theLocation, theDirection, theAngle, theLength);
|
||||
Draw (thePrs->CurrentGroup(), theLocation, theDirection, theAngle, theLength);
|
||||
}
|
||||
|
||||
};
|
||||
|
@@ -27,7 +27,7 @@ void Prs3d_BndBox::Add (const Handle(Prs3d_Presentation)& thePresentation,
|
||||
{
|
||||
if (!theBndBox.IsVoid())
|
||||
{
|
||||
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation);
|
||||
Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
|
||||
aGroup->SetGroupPrimitivesAspect (new Graphic3d_AspectLine3d (theDrawer->LineAspect()->Aspect()->Color(),
|
||||
Aspect_TOL_DOTDASH,
|
||||
theDrawer->LineAspect()->Aspect()->Width()));
|
||||
@@ -45,7 +45,7 @@ void Prs3d_BndBox::Add (const Handle(Prs3d_Presentation)& thePresentation,
|
||||
{
|
||||
if (!theBndBox.IsVoid())
|
||||
{
|
||||
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation);
|
||||
Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
|
||||
aGroup->SetGroupPrimitivesAspect (new Graphic3d_AspectLine3d (theDrawer->LineAspect()->Aspect()->Color(),
|
||||
Aspect_TOL_DOTDASH,
|
||||
theDrawer->LineAspect()->Aspect()->Width()));
|
||||
|
@@ -19,10 +19,9 @@
|
||||
#include <Graphic3d_Group.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_PointAspect.hxx>
|
||||
#include <Prs3d_Root.hxx>
|
||||
|
||||
template <class AnyPoint, class PointTool>
|
||||
class Prs3d_Point : Prs3d_Root
|
||||
class Prs3d_Point
|
||||
{
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
@@ -41,11 +40,11 @@ private:
|
||||
|
||||
public:
|
||||
Standard_EXPORT static void Add
|
||||
(const Handle (Prs3d_Presentation)& thePresentation,
|
||||
(const Handle (Prs3d_Presentation)& thePrs,
|
||||
const AnyPoint& thePoint,
|
||||
const Handle (Prs3d_Drawer)& theDrawer)
|
||||
{
|
||||
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePresentation);
|
||||
Handle(Graphic3d_Group) aGroup = thePrs->CurrentGroup();
|
||||
aGroup->SetPrimitivesAspect(theDrawer->PointAspect()->Aspect());
|
||||
DrawPoint(thePoint, aGroup);
|
||||
}
|
||||
|
@@ -30,15 +30,13 @@ public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! Returns the current (last created) group of primititves inside graphic objects in the display.
|
||||
//! A group also contains the attributes whose ranges are limited to the primitives in it.
|
||||
Standard_DEPRECATED("This method is deprecated - Prs3d_Presentation::CurrentGroup() should be called instead")
|
||||
static Handle(Graphic3d_Group) CurrentGroup (const Handle(Prs3d_Presentation)& thePrs3d)
|
||||
{
|
||||
return thePrs3d->CurrentGroup();
|
||||
}
|
||||
|
||||
//! Returns the new group of primitives inside graphic objects in the display.
|
||||
//! A group also contains the attributes whose ranges are limited to the primitives in it.
|
||||
Standard_DEPRECATED("This method is deprecated - Prs3d_Presentation::NewGroup() should be called instead")
|
||||
static Handle(Graphic3d_Group) NewGroup (const Handle(Prs3d_Presentation)& thePrs3d)
|
||||
{
|
||||
return thePrs3d->NewGroup();
|
||||
|
@@ -17,17 +17,16 @@
|
||||
#ifndef _Prs3d_Text_HeaderFile
|
||||
#define _Prs3d_Text_HeaderFile
|
||||
|
||||
#include <Prs3d_Root.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_TextAspect.hxx>
|
||||
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
#include <Prs3d_TextAspect.hxx>
|
||||
|
||||
class TCollection_ExtendedString;
|
||||
class gp_Pnt;
|
||||
|
||||
//! A framework to define the display of texts.
|
||||
class Prs3d_Text : public Prs3d_Root
|
||||
class Prs3d_Text
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -64,7 +63,7 @@ public:
|
||||
const TCollection_ExtendedString& theText,
|
||||
const gp_Pnt& theAttachmentPoint)
|
||||
{
|
||||
Draw (Prs3d_Root::CurrentGroup (thePrs), theDrawer->TextAspect(), theText, theAttachmentPoint);
|
||||
Draw (thePrs->CurrentGroup(), theDrawer->TextAspect(), theText, theAttachmentPoint);
|
||||
}
|
||||
|
||||
//! Alias to another method Draw() for backward compatibility.
|
||||
@@ -75,7 +74,7 @@ public:
|
||||
const gp_Ax2& theOrientation,
|
||||
const Standard_Boolean theHasOwnAnchor = Standard_True)
|
||||
{
|
||||
Draw (Prs3d_Root::CurrentGroup (thePrs), theAspect, theText, theOrientation, theHasOwnAnchor);
|
||||
Draw (thePrs->CurrentGroup(), theAspect, theText, theOrientation, theHasOwnAnchor);
|
||||
}
|
||||
|
||||
//! Alias to another method Draw() for backward compatibility.
|
||||
@@ -85,7 +84,7 @@ public:
|
||||
const TCollection_ExtendedString& theText,
|
||||
const gp_Pnt& theAttachmentPoint)
|
||||
{
|
||||
Draw (Prs3d_Root::CurrentGroup (thePrs), theAspect, theText, theAttachmentPoint);
|
||||
Draw (thePrs->CurrentGroup(), theAspect, theText, theAttachmentPoint);
|
||||
}
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user