1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0029367: Visualization - simplify interface of V3d_View and V3d_Viewer

The interface of V3d_View and V3d_Viewer has been simplified.
For the fields myDefinedViews, myActiveViews, myDefinedLights, myActiveLights were added appropriate methods returning the internal raw data.
Make the next methods deprecated:
IfMoreLights(), InitActiveLights(), MoreActiveLights(), NextActiveLights(), ActiveLight() and
InitActiveViews(), MoreActiveViews(), NextActiveViews(), ActiveView(), InitDefinedViews(), MoreDefinedViews(), NextDefinedViews(), DefinedView(),
InitActiveLights(), MoreActiveLights(), NextActiveLights(), ActiveLight(), InitDefinedLights(), MoreDefinedLights(), NextDefinedLights(), DefinedLight().

Remove deprecated methods added in scope of tasks 0029290 and 0028987 (Target Version 7.3.0):
SelectMgr_SelectableObject: Init(), More(), Next(), CurrentSelection().
SelectMgr_Selection: Init(), More(), Next(), Sensitive().
V3d_AmbientLight: one constructor.
V3d_DirectionalLight: two constructors.
V3d_PositionalLight: one constructor.
V3d_SpotLight: two constructors.
This commit is contained in:
osa
2019-10-30 16:33:01 +03:00
committed by apn
parent 67312b7991
commit f7fc0c03be
26 changed files with 141 additions and 356 deletions

View File

@@ -49,7 +49,6 @@ namespace
SelectMgr_SelectableObject::SelectMgr_SelectableObject (const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d)
: PrsMgr_PresentableObject (aTypeOfPresentation3d),
myGlobalSelMode (0),
mycurrent (0),
myAutoHilight (Standard_True)
{
//

View File

@@ -172,24 +172,6 @@ public:
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
public:
//! Begins the iteration scanning for sensitive primitives.
Standard_DEPRECATED("Deprecated method, Selections() should be used instead")
void Init() { mycurrent = 1; }
//! Continues the iteration scanning for sensitive primitives.
Standard_DEPRECATED("Deprecated method, Selections() should be used instead")
Standard_Boolean More() const { return mycurrent <= myselections.Length(); }
//! Continues the iteration scanning for sensitive primitives.
Standard_DEPRECATED("Deprecated method, Selections() should be used instead")
void Next() { ++mycurrent; }
//! Returns the current selection in this framework.
Standard_DEPRECATED("Deprecated method, Selections() should be used instead")
const Handle(SelectMgr_Selection)& CurrentSelection() const { return myselections (mycurrent); }
protected:
//! Protected empty constructor.
@@ -214,7 +196,6 @@ protected:
Handle(Prs3d_Presentation) mySelectionPrs; //!< optional presentation for highlighting selected object
Handle(Prs3d_Presentation) myHilightPrs; //!< optional presentation for highlighting detected object
Standard_Integer myGlobalSelMode; //!< global selection mode
Standard_Integer mycurrent; //!< [deprecated] iterator value
Standard_Boolean myAutoHilight; //!< auto-highlighting flag defining
};

View File

@@ -26,8 +26,7 @@ IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_Selection,Standard_Transient)
// Purpose :
//==================================================
SelectMgr_Selection::SelectMgr_Selection (const Standard_Integer theModeIdx)
: myEntityIter (0),
myMode (theModeIdx),
: myMode (theModeIdx),
mySelectionState (SelectMgr_SOS_Unknown),
myBVHUpdateStatus (SelectMgr_TBU_None),
mySensFactor (2),

View File

@@ -92,25 +92,6 @@ public:
//! Return entities.
NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>& ChangeEntities() { return myEntities; }
//! Begins an iteration scanning for sensitive primitives.
Standard_DEPRECATED("Deprecated method, Entities() should be used instead")
void Init() { myEntityIter = myEntities.Lower(); }
//! Continues the iteration scanning for sensitive
//! primitives with the mode defined in this framework.
Standard_DEPRECATED("Deprecated method, Entities() should be used instead")
Standard_Boolean More() const { return myEntityIter <= myEntities.Upper(); }
//! Returns the next sensitive primitive found in the
//! iteration. This is a scan for entities with the mode
//! defined in this framework.
Standard_DEPRECATED("Deprecated method, Entities() should be used instead")
void Next() { ++myEntityIter; }
//! Returns any sensitive primitive in this framework.
Standard_DEPRECATED("Deprecated method, Entities() should be used instead")
const Handle(SelectMgr_SensitiveEntity)& Sensitive() const { return myEntities.Value (myEntityIter); }
//! Returns the flag UpdateFlag.
//! This flage gives the update status of this framework
//! in a ViewerSelector object:
@@ -142,7 +123,6 @@ public:
private:
NCollection_Vector<Handle(SelectMgr_SensitiveEntity)> myEntities;
Standard_Integer myEntityIter;
Standard_Integer myMode;
SelectMgr_TypeOfUpdate myUpdateStatus;
mutable SelectMgr_StateOfSelection mySelectionState;