1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-21 10:13:43 +03:00

0031431: Visualization, PrsMgr_PresentableObject - simplify HLR computing interface

Multiple PrsMgr_PresentableObject::Compute() methods have been replaced by single one
PrsMgr_PresentableObject::computeHLR().
Dummy implementations of previously declared methods have been removed
from AIS classes not implementng HLR presentation.
Class Prs3d_Projector has been removed and Graphic3d_Camera is now passed directly,
so that redundant dependency from HLRAlgo_Projector in Prs3d interfaces has been eliminated.
StdPrs_HLRShape and StdPrs_HLRPolyShape now implement common interface StdPrs_HLRShapeI.
This commit is contained in:
kgv 2020-03-14 20:34:46 +03:00
parent 29263c947e
commit b5163d2f8d
90 changed files with 220 additions and 1248 deletions

View File

@ -1889,6 +1889,11 @@ Unexpected const-ness of Aspect_Window::DoResize() method has been removed, so t
Enumeration BRepOffset_Type is renamed to ChFiDS_TypeOfConcavity. Enumeration BRepOffset_Type is renamed to ChFiDS_TypeOfConcavity.
@subsection upgrade_750_hlrprs Changes in HLR presentation API
Methods computing HLR presentation within *PrsMgr_PresentableObject::Compute()* have been renamed to *PrsMgr_PresentableObject::computeHLR()*
and now accept *Graphic3d_Camera* object instead of removed *Prs3d_Projector*.
@subsection upgrade_750_sensitiveEntity Select3D_SensitiveEntity interface change @subsection upgrade_750_sensitiveEntity Select3D_SensitiveEntity interface change
The method Select3D_SensitiveEntity::NbSubElements() has been changed to be constant. Select3D_SensitiveEntity subclasses at application level should be updated accordingly. The method Select3D_SensitiveEntity::NbSubElements() has been changed to be constant. Select3D_SensitiveEntity subclasses at application level should be updated accordingly.

View File

@ -18,7 +18,6 @@ public:
private: private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
virtual void Compute(const Handle(Prs3d_Projector)& ,const Handle(Prs3d_Presentation)& ) {}
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {} virtual void ComputeSelection (const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
private: private:

View File

@ -104,12 +104,6 @@ void ISession_Direction::Compute (const Handle(PrsMgr_PresentationManager3d)& /*
} }
} }
void ISession_Direction::Compute (const Handle(Prs3d_Projector)& /*aProjector*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/)
{
}
void ISession_Direction::ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/, void ISession_Direction::ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/,
const Standard_Integer /*aMode*/) const Standard_Integer /*aMode*/)
{ {

View File

@ -33,8 +33,6 @@ private:
void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode); const Standard_Integer aMode);
void Compute (const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
gp_Pnt myPnt; gp_Pnt myPnt;

View File

@ -50,12 +50,6 @@ void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPres
StdPrs_Point::Add(aPresentation,aGeomPoint,myDrawer); StdPrs_Point::Add(aPresentation,aGeomPoint,myDrawer);
} }
void ISession_Point::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/)
{
}
void ISession_Point::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, void ISession_Point::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/,
const Standard_Integer /*unMode*/) const Standard_Integer /*unMode*/)
{ {

View File

@ -29,8 +29,6 @@ private :
void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode); const Standard_Integer aMode);
void Compute (const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation);
void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection,
const Standard_Integer unMode); const Standard_Integer unMode);

View File

@ -18,7 +18,6 @@ public:
private: private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0); Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0);
virtual void Compute (const Handle(Prs3d_Projector)& ,const Handle(Prs3d_Presentation)& ) {}
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {} virtual void ComputeSelection (const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
private: private:

View File

@ -44,12 +44,6 @@ void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPres
StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer);
} }
void ISession_Curve::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/)
{
}
void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/,
const Standard_Integer /*aMode*/) const Standard_Integer /*aMode*/)
{ {

View File

@ -24,7 +24,6 @@ DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
private: private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
Handle(Geom_Curve) myCurve; Handle(Geom_Curve) myCurve;

View File

@ -81,7 +81,6 @@
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_IsoAspect.hxx> #include <Prs3d_IsoAspect.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_Text.hxx> #include <Prs3d_Text.hxx>
#include <Quantity_Factor.hxx> #include <Quantity_Factor.hxx>
#include <Quantity_Length.hxx> #include <Quantity_Length.hxx>

View File

@ -44,12 +44,6 @@ void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPres
StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer);
} }
void ISession_Curve::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/)
{
}
void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/,
const Standard_Integer /*aMode*/) const Standard_Integer /*aMode*/)
{ {

View File

@ -24,7 +24,6 @@ DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
private: private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
Handle(Geom_Curve) myCurve; Handle(Geom_Curve) myCurve;

View File

@ -8,7 +8,6 @@
#include "HLRApp.h" #include "HLRApp.h"
#include "OCC_2dView.h" #include "OCC_2dView.h"
#include <ISession2D/ISession2D_Shape.h> #include <ISession2D/ISession2D_Shape.h>
#include "Prs3d_Projector.hxx"
#ifdef _DEBUG #ifdef _DEBUG
//#define new DEBUG_NEW //#define new DEBUG_NEW
@ -261,15 +260,15 @@ void CSelectionDialog::Apply()
void CSelectionDialog::UpdateProjector() void CSelectionDialog::UpdateProjector()
{ {
Standard_Real DX,DY,DZ,XAt,YAt,ZAt, Vx,Vy,Vz ; const Handle(Graphic3d_Camera)& aCam = myActiveView->Camera();
myActiveView->Proj(DX,DY,DZ); gp_Dir aBackDir = -aCam->Direction();
myActiveView->At(XAt,YAt,ZAt); gp_Dir aXpers = aCam->Up().Crossed (aBackDir);
myActiveView->Up( Vx,Vy,Vz ); gp_Ax3 anAx3 (aCam->Center(), aBackDir, aXpers);
gp_Trsf aTrsf;
aTrsf.SetTransformation (anAx3);
HLRAlgo_Projector aProjector (aTrsf, !aCam->IsOrthographic(), aCam->Scale());
OnDisplay(false); OnDisplay(false);
Standard_Boolean IsPerspective = (myActiveView->Type() == V3d_PERSPECTIVE);
Standard_Real aFocus = 1;
Prs3d_Projector aPrs3dProjector(IsPerspective,aFocus,DX,DY,DZ,XAt,YAt,ZAt,Vx,Vy,Vz);
HLRAlgo_Projector aProjector = aPrs3dProjector.Projector();
if (myDisplayableShape.IsNull()) return; if (myDisplayableShape.IsNull()) return;
myDisplayableShape->SetProjector(aProjector); myDisplayableShape->SetProjector(aProjector);

View File

@ -44,12 +44,6 @@ void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPres
StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer);
} }
void ISession_Curve::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/)
{
}
void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/,
const Standard_Integer /*aMode*/) const Standard_Integer /*aMode*/)
{ {

View File

@ -24,7 +24,6 @@ DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
private: private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
Standard_EXPORT virtual void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
Handle(Geom_Curve) myCurve; Handle(Geom_Curve) myCurve;

View File

@ -291,7 +291,8 @@ case 6: //color
} }
} }
void User_Cylinder::Compute(const Handle(Prs3d_Projector)& aProjector, void User_Cylinder::computeHLR (const Handle(Graphic3d_Camera)& aProjector,
const Handle(Geom_Transformation)& ,
const Handle(Prs3d_Presentation)& aPresentation) const Handle(Prs3d_Presentation)& aPresentation)
{ {
Handle (Prs3d_Drawer) aDefDrawer = GetContext()->DefaultDrawer(); Handle (Prs3d_Drawer) aDefDrawer = GetContext()->DefaultDrawer();
@ -299,7 +300,8 @@ void User_Cylinder::Compute(const Handle(Prs3d_Projector)& aProjector,
myDrawer->EnableDrawHiddenLine(); myDrawer->EnableDrawHiddenLine();
else else
myDrawer->DisableDrawHiddenLine(); myDrawer->DisableDrawHiddenLine();
StdPrs_HLRPolyShape::Add(aPresentation,myShape,myDrawer,aProjector); StdPrs_HLRPolyShape aTool;
aTool.ComputeHLR (aPresentation,myShape,myDrawer,aProjector);
} }
void User_Cylinder::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, void User_Cylinder::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,

View File

@ -8,7 +8,6 @@
#include <Standard_DefineHandle.hxx> #include <Standard_DefineHandle.hxx>
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>
#include <Graphic3d_AspectFillArea3d.hxx> #include <Graphic3d_AspectFillArea3d.hxx>
#include <Prs3d_Projector.hxx>
// Handle definition // Handle definition
// //
class User_Cylinder; class User_Cylinder;
@ -31,7 +30,7 @@ private:
const Standard_Integer aMode = 0) ; const Standard_Integer aMode = 0) ;
void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
const Standard_Integer aMode) ; const Standard_Integer aMode) ;
void Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation); void computeHLR (const Handle(Graphic3d_Camera)& aProjector, const Handle(Geom_Transformation)& theTrsf, const Handle(Prs3d_Presentation)& aPresentation);
Standard_Boolean TriangleIsValid(const gp_Pnt& P1,const gp_Pnt& P2,const gp_Pnt& P3) const; Standard_Boolean TriangleIsValid(const gp_Pnt& P1,const gp_Pnt& P2,const gp_Pnt& P3) const;
Quantity_Color Color(gp_Pnt& thePoint,Standard_Real AltMin,Standard_Real AltMax, const Standard_Integer ColorizationMode) ; Quantity_Color Color(gp_Pnt& thePoint,Standard_Real AltMin,Standard_Real AltMax, const Standard_Integer ColorizationMode) ;

View File

@ -27,7 +27,6 @@
#include <gp_Dir.hxx> #include <gp_Dir.hxx>
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>

View File

@ -31,7 +31,6 @@
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Quantity_Color.hxx> #include <Quantity_Color.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -183,12 +182,6 @@ void AIS_Axis::Compute(const Handle(PrsMgr_PresentationManager3d)&,
} }
void AIS_Axis::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_Axis::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :
@ -239,16 +232,6 @@ void AIS_Axis::SetWidth(const Standard_Real aValue)
SynchronizeAspects(); SynchronizeAspects();
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Axis::Compute(const Handle(Prs3d_Projector)&,
const Handle(Prs3d_Presentation)&)
{
}
//======================================================================= //=======================================================================
//function : ComputeFields //function : ComputeFields
//purpose : //purpose :

View File

@ -84,15 +84,6 @@ public:
//! Returns true if the interactive object accepts the display mode aMode. //! Returns true if the interactive object accepts the display mode aMode.
Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE;
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
virtual Standard_Integer Signature() const Standard_OVERRIDE { return 2; } virtual Standard_Integer Signature() const Standard_OVERRIDE { return 2; }
virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KOI_Datum; } virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KOI_Datum; }
@ -109,8 +100,6 @@ private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeFields(); Standard_EXPORT void ComputeFields();

View File

@ -36,7 +36,6 @@
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveBox.hxx> #include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -204,24 +203,6 @@ void AIS_Chamf2dDimension::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Chamf2dDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_Chamf2dDimension::Compute(const Handle(Prs3d_Projector)&,const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
void AIS_Chamf2dDimension::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_Chamf2dDimension::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -53,21 +53,10 @@ public:
//! Returns true if the 2d chamfer dimension is movable. //! Returns true if the 2d chamfer dimension is movable.
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE; virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
gp_Pnt myPntAttach; gp_Pnt myPntAttach;

View File

@ -35,7 +35,6 @@
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveBox.hxx> #include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -178,24 +177,6 @@ void AIS_Chamf3dDimension::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Chamf3dDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_Chamf3dDimension::Compute(const Handle(Prs3d_Projector)&,const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
void AIS_Chamf3dDimension::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_Chamf3dDimension::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -51,21 +51,10 @@ public:
//! Returns true if the 3d chamfer dimension is movable. //! Returns true if the 3d chamfer dimension is movable.
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE; virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
gp_Pnt myPntAttach; gp_Pnt myPntAttach;

View File

@ -27,7 +27,6 @@
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Quantity_Color.hxx> #include <Quantity_Color.hxx>
#include <Select3D_SensitiveCircle.hxx> #include <Select3D_SensitiveCircle.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -85,19 +84,6 @@ void AIS_Circle::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresenta
} }
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_Circle::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_Circle::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :
@ -282,12 +268,3 @@ void AIS_Circle::ComputeArcSelection(const Handle(SelectMgr_Selection)& aSelecti
myIsFilledCircleSens); myIsFilledCircleSens);
aSelection->Add(seg); aSelection->Add(seg);
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Circle::Compute(const Handle(Prs3d_Projector)&,
const Handle(Prs3d_Presentation)&)
{
}

View File

@ -38,15 +38,6 @@ public:
//! and the type of sensitivity theIsFilledCircleSens. //! and the type of sensitivity theIsFilledCircleSens.
Standard_EXPORT AIS_Circle(const Handle(Geom_Circle)& theCircle, const Standard_Real theUStart, const Standard_Real theUEnd, const Standard_Boolean theIsFilledCircleSens = Standard_False); Standard_EXPORT AIS_Circle(const Handle(Geom_Circle)& theCircle, const Standard_Real theUStart, const Standard_Real theUEnd, const Standard_Boolean theIsFilledCircleSens = Standard_False);
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
//! Returns index 6 by default. //! Returns index 6 by default.
virtual Standard_Integer Signature() const Standard_OVERRIDE { return 6; } virtual Standard_Integer Signature() const Standard_OVERRIDE { return 6; }
@ -103,8 +94,6 @@ private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeCircle (const Handle(Prs3d_Presentation)& aPresentation); Standard_EXPORT void ComputeCircle (const Handle(Prs3d_Presentation)& aPresentation);

View File

@ -30,7 +30,6 @@
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
#include <gp_Vec.hxx> #include <gp_Vec.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveCircle.hxx> #include <Select3D_SensitiveCircle.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -86,12 +85,6 @@ void AIS_ConcentricRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&
} }
} }
void AIS_ConcentricRelation::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_ConcentricRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeTwoEdgesConcentric //function : ComputeTwoEdgesConcentric
//purpose : //purpose :
@ -223,16 +216,6 @@ void AIS_ConcentricRelation::ComputeTwoEdgesConcentric(const Handle(Prs3d_Presen
} }
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_ConcentricRelation::Compute(const Handle(Prs3d_Projector)&,
const Handle(Prs3d_Presentation)&)
{
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -42,21 +42,10 @@ public:
//! relation of concentricity can be extended. //! relation of concentricity can be extended.
Standard_EXPORT AIS_ConcentricRelation(const TopoDS_Shape& aFShape, const TopoDS_Shape& aSShape, const Handle(Geom_Plane)& aPlane); Standard_EXPORT AIS_ConcentricRelation(const TopoDS_Shape& aFShape, const TopoDS_Shape& aSShape, const Handle(Geom_Plane)& aPlane);
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeTwoEdgesConcentric (const Handle(Prs3d_Presentation)& aPresentationManager); Standard_EXPORT void ComputeTwoEdgesConcentric (const Handle(Prs3d_Presentation)& aPresentationManager);
Standard_EXPORT void ComputeEdgeVertexConcentric (const Handle(Prs3d_Presentation)& aPresentationManager); Standard_EXPORT void ComputeEdgeVertexConcentric (const Handle(Prs3d_Presentation)& aPresentationManager);

View File

@ -22,7 +22,7 @@
#include <NCollection_DataMap.hxx> #include <NCollection_DataMap.hxx>
#include <Precision.hxx> #include <Precision.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Projector.hxx> #include <Prs3d_Presentation.hxx>
#include <Select3D_SensitiveEntity.hxx> #include <Select3D_SensitiveEntity.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
#include <SelectMgr_Selection.hxx> #include <SelectMgr_Selection.hxx>
@ -137,42 +137,30 @@ void AIS_ConnectedInteractive::Compute (const Handle(PrsMgr_PresentationManager3
} }
//======================================================================= //=======================================================================
//function : Compute //function : computeHLR
//purpose : //purpose :
//======================================================================= //=======================================================================
void AIS_ConnectedInteractive::Compute (const Handle(Prs3d_Projector)& theProjector, void AIS_ConnectedInteractive::computeHLR (const Handle(Graphic3d_Camera)& theProjector,
const Handle(Geom_Transformation)& theTransformation, const Handle(Geom_Transformation)& theTransformation,
const Handle(Prs3d_Presentation)& thePresentation) const Handle(Prs3d_Presentation)& thePresentation)
{ {
updateShape (Standard_False); const bool hasTrsf = !theTransformation.IsNull()
&& theTransformation->Form() != gp_Identity;
updateShape (!hasTrsf);
if (myShape.IsNull()) if (myShape.IsNull())
{ {
return; return;
} }
if (hasTrsf)
{
const TopLoc_Location& aLocation = myShape.Location(); const TopLoc_Location& aLocation = myShape.Location();
TopoDS_Shape aShape = myShape.Located (TopLoc_Location (theTransformation->Trsf()) * aLocation); TopoDS_Shape aShape = myShape.Located (TopLoc_Location (theTransformation->Trsf()) * aLocation);
Compute (theProjector, thePresentation, aShape); AIS_Shape::computeHlrPresentation (theProjector, thePresentation, aShape, myDrawer);
} }
else
//======================================================================= {
//function : Compute AIS_Shape::computeHlrPresentation (theProjector, thePresentation, myShape, myDrawer);
//purpose : }
//=======================================================================
void AIS_ConnectedInteractive::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation)
{
updateShape (Standard_True);
Compute (aProjector, aPresentation, myShape);
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_ConnectedInteractive::Compute (const Handle(Prs3d_Projector)& theProjector,
const Handle(Prs3d_Presentation)& thePrs,
const TopoDS_Shape& theShape)
{
AIS_Shape::computeHlrPresentation (theProjector, thePrs, theShape, myDrawer);
} }
//======================================================================= //=======================================================================

View File

@ -105,18 +105,10 @@ protected:
//! a transformation if there's one stored. //! a transformation if there's one stored.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode) Standard_OVERRIDE;
//! Computes the presentation according to a point of view //! Computes the presentation according to a point of view.
//! given by <aProjector>. Standard_EXPORT virtual void computeHLR (const Handle(Graphic3d_Camera)& theProjector,
//! To be Used when the associated degenerated Presentations const Handle(Geom_Transformation)& theTrsf,
//! have been transformed by <aTrsf> which is not a Pure const Handle(Prs3d_Presentation)& thePrs) Standard_OVERRIDE;
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
//! Computes the presentation according to a point of view
//! given by <aProjector>.
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
//! Generates sensitive entities by copying //! Generates sensitive entities by copying
//! them from myReference selection, creates and sets an entity //! them from myReference selection, creates and sets an entity
@ -130,10 +122,6 @@ protected:
Standard_EXPORT void updateShape (const Standard_Boolean WithLocation = Standard_True); Standard_EXPORT void updateShape (const Standard_Boolean WithLocation = Standard_True);
//! Computes the presentation according to a point of view
//! given by <aProjector>.
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation, const TopoDS_Shape& aShape);
Standard_EXPORT void connect (const Handle(AIS_InteractiveObject)& theAnotherObj, Standard_EXPORT void connect (const Handle(AIS_InteractiveObject)& theAnotherObj,
const Handle(Geom_Transformation)& theLocation); const Handle(Geom_Transformation)& theLocation);

View File

@ -37,7 +37,6 @@
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveBox.hxx> #include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveCircle.hxx> #include <Select3D_SensitiveCircle.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
@ -206,33 +205,6 @@ void AIS_EqualDistanceRelation::Compute( const Handle( PrsMgr_PresentationManage
myPoint1, myPoint2, myPoint3, myPoint4, myPlane ); myPoint1, myPoint2, myPoint3, myPoint4, myPlane );
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_EqualDistanceRelation::Compute( const Handle( Prs3d_Projector )& /*aProjector*/,
const Handle( Prs3d_Presentation )& /*aPresentation*/)
{
// throw Standard_NotImplemented("AIS_EqualDistanceRelation::Compute( const Handle( Prs3d_Projector )&,
// const Handle( Prs3d_Presentation )& )");
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_EqualDistanceRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_EqualDistanceRelation::Compute(const Handle(Prs3d_Projector)&,
// const Handle(Geom_Transformation)&,const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -62,15 +62,6 @@ public:
//! created at construction time. //! created at construction time.
const TopoDS_Shape& Shape4() const; const TopoDS_Shape& Shape4() const;
//! Computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
//! Computes the location of an intreval between //! Computes the location of an intreval between
//! between two edges. FirstAttach , SecondAttach //! between two edges. FirstAttach , SecondAttach
//! are the returned extreme points of the interval. //! are the returned extreme points of the interval.
@ -88,8 +79,6 @@ private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
TopoDS_Shape myShape3; TopoDS_Shape myShape3;

View File

@ -30,7 +30,6 @@
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveBox.hxx> #include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -147,31 +146,6 @@ void AIS_EqualRadiusRelation::Compute( const Handle( PrsMgr_PresentationManager3
myFirstCenter, mySecondCenter, myFirstPoint, mySecondPoint, myPlane ); myFirstCenter, mySecondCenter, myFirstPoint, mySecondPoint, myPlane );
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_EqualRadiusRelation::Compute( const Handle( Prs3d_Projector )& /*aProjector*/,
const Handle( Prs3d_Presentation )& /*aPresentation*/)
{
// throw Standard_NotImplemented("AIS_EqualRadiusRelation::Compute( const Handle( Prs3d_Projector )&,const Handle( Prs3d_Presentation )& )");
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_EqualRadiusRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_EqualRadiusRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -33,21 +33,10 @@ public:
//! the presentation method projects it onto the plane. //! the presentation method projects it onto the plane.
Standard_EXPORT AIS_EqualRadiusRelation(const TopoDS_Edge& aFirstEdge, const TopoDS_Edge& aSecondEdge, const Handle(Geom_Plane)& aPlane); Standard_EXPORT AIS_EqualRadiusRelation(const TopoDS_Edge& aFirstEdge, const TopoDS_Edge& aSecondEdge, const Handle(Geom_Plane)& aPlane);
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeRadiusPosition(); Standard_EXPORT void ComputeRadiusPosition();

View File

@ -37,7 +37,6 @@
#include <gp_XYZ.hxx> #include <gp_XYZ.hxx>
#include <Precision.hxx> #include <Precision.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
#include <SelectMgr_Selection.hxx> #include <SelectMgr_Selection.hxx>
@ -196,31 +195,6 @@ void AIS_FixRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&,
myArrowSize); myArrowSize);
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_FixRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_FixRelation::Compute(const Handle(Prs3d_Projector)&,const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_FixRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_FixRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -67,22 +67,11 @@ public:
//! are movable. //! are movable.
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; } virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
//! computes the presentation for <myFixShape> if it's a //! computes the presentation for <myFixShape> if it's a

View File

@ -36,7 +36,6 @@
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveCurve.hxx> #include <Select3D_SensitiveCurve.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -352,23 +351,6 @@ void AIS_IdenticRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&,
} }
} }
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_IdenticRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_IdenticRelation::Compute(const Handle(Prs3d_Projector)&,const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
void AIS_IdenticRelation::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_IdenticRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : function used to compute the selection associated to the //purpose : function used to compute the selection associated to the

View File

@ -60,15 +60,6 @@ public:
//! Returns true if the interactive object is movable. //! Returns true if the interactive object is movable.
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; } virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(AIS_IdenticRelation,AIS_Relation) DEFINE_STANDARD_RTTIEXT(AIS_IdenticRelation,AIS_Relation)
private: private:
@ -76,8 +67,6 @@ private:
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeOneEdgeOVertexPresentation (const Handle(Prs3d_Presentation)& aPresentation); Standard_EXPORT void ComputeOneEdgeOVertexPresentation (const Handle(Prs3d_Presentation)& aPresentation);

View File

@ -22,7 +22,6 @@
#include <gp_Dir.hxx> #include <gp_Dir.hxx>
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Projector.hxx>
#include <TopoDS.hxx> #include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx> #include <TopoDS_Vertex.hxx>

View File

@ -29,7 +29,6 @@
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Quantity_Color.hxx> #include <Quantity_Color.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -78,11 +77,6 @@ void AIS_Line::Compute(const Handle(PrsMgr_PresentationManager3d)&,
} }
void AIS_Line::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :
@ -288,16 +282,3 @@ void AIS_Line::ComputeSegmentLineSelection(const Handle(SelectMgr_Selection)& aS
myEndPoint->Pnt()); myEndPoint->Pnt());
aSelection->Add(seg); aSelection->Add(seg);
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Line::Compute(const Handle(Prs3d_Projector)&,
const Handle(Prs3d_Presentation)&)
{
}

View File

@ -37,15 +37,6 @@ public:
//! and a finishing point aEndPoint for the line. //! and a finishing point aEndPoint for the line.
Standard_EXPORT AIS_Line(const Handle(Geom_Point)& aStartPoint, const Handle(Geom_Point)& aEndPoint); Standard_EXPORT AIS_Line(const Handle(Geom_Point)& aStartPoint, const Handle(Geom_Point)& aEndPoint);
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
//! Returns the signature 5. //! Returns the signature 5.
virtual Standard_Integer Signature() const Standard_OVERRIDE { return 5; } virtual Standard_Integer Signature() const Standard_OVERRIDE { return 5; }
@ -95,8 +86,6 @@ private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeInfiniteLine (const Handle(Prs3d_Presentation)& aPresentation); Standard_EXPORT void ComputeInfiniteLine (const Handle(Prs3d_Presentation)& aPresentation);

View File

@ -43,7 +43,6 @@
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_Text.hxx> #include <Prs3d_Text.hxx>
#include <Prs3d_TextAspect.hxx> #include <Prs3d_TextAspect.hxx>
#include <Select3D_SensitiveBox.hxx> #include <Select3D_SensitiveBox.hxx>
@ -118,32 +117,6 @@ void AIS_MaxRadiusDimension::Compute(const Handle(PrsMgr_PresentationManager3d)&
ComputeEllipse(aPresentation); ComputeEllipse(aPresentation);
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_MaxRadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_MaxRadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation)");
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_MaxRadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_MaxRadiusDimension::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeEllipse //function : ComputeEllipse
//purpose : //purpose :

View File

@ -38,21 +38,10 @@ public:
//! Shape can be edge , planar face or cylindrical face //! Shape can be edge , planar face or cylindrical face
Standard_EXPORT AIS_MaxRadiusDimension(const TopoDS_Shape& aShape, const Standard_Real aVal, const TCollection_ExtendedString& aText, const gp_Pnt& aPosition, const DsgPrs_ArrowSide aSymbolPrs, const Standard_Real anArrowSize = 0.0); Standard_EXPORT AIS_MaxRadiusDimension(const TopoDS_Shape& aShape, const Standard_Real aVal, const TCollection_ExtendedString& aText, const gp_Pnt& aPosition, const DsgPrs_ArrowSide aSymbolPrs, const Standard_Real anArrowSize = 0.0);
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeEllipse (const Handle(Prs3d_Presentation)& aPresentation); Standard_EXPORT void ComputeEllipse (const Handle(Prs3d_Presentation)& aPresentation);

View File

@ -41,7 +41,6 @@
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveCurve.hxx> #include <Select3D_SensitiveCurve.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -137,25 +136,6 @@ void AIS_MidPointRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&,
} }
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_MidPointRelation::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/)
{
// throw Standard_NotImplemented("AIS_MidPointRelation::Compute(const Handle(Prs3d_Projector)&,const Handle(Prs3d_Presentation)&)");
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
void AIS_MidPointRelation::Compute(const Handle(Prs3d_Projector)&,
const Handle(Geom_Transformation)&,
const Handle(Prs3d_Presentation)&)
{
throw Standard_NotImplemented("AIS_MidPointRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
// PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -40,21 +40,10 @@ public:
const TopoDS_Shape& GetTool() const; const TopoDS_Shape& GetTool() const;
//! Computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeFaceFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first); Standard_EXPORT void ComputeFaceFromPnt (const Handle(Prs3d_Presentation)& aprs, const Standard_Boolean first);

View File

@ -43,7 +43,6 @@
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_Text.hxx> #include <Prs3d_Text.hxx>
#include <Prs3d_TextAspect.hxx> #include <Prs3d_TextAspect.hxx>
#include <Select3D_SensitiveBox.hxx> #include <Select3D_SensitiveBox.hxx>
@ -118,31 +117,6 @@ void AIS_MinRadiusDimension::Compute(const Handle(PrsMgr_PresentationManager3d)&
ComputeEllipse(aPresentation); ComputeEllipse(aPresentation);
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_MinRadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_MinRadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation)");
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_MinRadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_MinRadiusDimension::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeEllipse //function : ComputeEllipse
//purpose : //purpose :

View File

@ -38,21 +38,10 @@ public:
//! Shape can be edge , planar face or cylindrical face //! Shape can be edge , planar face or cylindrical face
Standard_EXPORT AIS_MinRadiusDimension(const TopoDS_Shape& aShape, const Standard_Real aVal, const TCollection_ExtendedString& aText, const gp_Pnt& aPosition, const DsgPrs_ArrowSide aSymbolPrs, const Standard_Real anArrowSize = 0.0); Standard_EXPORT AIS_MinRadiusDimension(const TopoDS_Shape& aShape, const Standard_Real aVal, const TCollection_ExtendedString& aText, const gp_Pnt& aPosition, const DsgPrs_ArrowSide aSymbolPrs, const Standard_Real anArrowSize = 0.0);
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeEllipse (const Handle(Prs3d_Presentation)& aPresentation); Standard_EXPORT void ComputeEllipse (const Handle(Prs3d_Presentation)& aPresentation);

View File

@ -19,7 +19,6 @@
#include <AIS_ConnectedInteractive.hxx> #include <AIS_ConnectedInteractive.hxx>
#include <AIS_InteractiveContext.hxx> #include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx> #include <AIS_InteractiveObject.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveEntity.hxx> #include <Select3D_SensitiveEntity.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
#include <Standard_NotImplemented.hxx> #include <Standard_NotImplemented.hxx>
@ -159,29 +158,6 @@ void AIS_MultipleConnectedInteractive::Compute (const Handle(PrsMgr_Presentation
} }
} }
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_MultipleConnectedInteractive::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_MultipleConnectedInteractive::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)
{
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : AcceptShapeDecomposition //function : AcceptShapeDecomposition
//purpose : //purpose :

View File

@ -57,17 +57,6 @@ public:
//! Clears all the connections to objects. //! Clears all the connections to objects.
Standard_EXPORT void DisconnectAll(); Standard_EXPORT void DisconnectAll();
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
//! Informs the graphic context that the interactive Object //! Informs the graphic context that the interactive Object
//! may be decomposed into sub-shapes for dynamic selection. //! may be decomposed into sub-shapes for dynamic selection.
Standard_EXPORT virtual Standard_Boolean AcceptShapeDecomposition() const Standard_OVERRIDE; Standard_EXPORT virtual Standard_Boolean AcceptShapeDecomposition() const Standard_OVERRIDE;

View File

@ -41,7 +41,6 @@
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveBox.hxx> #include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -132,26 +131,6 @@ void AIS_OffsetDimension::Compute(const Handle(PrsMgr_PresentationManager3d)&,
} }
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_OffsetDimension::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/)
{
// throw Standard_NotImplemented("AIS_OffsetDimension::Compute(const Handle(Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation)");
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
void AIS_OffsetDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_OffsetDimension::Compute(const Handle(Prs3d_Projector)&,const Handle(Geom_Transformation)&,const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -37,16 +37,6 @@ public:
//! dimension aVal, and the text aText. //! dimension aVal, and the text aText.
Standard_EXPORT AIS_OffsetDimension(const TopoDS_Shape& FistShape, const TopoDS_Shape& SecondShape, const Standard_Real aVal, const TCollection_ExtendedString& aText); Standard_EXPORT AIS_OffsetDimension(const TopoDS_Shape& FistShape, const TopoDS_Shape& SecondShape, const Standard_Real aVal, const TCollection_ExtendedString& aText);
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
//! Indicates that the dimension we are concerned with is an offset. //! Indicates that the dimension we are concerned with is an offset.
virtual AIS_KindOfDimension KindOfDimension() const Standard_OVERRIDE; virtual AIS_KindOfDimension KindOfDimension() const Standard_OVERRIDE;
@ -61,8 +51,6 @@ private:
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeTwoFacesOffset (const Handle(Prs3d_Presentation)& aPresentation, const gp_Trsf& aTrsf); Standard_EXPORT void ComputeTwoFacesOffset (const Handle(Prs3d_Presentation)& aPresentation, const gp_Trsf& aTrsf);

View File

@ -38,7 +38,6 @@
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveBox.hxx> #include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -116,23 +115,6 @@ void AIS_ParallelRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&,
} }
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_ParallelRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_ParallelRelation::Compute(const Handle(Prs3d_Projector)&,const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
void AIS_ParallelRelation::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_ParallelRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -46,21 +46,10 @@ public:
//! Returns true if the parallelism is movable. //! Returns true if the parallelism is movable.
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE; virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeTwoFacesParallel (const Handle(Prs3d_Presentation)& aPresentation); Standard_EXPORT void ComputeTwoFacesParallel (const Handle(Prs3d_Presentation)& aPresentation);

View File

@ -38,7 +38,6 @@
#include <IntAna2d_IntPoint.hxx> #include <IntAna2d_IntPoint.hxx>
#include <Precision.hxx> #include <Precision.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
#include <SelectMgr_Selection.hxx> #include <SelectMgr_Selection.hxx>
@ -107,23 +106,6 @@ void AIS_PerpendicularRelation::Compute(const Handle(PrsMgr_PresentationManager3
// Cas pas traite - Edge/Face // Cas pas traite - Edge/Face
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_PerpendicularRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_PerpendicularRelation::Compute(const Handle(Prs3d_Projector)&,const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
void AIS_PerpendicularRelation::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_PerpendicularRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -44,22 +44,11 @@ public:
//! second shape aSShape. //! second shape aSShape.
Standard_EXPORT AIS_PerpendicularRelation(const TopoDS_Shape& aFShape, const TopoDS_Shape& aSShape); Standard_EXPORT AIS_PerpendicularRelation(const TopoDS_Shape& aFShape, const TopoDS_Shape& aSShape);
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeTwoFacesPerpendicular (const Handle(Prs3d_Presentation)& aPresentation); Standard_EXPORT void ComputeTwoFacesPerpendicular (const Handle(Prs3d_Presentation)& aPresentation);

View File

@ -39,7 +39,6 @@
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_PlaneAspect.hxx> #include <Prs3d_PlaneAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_ShadingAspect.hxx> #include <Prs3d_ShadingAspect.hxx>
#include <Quantity_Color.hxx> #include <Quantity_Color.hxx>
#include <Select3D_SensitiveTriangulation.hxx> #include <Select3D_SensitiveTriangulation.hxx>
@ -286,11 +285,6 @@ void AIS_Plane::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
} }
} }
void AIS_Plane::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
PrsMgr_PresentableObject::Compute(aProjector, aTransformation, aPresentation);
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :
@ -529,15 +523,6 @@ void AIS_Plane::ComputeFrame()
} }
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Plane::Compute(const Handle(Prs3d_Projector)&,
const Handle(Prs3d_Presentation)&)
{
}
//======================================================================= //=======================================================================
//function : ComputeFields //function : ComputeFields
//purpose : //purpose :

View File

@ -132,15 +132,6 @@ public:
//! Sets the type of sensitivity for the plane. //! Sets the type of sensitivity for the plane.
void SetTypeOfSensitivity (Select3D_TypeOfSensitivity theTypeOfSensitivity) { myTypeOfSensitivity = theTypeOfSensitivity; } void SetTypeOfSensitivity (Select3D_TypeOfSensitivity theTypeOfSensitivity) { myTypeOfSensitivity = theTypeOfSensitivity; }
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, const Standard_Integer theMode) Standard_OVERRIDE; Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, const Standard_Integer theMode) Standard_OVERRIDE;
Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE; Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE;
@ -151,8 +142,6 @@ private:
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeFrame(); Standard_EXPORT void ComputeFrame();
Standard_EXPORT void ComputeFields(); Standard_EXPORT void ComputeFields();

View File

@ -42,7 +42,6 @@
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Quantity_Color.hxx> #include <Quantity_Color.hxx>
#include <Select3D_SensitivePoint.hxx> #include <Select3D_SensitivePoint.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
@ -181,12 +180,6 @@ void AIS_PlaneTrihedron::Compute(const Handle(PrsMgr_PresentationManager3d)&,
aPresentation->SetInfiniteState (Standard_True); aPresentation->SetInfiniteState (Standard_True);
} }
void AIS_PlaneTrihedron::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTransformation, const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_PlaneTrihedron::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :
@ -251,13 +244,6 @@ void AIS_PlaneTrihedron::SetColor(const Quantity_Color &aCol)
SynchronizeAspects(); SynchronizeAspects();
} }
void AIS_PlaneTrihedron::Compute(const Handle(Prs3d_Projector)&,
const Handle(Prs3d_Presentation)&)
{
}
//======================================================================= //=======================================================================
//function : ExtremityPoints //function : ExtremityPoints
//purpose : to avoid warning //purpose : to avoid warning

View File

@ -74,15 +74,6 @@ public:
//! Returns true if the display mode selected, aMode, is valid. //! Returns true if the display mode selected, aMode, is valid.
Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE;
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
virtual Standard_Integer Signature() const Standard_OVERRIDE { return 4; } virtual Standard_Integer Signature() const Standard_OVERRIDE { return 4; }
//! Returns datum as the type of Interactive Object. //! Returns datum as the type of Interactive Object.
@ -101,8 +92,6 @@ protected:
private: private:
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
private: private:

View File

@ -28,7 +28,6 @@
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_PointAspect.hxx> #include <Prs3d_PointAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Quantity_Color.hxx> #include <Quantity_Color.hxx>
#include <Select3D_SensitivePoint.hxx> #include <Select3D_SensitivePoint.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -102,19 +101,6 @@ void AIS_Point::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
} }
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_Point::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_Point::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :
@ -160,16 +146,6 @@ TopoDS_Vertex AIS_Point::Vertex() const
return BRepBuilderAPI_MakeVertex(P); return BRepBuilderAPI_MakeVertex(P);
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Point::Compute(const Handle(Prs3d_Projector)&,
const Handle(Prs3d_Presentation)&)
{
}
//======================================================================= //=======================================================================
//function : SetMarker //function : SetMarker
//purpose : //purpose :

View File

@ -49,15 +49,6 @@ public:
//! Returns true if the display mode selected is valid for point datums. //! Returns true if the display mode selected is valid for point datums.
Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const Standard_OVERRIDE;
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
//! Allows you to provide settings for the Color. //! Allows you to provide settings for the Color.
Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE; Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE;
@ -85,8 +76,6 @@ protected:
private: private:
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void UpdatePointValues(); Standard_EXPORT void UpdatePointValues();

View File

@ -43,7 +43,6 @@
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_IsoAspect.hxx> #include <Prs3d_IsoAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_Root.hxx> #include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx> #include <Prs3d_ShadingAspect.hxx>
#include <StdPrs_BndBox.hxx> #include <StdPrs_BndBox.hxx>
@ -224,7 +223,7 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
//function : computeHlrPresentation //function : computeHlrPresentation
//purpose : //purpose :
//======================================================================= //=======================================================================
void AIS_Shape::computeHlrPresentation (const Handle(Prs3d_Projector)& theProjector, void AIS_Shape::computeHlrPresentation (const Handle(Graphic3d_Camera)& theProjector,
const Handle(Prs3d_Presentation)& thePrs, const Handle(Prs3d_Presentation)& thePrs,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer) const Handle(Prs3d_Drawer)& theDrawer)
@ -282,14 +281,20 @@ void AIS_Shape::computeHlrPresentation (const Handle(Prs3d_Projector)& theProjec
switch (theDrawer->TypeOfHLR()) switch (theDrawer->TypeOfHLR())
{ {
case Prs3d_TOH_Algo: case Prs3d_TOH_Algo:
StdPrs_HLRShape::Add (thePrs, theShape, theDrawer, theProjector); {
StdPrs_HLRShape aBuilder;
aBuilder.ComputeHLR (thePrs, theShape, theDrawer, theProjector);
break; break;
}
case Prs3d_TOH_PolyAlgo: case Prs3d_TOH_PolyAlgo:
default: case Prs3d_TOH_NotSet:
StdPrs_HLRPolyShape::Add (thePrs, theShape, theDrawer, theProjector); {
StdPrs_HLRPolyShape aBuilder;
aBuilder.ComputeHLR (thePrs, theShape, theDrawer, theProjector);
break; break;
} }
} }
}
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
Message::DefaultMessenger()->Send (TCollection_AsciiString() Message::DefaultMessenger()->Send (TCollection_AsciiString()

View File

@ -282,21 +282,22 @@ protected:
const Standard_Integer theMode) Standard_OVERRIDE; const Standard_Integer theMode) Standard_OVERRIDE;
//! Compute projected presentation. //! Compute projected presentation.
virtual void Compute (const Handle(Prs3d_Projector)& theProjector, virtual void computeHLR (const Handle(Graphic3d_Camera)& theProjector,
const Handle(Prs3d_Presentation)& thePrs) Standard_OVERRIDE
{
computeHlrPresentation (theProjector, thePrs, myshape, myDrawer);
}
//! Compute projected presentation with transformation.
virtual void Compute (const Handle(Prs3d_Projector)& theProjector,
const Handle(Geom_Transformation)& theTrsf, const Handle(Geom_Transformation)& theTrsf,
const Handle(Prs3d_Presentation)& thePrs) Standard_OVERRIDE const Handle(Prs3d_Presentation)& thePrs) Standard_OVERRIDE
{
if (!theTrsf.IsNull()
&& theTrsf->Form() != gp_Identity)
{ {
const TopLoc_Location& aLoc = myshape.Location(); const TopLoc_Location& aLoc = myshape.Location();
const TopoDS_Shape aShape = myshape.Located (TopLoc_Location (theTrsf->Trsf()) * aLoc); const TopoDS_Shape aShape = myshape.Located (TopLoc_Location (theTrsf->Trsf()) * aLoc);
computeHlrPresentation (theProjector, thePrs, aShape, myDrawer); computeHlrPresentation (theProjector, thePrs, aShape, myDrawer);
} }
else
{
computeHlrPresentation (theProjector, thePrs, myshape, myDrawer);
}
}
//! Compute selection. //! Compute selection.
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
@ -320,7 +321,7 @@ protected:
public: public:
//! Compute HLR presentation for specified shape. //! Compute HLR presentation for specified shape.
Standard_EXPORT static void computeHlrPresentation (const Handle(Prs3d_Projector)& theProjector, Standard_EXPORT static void computeHlrPresentation (const Handle(Graphic3d_Camera)& theProjector,
const Handle(Prs3d_Presentation)& thePrs, const Handle(Prs3d_Presentation)& thePrs,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer); const Handle(Prs3d_Drawer)& theDrawer);

View File

@ -39,7 +39,6 @@
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveBox.hxx> #include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
@ -121,25 +120,6 @@ void AIS_SymmetricRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&,
} }
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_SymmetricRelation::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/)
{
// throw Standard_NotImplemented("AIS_SymmetricRelation::Compute(const Handle(Prs3d_Projector)&,const Handle(Prs3d_Presentation)&)");
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
void AIS_SymmetricRelation::Compute(const Handle(Prs3d_Projector)&,
const Handle(Geom_Transformation)&,
const Handle(Prs3d_Presentation)&)
{
throw Standard_NotImplemented("AIS_SymmetricRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
// PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -55,21 +55,10 @@ public:
//! shape, and a plane. This tool is created at construction time. //! shape, and a plane. This tool is created at construction time.
const TopoDS_Shape& GetTool() const; const TopoDS_Shape& GetTool() const;
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeTwoFacesSymmetric (const Handle(Prs3d_Presentation)& aprs); Standard_EXPORT void ComputeTwoFacesSymmetric (const Handle(Prs3d_Presentation)& aprs);

View File

@ -37,7 +37,6 @@
#include <gp_Vec.hxx> #include <gp_Vec.hxx>
#include <Precision.hxx> #include <Precision.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Select3D_SensitiveSegment.hxx> #include <Select3D_SensitiveSegment.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
#include <SelectMgr_Selection.hxx> #include <SelectMgr_Selection.hxx>
@ -113,25 +112,6 @@ void AIS_TangentRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&,
} }
} }
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_TangentRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_TangentRelation::Compute(const Handle(Prs3d_Projector)&,const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
void AIS_TangentRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)
{
// throw Standard_NotImplemented("AIS_TangentRelation::Compute(const Handle(Prs3d_Projector)&, const Handle(Geom_Transformation)&, const Handle(Prs3d_Presentation)&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation ) ;
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -53,21 +53,10 @@ public:
//! This reference is initially defined at construction time. //! This reference is initially defined at construction time.
Standard_EXPORT void SetExternRef (const Standard_Integer aRef); Standard_EXPORT void SetExternRef (const Standard_Integer aRef);
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE; Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT void ComputeTwoFacesTangent (const Handle(Prs3d_Presentation)& aPresentation); Standard_EXPORT void ComputeTwoFacesTangent (const Handle(Prs3d_Presentation)& aPresentation);

View File

@ -34,7 +34,6 @@
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_PointAspect.hxx> #include <Prs3d_PointAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_ShadingAspect.hxx> #include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_Text.hxx> #include <Prs3d_Text.hxx>
#include <Prs3d_TextAspect.hxx> #include <Prs3d_TextAspect.hxx>
@ -200,17 +199,6 @@ void AIS_Trihedron::Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsM
computePresentation (thePrsMgr, thePrs); computePresentation (thePrsMgr, thePrs);
} }
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_Trihedron::Compute (const Handle(Prs3d_Projector)& theProjector,
const Handle(Geom_Transformation)& theTrsf,
const Handle(Prs3d_Presentation)& thePrs)
{
PrsMgr_PresentableObject::Compute (theProjector, theTrsf, thePrs);
}
//======================================================================= //=======================================================================
//function : ComputeSelection //function : ComputeSelection
//purpose : //purpose :

View File

@ -207,14 +207,6 @@ protected:
const Handle(Prs3d_Presentation)& thePrs, const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE; const Standard_Integer theMode) Standard_OVERRIDE;
//! This compute is unavailable for trihedron presentation.
void Compute (const Handle(Prs3d_Projector)& , const Handle(Prs3d_Presentation)& ) Standard_OVERRIDE {}
//! This compute is unavailable for trihedron presentation.
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& theProjector,
const Handle(Geom_Transformation)& theTrsf,
const Handle(Prs3d_Presentation)& thePrs) Standard_OVERRIDE;
//! Compute selection. //! Compute selection.
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
const Standard_Integer theMode) Standard_OVERRIDE; const Standard_Integer theMode) Standard_OVERRIDE;

View File

@ -218,7 +218,8 @@ void Graphic3d_CView::SetComputedMode (const Standard_Boolean theMode)
} }
else else
{ {
Handle(Graphic3d_Structure) aCompStruct = aStruct->IsTransformed() ? aStruct->Compute (this, aStruct->Transformation()) : aStruct->Compute (this); Handle(Graphic3d_Structure) aCompStruct;
aStruct->computeHLR (myCamera, aCompStruct);
aCompStruct->SetHLRValidation (Standard_True); aCompStruct->SetHLRValidation (Standard_True);
const Standard_Boolean toComputeWireframe = myVisualization == Graphic3d_TOV_WIREFRAME const Standard_Boolean toComputeWireframe = myVisualization == Graphic3d_TOV_WIREFRAME
@ -298,8 +299,7 @@ void Graphic3d_CView::ReCompute (const Handle(Graphic3d_Structure)& theStruct)
Handle(Graphic3d_Structure) aCompStructOld = myStructsComputed.ChangeValue (anIndex); Handle(Graphic3d_Structure) aCompStructOld = myStructsComputed.ChangeValue (anIndex);
Handle(Graphic3d_Structure) aCompStruct = aCompStructOld; Handle(Graphic3d_Structure) aCompStruct = aCompStructOld;
aCompStruct->SetTransformation (Handle(Geom_Transformation)()); aCompStruct->SetTransformation (Handle(Geom_Transformation)());
theStruct->IsTransformed() ? theStruct->Compute (this, theStruct->Transformation(), aCompStruct) theStruct->computeHLR (myCamera, aCompStruct);
: theStruct->Compute (this, aCompStruct);
aCompStruct->SetHLRValidation (Standard_True); aCompStruct->SetHLRValidation (Standard_True);
aCompStruct->CalculateBoundBox(); aCompStruct->CalculateBoundBox();
@ -769,21 +769,8 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure)
{ {
aStruct = myStructsComputed.Value (anIndex); aStruct = myStructsComputed.Value (anIndex);
aStruct->SetTransformation (Handle(Geom_Transformation)()); aStruct->SetTransformation (Handle(Geom_Transformation)());
if (theStructure->IsTransformed())
{
theStructure->Compute (this, theStructure->Transformation(), aStruct);
}
else
{
theStructure->Compute (this, aStruct);
}
}
else
{
aStruct = theStructure->IsTransformed()
? theStructure->Compute (this, theStructure->Transformation())
: theStructure->Compute (this);
} }
theStructure->computeHLR (myCamera, aStruct);
aStruct->SetHLRValidation (Standard_True); aStruct->SetHLRValidation (Standard_True);

View File

@ -90,7 +90,7 @@ public:
Standard_Boolean IsRemoved() const { return myIsRemoved; } Standard_Boolean IsRemoved() const { return myIsRemoved; }
//! Returns camera object of the view. //! Returns camera object of the view.
virtual const Handle(Graphic3d_Camera)& Camera() const { return myCamera; } virtual const Handle(Graphic3d_Camera)& Camera() const Standard_OVERRIDE { return myCamera; }
//! Sets camera used by the view. //! Sets camera used by the view.
virtual void SetCamera (const Handle(Graphic3d_Camera)& theCamera) { myCamera = theCamera; } virtual void SetCamera (const Handle(Graphic3d_Camera)& theCamera) { myCamera = theCamera; }

View File

@ -21,6 +21,7 @@
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
class Graphic3d_Camera;
class Graphic3d_DataStructureManager; class Graphic3d_DataStructureManager;
DEFINE_STANDARD_HANDLE(Graphic3d_DataStructureManager, Standard_Transient) DEFINE_STANDARD_HANDLE(Graphic3d_DataStructureManager, Standard_Transient)
@ -31,30 +32,15 @@ DEFINE_STANDARD_HANDLE(Graphic3d_DataStructureManager, Standard_Transient)
//! It defines the global attributes. //! It defines the global attributes.
class Graphic3d_DataStructureManager : public Standard_Transient class Graphic3d_DataStructureManager : public Standard_Transient
{ {
public:
DEFINE_STANDARD_RTTIEXT(Graphic3d_DataStructureManager,Standard_Transient) DEFINE_STANDARD_RTTIEXT(Graphic3d_DataStructureManager,Standard_Transient)
protected: protected:
//! Initializes the manager <me>. //! Initializes the manager <me>.
Standard_EXPORT Graphic3d_DataStructureManager(); Standard_EXPORT Graphic3d_DataStructureManager();
//! Returns camera object of the view.
virtual const Handle(Graphic3d_Camera)& Camera() const = 0;
private:
}; };
#endif // _Graphic3d_DataStructureManager_HeaderFile #endif // _Graphic3d_DataStructureManager_HeaderFile

View File

@ -175,39 +175,13 @@ public:
} }
//! Returns the new Structure defined for the new visualization //! Returns the new Structure defined for the new visualization
virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector) virtual void computeHLR (const Handle(Graphic3d_Camera)& theProjector,
{
(void )theProjector;
return this;
}
//! Returns the new Structure defined for the new visualization
virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
const Handle(Geom_Transformation)& theTrsf)
{
(void )theProjector;
(void )theTrsf;
return this;
}
//! Returns the new Structure defined for the new visualization
virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
Handle(Graphic3d_Structure)& theStructure) Handle(Graphic3d_Structure)& theStructure)
{ {
(void )theProjector; (void )theProjector;
(void )theStructure; (void )theStructure;
} }
//! Returns the new Structure defined for the new visualization
virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
const Handle(Geom_Transformation)& theTrsf,
Handle(Graphic3d_Structure)& theStructure)
{
(void )theProjector;
(void )theTrsf;
(void )theStructure;
}
//! Forces a new construction of the structure <me> //! Forces a new construction of the structure <me>
//! if <me> is displayed and TOS_COMPUTED. //! if <me> is displayed and TOS_COMPUTED.
Standard_EXPORT void ReCompute(); Standard_EXPORT void ReCompute();

View File

@ -35,8 +35,6 @@ Prs3d_PointAspect.hxx
Prs3d_Presentation.hxx Prs3d_Presentation.hxx
Prs3d_PresentationShadow.cxx Prs3d_PresentationShadow.cxx
Prs3d_PresentationShadow.hxx Prs3d_PresentationShadow.hxx
Prs3d_Projector.cxx
Prs3d_Projector.hxx
Prs3d_Root.hxx Prs3d_Root.hxx
Prs3d_ShadingAspect.cxx Prs3d_ShadingAspect.cxx
Prs3d_ShadingAspect.hxx Prs3d_ShadingAspect.hxx

View File

@ -1,57 +0,0 @@
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <gp_Ax3.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Trsf.hxx>
#include <HLRAlgo_Projector.hxx>
#include <Prs3d_Projector.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Prs3d_Projector,Standard_Transient)
Prs3d_Projector::Prs3d_Projector (const HLRAlgo_Projector& HLPr): MyProjector(HLPr)
{}
Prs3d_Projector::Prs3d_Projector (const Standard_Boolean Pers,
const Standard_Real Focus,
const Standard_Real DX,
const Standard_Real DY,
const Standard_Real DZ,
const Standard_Real XAt,
const Standard_Real YAt,
const Standard_Real ZAt,
const Standard_Real XUp,
const Standard_Real YUp,
const Standard_Real ZUp)
{
gp_Pnt At (XAt,YAt,ZAt);
gp_Dir Zpers (DX,DY,DZ);
gp_Dir Ypers (XUp,YUp,ZUp);
gp_Dir Xpers = Ypers.Crossed(Zpers);
gp_Ax3 Axe (At, Zpers, Xpers);
gp_Trsf T;
T.SetTransformation(Axe);
MyProjector = HLRAlgo_Projector(T,Pers,Focus);
}
HLRAlgo_Projector Prs3d_Projector::Projector () const
{
return MyProjector;
}

View File

@ -1,64 +0,0 @@
// Created on: 1993-03-19
// Created by: Jean-Louis FRENKEL
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Prs3d_Projector_HeaderFile
#define _Prs3d_Projector_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <HLRAlgo_Projector.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Boolean.hxx>
class Prs3d_Projector;
DEFINE_STANDARD_HANDLE(Prs3d_Projector, Standard_Transient)
//! A projector object.
//! This object defines the parameters of a view for a
//! visualization algorithm. It is, for example, used by the
//! hidden line removal algorithms.
class Prs3d_Projector : public Standard_Transient
{
public:
Standard_EXPORT Prs3d_Projector(const HLRAlgo_Projector& Pr);
//! Constructs a projector framework from the following parameters
//! - Pers is true if the view is a perspective view and
//! false if it is an axonometric one;
//! - Focus is the focal length if a perspective view is defined;
//! - DX, DY and DZ are the coordinates of the
//! projection vector;
//! - XAt, YAt and ZAt are the coordinates of the view point;
//! - XUp, YUp and ZUp are the coordinates of the
//! vertical direction vector.
Standard_EXPORT Prs3d_Projector(const Standard_Boolean Pers, const Standard_Real Focus, const Standard_Real DX, const Standard_Real DY, const Standard_Real DZ, const Standard_Real XAt, const Standard_Real YAt, const Standard_Real ZAt, const Standard_Real XUp, const Standard_Real YUp, const Standard_Real ZUp);
//! Returns a projector object for use in a hidden line removal algorithm.
Standard_EXPORT HLRAlgo_Projector Projector() const;
DEFINE_STANDARD_RTTIEXT(Prs3d_Projector,Standard_Transient)
private:
HLRAlgo_Projector MyProjector;
};
#endif // _Prs3d_Projector_HeaderFile

View File

@ -21,7 +21,6 @@
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_PointAspect.hxx> #include <Prs3d_PointAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_ShadingAspect.hxx> #include <Prs3d_ShadingAspect.hxx>
#include <PrsMgr_Presentation.hxx> #include <PrsMgr_Presentation.hxx>
#include <PrsMgr_PresentationManager.hxx> #include <PrsMgr_PresentationManager.hxx>
@ -99,22 +98,12 @@ void PrsMgr_PresentableObject::Fill (const Handle(PrsMgr_PresentationManager)& t
} }
//======================================================================= //=======================================================================
//function : Compute //function : computeHLR
//purpose : //purpose :
//======================================================================= //=======================================================================
void PrsMgr_PresentableObject::Compute(const Handle(Prs3d_Projector)& /*aProjector*/, void PrsMgr_PresentableObject::computeHLR (const Handle(Graphic3d_Camera)& ,
const Handle(Prs3d_Presentation)& /*aPresentation*/) const Handle(Geom_Transformation)& ,
{ const Handle(Prs3d_Presentation)& )
throw Standard_NotImplemented("cannot compute under a specific projector");
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void PrsMgr_PresentableObject::Compute(const Handle(Prs3d_Projector)& /* aProjector*/,
const Handle(Geom_Transformation)& /*aTrsf*/,
const Handle(Prs3d_Presentation)& /*aPresentation*/)
{ {
throw Standard_NotImplemented("cannot compute under a specific projector"); throw Standard_NotImplemented("cannot compute under a specific projector");
} }

View File

@ -341,19 +341,14 @@ protected: //! @name interface methods
const Handle(Prs3d_Presentation)& thePrs, const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) = 0; const Standard_Integer theMode) = 0;
//! Calculates the 3D view presentation. //! Calculates hidden line removal presentation for specific camera position.
//! Each of the views in the viewer and every modification such as rotation, for example, entails recalculation. //! Each of the views in the viewer and every modification such as rotation, for example, entails recalculation.
//! It must be redefined to implement hidden line removal for the object. The user never calls this method himself. //! Default implementation throws Standard_NotImplemented exception
//! This is done via the InteractiveContext object and is dependent on the point of view from which the object is displayed.
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& theProjector,
const Handle(Prs3d_Presentation)& thePrs);
//! Calculates the 3D view presentation.
//! A point of view is provided by the projector, and the geometric transformation which has transformed associated presentable objects is specified by transformation.
//! This function is to be used in case where a hidden line removal display cannot be calculated automatically.
//! This occurs when associated presentable objects have been transformed geometrically, but not translated.
//! Warning! The transformation must be applied to the object before computation. //! Warning! The transformation must be applied to the object before computation.
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& theProjector, //! @param theProjector [in] view orientation
//! @param theTrsf [in] additional transformation, or NULL if undefined
//! @param thePrs [in] presentation to fill
Standard_EXPORT virtual void computeHLR (const Handle(Graphic3d_Camera)& theProjector,
const Handle(Geom_Transformation)& theTrsf, const Handle(Geom_Transformation)& theTrsf,
const Handle(Prs3d_Presentation)& thePrs); const Handle(Prs3d_Presentation)& thePrs);

View File

@ -18,7 +18,6 @@
#include <Graphic3d_DataStructureManager.hxx> #include <Graphic3d_DataStructureManager.hxx>
#include <Precision.hxx> #include <Precision.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Projector.hxx>
#include <PrsMgr_PresentableObject.hxx> #include <PrsMgr_PresentableObject.hxx>
#include <PrsMgr_PresentationManager.hxx> #include <PrsMgr_PresentationManager.hxx>
#include <Quantity_Color.hxx> #include <Quantity_Color.hxx>
@ -188,71 +187,20 @@ void PrsMgr_Presentation::Compute()
myPresentableObject->Compute (myPresentationManager, this, aDispMode); myPresentableObject->Compute (myPresentationManager, this, aDispMode);
} }
//=======================================================================
//function : Compute
//purpose : Methods for hidden parts...
//=======================================================================
Handle(Graphic3d_Structure) PrsMgr_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector)
{
Handle(Graphic3d_Structure) aPrs = new Graphic3d_Structure (myPresentationManager->StructureManager());
myPresentableObject->Compute (Projector (theProjector), aPrs);
return aPrs;
}
//======================================================================= //=======================================================================
//function : Compute //function : Compute
//purpose : //purpose :
//======================================================================= //=======================================================================
void PrsMgr_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, void PrsMgr_Presentation::computeHLR (const Handle(Graphic3d_Camera)& theProjector,
Handle(Graphic3d_Structure)& theStructToFill) Handle(Graphic3d_Structure)& theStructToFill)
{ {
theStructToFill->Clear(); if (theStructToFill.IsNull())
Handle(Prs3d_Presentation) aPrs = theStructToFill; {
myPresentableObject->Compute (Projector (theProjector), aPrs); theStructToFill = new Prs3d_Presentation (myPresentationManager->StructureManager());
} }
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
Handle(Graphic3d_Structure) PrsMgr_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
const Handle(Geom_Transformation)& theTrsf)
{
Handle(Prs3d_Presentation) aPrs3d = new Prs3d_Presentation (myPresentationManager->StructureManager());
myPresentableObject->Compute (Projector (theProjector), theTrsf, aPrs3d);
return aPrs3d;
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void PrsMgr_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
const Handle(Geom_Transformation)& theTrsf,
Handle(Graphic3d_Structure)& theStructToFill)
{
// recompute HLR after transformation in all the case
Handle(Graphic3d_Structure) aPrs = theStructToFill; Handle(Graphic3d_Structure) aPrs = theStructToFill;
theStructToFill->Clear(); theStructToFill->Clear();
myPresentableObject->Compute (Projector (theProjector), theTrsf, aPrs); myPresentableObject->computeHLR (theProjector, Transformation(), aPrs);
}
//=======================================================================
//function : Projector
//purpose :
//=======================================================================
Handle(Prs3d_Projector) PrsMgr_Presentation::Projector (const Handle(Graphic3d_DataStructureManager)& theProjector)
{
Handle(Graphic3d_Camera) aCamera = Handle(Graphic3d_CView)::DownCast (theProjector)->Camera();
const gp_Dir aDir = aCamera->Direction().Reversed();
const gp_Pnt anAt = aCamera->Center();
const gp_Dir anUp = aCamera->Up();
Handle(Prs3d_Projector) aProj = new Prs3d_Projector (!aCamera->IsOrthographic(),
aCamera->Scale(),
aDir.X(), aDir.Y(), aDir.Z(),
anAt.X(), anAt.Y(), anAt.Z(),
anUp.X(), anUp.Y(), anUp.Z());
return aProj;
} }
//======================================================================= //=======================================================================

View File

@ -23,11 +23,11 @@
class PrsMgr_PresentationManager; class PrsMgr_PresentationManager;
class PrsMgr_PresentableObject; class PrsMgr_PresentableObject;
class Quantity_Color; class Quantity_Color;
class Graphic3d_Camera;
class Geom_Transformation; class Geom_Transformation;
class Prs3d_Drawer; class Prs3d_Drawer;
class Graphic3d_Structure; class Graphic3d_Structure;
class Graphic3d_DataStructureManager; class Graphic3d_DataStructureManager;
class Prs3d_Projector;
DEFINE_STANDARD_HANDLE(PrsMgr_Presentation, Graphic3d_Structure) DEFINE_STANDARD_HANDLE(PrsMgr_Presentation, Graphic3d_Structure)
@ -93,20 +93,8 @@ protected:
//! Displays myStructure. //! Displays myStructure.
Standard_EXPORT void display (const Standard_Boolean theIsHighlight); Standard_EXPORT void display (const Standard_Boolean theIsHighlight);
Standard_EXPORT virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector) Standard_OVERRIDE; Standard_EXPORT virtual void computeHLR (const Handle(Graphic3d_Camera)& theProjector,
Standard_EXPORT virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
const Handle(Geom_Transformation)& theTrsf) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
Handle(Graphic3d_Structure)& theGivenStruct) Standard_OVERRIDE; Handle(Graphic3d_Structure)& theGivenStruct) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
const Handle(Geom_Transformation)& theTrsf,
Handle(Graphic3d_Structure)& theGivenStruct) Standard_OVERRIDE;
Standard_EXPORT static Handle(Prs3d_Projector) Projector (const Handle(Graphic3d_DataStructureManager)& theProjector);
protected: protected:
Handle(PrsMgr_PresentationManager) myPresentationManager; Handle(PrsMgr_PresentationManager) myPresentationManager;

View File

@ -69,7 +69,6 @@
#include <TopoDS_Compound.hxx> #include <TopoDS_Compound.hxx>
#include <TopoDS_CompSolid.hxx> #include <TopoDS_CompSolid.hxx>
#include <StdSelect_ShapeTypeFilter.hxx> #include <StdSelect_ShapeTypeFilter.hxx>
#include <Prs3d_Projector.hxx>
#include <HLRAlgo_Projector.hxx> #include <HLRAlgo_Projector.hxx>
#include <Standard_ErrorHandler.hxx> #include <Standard_ErrorHandler.hxx>
#include <Font_NameOfFont.hxx> #include <Font_NameOfFont.hxx>

View File

@ -8,6 +8,8 @@ StdPrs_HLRPolyShape.cxx
StdPrs_HLRPolyShape.hxx StdPrs_HLRPolyShape.hxx
StdPrs_HLRShape.cxx StdPrs_HLRShape.cxx
StdPrs_HLRShape.hxx StdPrs_HLRShape.hxx
StdPrs_HLRShapeI.cxx
StdPrs_HLRShapeI.hxx
StdPrs_HLRToolShape.cxx StdPrs_HLRToolShape.cxx
StdPrs_HLRToolShape.hxx StdPrs_HLRToolShape.hxx
StdPrs_Isolines.cxx StdPrs_Isolines.cxx

View File

@ -27,7 +27,7 @@
#include <HLRBRep_PolyAlgo.hxx> #include <HLRBRep_PolyAlgo.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx> #include <StdPrs_ToolTriangulatedShape.hxx>
#include <StdPrs_WFShape.hxx> #include <StdPrs_WFShape.hxx>
#include <TColgp_SequenceOfPnt.hxx> #include <TColgp_SequenceOfPnt.hxx>
#include <TopAbs.hxx> #include <TopAbs.hxx>
@ -41,16 +41,24 @@
#define PntY2 ((Standard_Real*)Coordinates)[4] #define PntY2 ((Standard_Real*)Coordinates)[4]
#define PntZ2 ((Standard_Real*)Coordinates)[5] #define PntZ2 ((Standard_Real*)Coordinates)[5]
IMPLEMENT_STANDARD_RTTIEXT(StdPrs_HLRPolyShape, StdPrs_HLRShapeI)
//======================================================================= //=======================================================================
//function : Add //function : Add
//purpose : //purpose :
//======================================================================= //=======================================================================
void StdPrs_HLRPolyShape::ComputeHLR (const Handle(Prs3d_Presentation)& aPresentation,
void StdPrs_HLRPolyShape::Add(const Handle (Prs3d_Presentation)& aPresentation,
const TopoDS_Shape& aShape, const TopoDS_Shape& aShape,
const Handle (Prs3d_Drawer)& aDrawer, const Handle(Prs3d_Drawer)& aDrawer,
const Handle (Prs3d_Projector)& aProjector) const Handle(Graphic3d_Camera)& theProjector) const
{ {
gp_Dir aBackDir = -theProjector->Direction();
gp_Dir aXpers = theProjector->Up().Crossed (aBackDir);
gp_Ax3 anAx3 (theProjector->Center(), aBackDir, aXpers);
gp_Trsf aTrsf;
aTrsf.SetTransformation (anAx3);
const HLRAlgo_Projector aProj (aTrsf, !theProjector->IsOrthographic(), theProjector->Scale());
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(aPresentation); Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(aPresentation);
TopExp_Explorer ex; TopExp_Explorer ex;
@ -76,8 +84,7 @@ void StdPrs_HLRPolyShape::Add(const Handle (Prs3d_Presentation)& aPresentation,
} }
Handle(HLRBRep_PolyAlgo) hider = new HLRBRep_PolyAlgo(aShape); Handle(HLRBRep_PolyAlgo) hider = new HLRBRep_PolyAlgo(aShape);
hider->Projector (aProj);
hider->Projector(aProjector->Projector());
hider->Angle(aDrawer->HLRAngle()); hider->Angle(aDrawer->HLRAngle());
hider->Update(); hider->Update();
Standard_Real sta,end,dx,dy,dz; Standard_Real sta,end,dx,dy,dz;

View File

@ -17,59 +17,26 @@
#ifndef _StdPrs_HLRPolyShape_HeaderFile #ifndef _StdPrs_HLRPolyShape_HeaderFile
#define _StdPrs_HLRPolyShape_HeaderFile #define _StdPrs_HLRPolyShape_HeaderFile
#include <Prs3d_Root.hxx> #include <StdPrs_HLRShapeI.hxx>
#include <Prs3d_Drawer.hxx>
class TopoDS_Shape; //! Instantiates Prs3d_PolyHLRShape to define a display of a shape where hidden
class Prs3d_Projector; //! and visible lines are identified with respect to a given projection.
//! StdPrs_HLRPolyShape works with a polyhedral simplification of the shape whereas
//! Instantiates Prs3d_PolyHLRShape to define a //! StdPrs_HLRShape takes the shape itself into account.
//! display of a shape where hidden and visible lines are //! When you use StdPrs_HLRShape, you obtain an exact result, whereas, when you use StdPrs_HLRPolyShape,
//! identified with respect to a given projection. //! you reduce computation time but obtain polygonal segments.
//! StdPrs_HLRPolyShape works with a polyhedral
//! simplification of the shape whereas
//! StdPrs_HLRShape takes the shape itself into
//! account. When you use StdPrs_HLRShape, you
//! obtain an exact result, whereas, when you use
//! StdPrs_HLRPolyShape, you reduce computation
//! time but obtain polygonal segments.
//! The polygonal algorithm is used. //! The polygonal algorithm is used.
class StdPrs_HLRPolyShape : public Prs3d_Root class StdPrs_HLRPolyShape : public StdPrs_HLRShapeI
{ {
DEFINE_STANDARD_RTTIEXT(StdPrs_HLRPolyShape, StdPrs_HLRShapeI)
public: public:
DEFINE_STANDARD_ALLOC //! Compute presentation for specified shape.
Standard_EXPORT virtual void ComputeHLR (const Handle(Prs3d_Presentation)& thePrs,
const TopoDS_Shape& theShape,
//! Defines the hidden line removal display of the const Handle(Prs3d_Drawer)& theDrawer,
//! topology aShape in the projection defined by const Handle(Graphic3d_Camera)& theProjector) const Standard_OVERRIDE;
//! aProjector. The shape and the projection are added
//! to the display aPresentation, and the attributes of the
//! elements present in the aPresentation are defined by
//! the attribute manager aDrawer.
Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const TopoDS_Shape& aShape, const Handle(Prs3d_Drawer)& aDrawer, const Handle(Prs3d_Projector)& aProjector);
protected:
private:
}; };
#endif // _StdPrs_HLRPolyShape_HeaderFile #endif // _StdPrs_HLRPolyShape_HeaderFile

View File

@ -11,29 +11,38 @@
// Alternatively, this file may be used under the terms of Open CASCADE // Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement. // commercial license or contractual agreement.
#include <StdPrs_HLRShape.hxx>
#include <BRepAdaptor_Curve.hxx> #include <BRepAdaptor_Curve.hxx>
#include <Graphic3d_Group.hxx> #include <Graphic3d_Group.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx> #include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <StdPrs_HLRShape.hxx>
#include <StdPrs_HLRToolShape.hxx> #include <StdPrs_HLRToolShape.hxx>
#include <StdPrs_DeflectionCurve.hxx> #include <StdPrs_DeflectionCurve.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <TColgp_SequenceOfPnt.hxx> #include <TColgp_SequenceOfPnt.hxx>
#include <HLRAlgo_Projector.hxx>
IMPLEMENT_STANDARD_RTTIEXT(StdPrs_HLRShape, StdPrs_HLRShapeI)
//======================================================================= //=======================================================================
//function : Add //function : ComputeHLR
//purpose : //purpose :
//======================================================================= //=======================================================================
void StdPrs_HLRShape::ComputeHLR (const Handle(Prs3d_Presentation)& thePresentation,
void StdPrs_HLRShape::Add (const Handle(Prs3d_Presentation)& thePresentation,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer, const Handle(Prs3d_Drawer)& theDrawer,
const Handle(Prs3d_Projector)& theProjector) const Handle(Graphic3d_Camera)& theProjector) const
{ {
StdPrs_HLRToolShape aTool(theShape, theProjector->Projector()); gp_Dir aBackDir = -theProjector->Direction();
gp_Dir aXpers = theProjector->Up().Crossed (aBackDir);
gp_Ax3 anAx3 (theProjector->Center(), aBackDir, aXpers);
gp_Trsf aTrsf;
aTrsf.SetTransformation (anAx3);
const HLRAlgo_Projector aProj (aTrsf, !theProjector->IsOrthographic(), theProjector->Scale());
StdPrs_HLRToolShape aTool(theShape, aProj);
Standard_Integer aNbEdges = aTool.NbEdges(); Standard_Integer aNbEdges = aTool.NbEdges();
Standard_Integer anI; Standard_Integer anI;
Standard_Real anU1, anU2; Standard_Real anU1, anU2;

View File

@ -14,26 +14,20 @@
#ifndef _StdPrs_HLRFace_H__ #ifndef _StdPrs_HLRFace_H__
#define _StdPrs_HLRFace_H__ #define _StdPrs_HLRFace_H__
#include <Prs3d_Root.hxx> #include <StdPrs_HLRShapeI.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_Projector.hxx>
// Computes the presentation of objects with //! Computes the presentation of objects with removal of their hidden lines for a specific projector.
// removal of their hidden lines for a specific //! The exact algorithm is used.
// projector. The exact algorithm is used. class StdPrs_HLRShape : public StdPrs_HLRShapeI
class StdPrs_HLRShape: public Prs3d_Root
{ {
DEFINE_STANDARD_RTTIEXT(StdPrs_HLRShape, StdPrs_HLRShapeI)
public: public:
DEFINE_STANDARD_ALLOC //! Compute presentation for specified shape.
Standard_EXPORT virtual void ComputeHLR (const Handle(Prs3d_Presentation)& thePrs,
Standard_EXPORT static void Add
(const Handle(Prs3d_Presentation)& thePresentation,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer, const Handle(Prs3d_Drawer)& theDrawer,
const Handle(Prs3d_Projector)& theProjector); const Handle(Graphic3d_Camera)& theProjector) const Standard_OVERRIDE;
}; };
#endif #endif

View File

@ -0,0 +1,16 @@
// Copyright (c) 2020 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <StdPrs_HLRShapeI.hxx>
IMPLEMENT_STANDARD_RTTIEXT(StdPrs_HLRShapeI, Standard_Transient)

View File

@ -0,0 +1,39 @@
// Copyright (c) 2020 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _StdPrs_HLRShapeI_HeaderFile
#define _StdPrs_HLRShapeI_HeaderFile
#include <Prs3d_Presentation.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
class TopoDS_Shape;
class Prs3d_Drawer;
class Graphic3d_Camera;
//! Computes the presentation of objects with removal of their hidden lines for a specific projector.
class StdPrs_HLRShapeI : public Standard_Transient
{
DEFINE_STANDARD_RTTIEXT(StdPrs_HLRShapeI, Standard_Transient)
public:
//! Compute presentation for specified shape.
virtual void ComputeHLR (const Handle(Prs3d_Presentation)& thePrs,
const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer,
const Handle(Graphic3d_Camera)& theProjector) const = 0;
};
#endif // _StdPrs_HLRShapeI_HeaderFile

View File

@ -19,7 +19,6 @@
#include <Geom_Transformation.hxx> #include <Geom_Transformation.hxx>
#include <Prs3d_Drawer.hxx> #include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx> #include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
#include <StdPrs_WFShape.hxx> #include <StdPrs_WFShape.hxx>
#include <StdPrs_ShadedShape.hxx> #include <StdPrs_ShadedShape.hxx>
@ -58,20 +57,6 @@ void StdSelect_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*PM*/
StdPrs_WFShape::Add (P, mysh, myDrawer); StdPrs_WFShape::Add (P, mysh, myDrawer);
} }
void StdSelect_Shape::Compute(const Handle(Prs3d_Projector)& aProjector ,
const Handle(Geom_Transformation)& aGeomTrans,
const Handle(Prs3d_Presentation)& aPresentation )
{
PrsMgr_PresentableObject::Compute(aProjector,aGeomTrans,aPresentation);
}
void StdSelect_Shape::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Prs3d_Presentation)& aPresentation)
{
PrsMgr_PresentableObject::Compute(aProjector,aPresentation);
}
void StdSelect_Shape::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const void StdSelect_Shape::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{ {
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream) OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)

View File

@ -33,15 +33,6 @@ public:
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE; Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
//! computes the presentation according to a point of view
//! given by <aProjector>.
//! To be Used when the associated degenerated Presentations
//! have been transformed by <aTrsf> which is not a Pure
//! Translation. The HLR Prs can't be deducted automatically
//! WARNING :<aTrsf> must be applied
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
const TopoDS_Shape& Shape() const { return mysh; } const TopoDS_Shape& Shape() const { return mysh; }
void Shape (const TopoDS_Shape& theShape) { mysh = theShape; } void Shape (const TopoDS_Shape& theShape) { mysh = theShape; }
@ -49,10 +40,6 @@ public:
//! Dumps the content of me into the stream //! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
private:
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
private: private:
TopoDS_Shape mysh; TopoDS_Shape mysh;