mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0025576: Visualization - implement AIS_ConnectedInteractive::AcceptDisplayMode()
by redirecting to myReference->AcceptDisplayMode().
This commit is contained in:
parent
f7991731de
commit
60adbe67f2
@ -56,21 +56,6 @@ AIS_InteractiveObject(aTypeOfPresentation3d)
|
|||||||
SetHilightMode(0);
|
SetHilightMode(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : Type
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
AIS_KindOfInteractive AIS_ConnectedInteractive::Type() const
|
|
||||||
{
|
|
||||||
return AIS_KOI_Object;
|
|
||||||
}
|
|
||||||
|
|
||||||
Standard_Integer AIS_ConnectedInteractive::Signature() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Connect
|
//function : Connect
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -57,8 +57,6 @@ class AIS_ConnectedInteractive : public AIS_InteractiveObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//! Disconnects the previous view and sets highlight
|
//! Disconnects the previous view and sets highlight
|
||||||
//! mode to 0. This highlights the wireframe presentation
|
//! mode to 0. This highlights the wireframe presentation
|
||||||
//! aTypeOfPresentation3d.
|
//! aTypeOfPresentation3d.
|
||||||
@ -66,10 +64,10 @@ public:
|
|||||||
Standard_EXPORT AIS_ConnectedInteractive(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView);
|
Standard_EXPORT AIS_ConnectedInteractive(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView);
|
||||||
|
|
||||||
//! Returns KOI_Object
|
//! Returns KOI_Object
|
||||||
Standard_EXPORT virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE;
|
virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KOI_Object; }
|
||||||
|
|
||||||
//! Returns 1
|
//! Returns 0
|
||||||
Standard_EXPORT virtual Standard_Integer Signature() const Standard_OVERRIDE;
|
virtual Standard_Integer Signature() const Standard_OVERRIDE { return 0; }
|
||||||
|
|
||||||
//! Establishes the connection between the Connected
|
//! Establishes the connection between the Connected
|
||||||
//! Interactive Object, anotherIobj, and its reference.
|
//! Interactive Object, anotherIobj, and its reference.
|
||||||
@ -80,14 +78,12 @@ public:
|
|||||||
//! Locates instance in aLocation.
|
//! Locates instance in aLocation.
|
||||||
Standard_EXPORT virtual void Connect (const Handle(AIS_InteractiveObject)& anotherIobj, const gp_Trsf& aLocation);
|
Standard_EXPORT virtual void Connect (const Handle(AIS_InteractiveObject)& anotherIobj, const gp_Trsf& aLocation);
|
||||||
|
|
||||||
|
|
||||||
//! Returns true if there is a connection established
|
//! Returns true if there is a connection established
|
||||||
//! between the presentation and its source reference.
|
//! between the presentation and its source reference.
|
||||||
Standard_Boolean HasConnection() const;
|
Standard_Boolean HasConnection() const { return !myReference.IsNull(); }
|
||||||
|
|
||||||
|
|
||||||
//! Returns the connection with the reference Interactive Object.
|
//! Returns the connection with the reference Interactive Object.
|
||||||
const Handle(AIS_InteractiveObject)& ConnectedTo() const;
|
const Handle(AIS_InteractiveObject)& ConnectedTo() const { return myReference; }
|
||||||
|
|
||||||
//! Clears the connection with a source reference. The
|
//! Clears the connection with a source reference. The
|
||||||
//! presentation will no longer be displayed.
|
//! presentation will no longer be displayed.
|
||||||
@ -96,22 +92,22 @@ public:
|
|||||||
|
|
||||||
//! 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.
|
||||||
virtual Standard_Boolean AcceptShapeDecomposition() const Standard_OVERRIDE;
|
virtual Standard_Boolean AcceptShapeDecomposition() const Standard_OVERRIDE
|
||||||
|
{
|
||||||
|
return !myReference.IsNull() && myReference->AcceptShapeDecomposition();
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Return true if reference presentation accepts specified display mode.
|
||||||
|
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE
|
||||||
|
{
|
||||||
|
return myReference.IsNull()
|
||||||
|
|| myReference->AcceptDisplayMode (theMode);
|
||||||
|
}
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTIEXT(AIS_ConnectedInteractive,AIS_InteractiveObject)
|
DEFINE_STANDARD_RTTIEXT(AIS_ConnectedInteractive,AIS_InteractiveObject)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
||||||
Handle(AIS_InteractiveObject) myReference;
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
|
|
||||||
//! Calculates the view aPresentation and its updates.
|
//! Calculates the view aPresentation and its updates.
|
||||||
//! The latter are managed by aPresentationManager.
|
//! The latter are managed by aPresentationManager.
|
||||||
//! The display mode aMode is 0 by default.
|
//! The display mode aMode is 0 by default.
|
||||||
@ -121,7 +117,7 @@ private:
|
|||||||
//! compute anything, but just uses the
|
//! compute anything, but just uses the
|
||||||
//! presentation of this last object, with
|
//! presentation of this last object, with
|
||||||
//! 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 = 0) 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>.
|
//! given by <aProjector>.
|
||||||
@ -152,16 +148,11 @@ private:
|
|||||||
//! given by <aProjector>.
|
//! given by <aProjector>.
|
||||||
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation, const TopoDS_Shape& aShape);
|
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation, const TopoDS_Shape& aShape);
|
||||||
|
|
||||||
TopoDS_Shape myShape;
|
protected:
|
||||||
|
|
||||||
|
Handle(AIS_InteractiveObject) myReference;
|
||||||
|
TopoDS_Shape myShape;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#include <AIS_ConnectedInteractive.lxx>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _AIS_ConnectedInteractive_HeaderFile
|
#endif // _AIS_ConnectedInteractive_HeaderFile
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
// Created on: 1997-01-08
|
|
||||||
// Created by: Robert COUBLANC
|
|
||||||
// Copyright (c) 1997-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.
|
|
||||||
|
|
||||||
inline const Handle(AIS_InteractiveObject)& AIS_ConnectedInteractive::ConnectedTo() const
|
|
||||||
{return myReference;}
|
|
||||||
|
|
||||||
|
|
||||||
inline Standard_Boolean AIS_ConnectedInteractive::HasConnection() const
|
|
||||||
{return !myReference.IsNull();}
|
|
||||||
|
|
||||||
inline Standard_Boolean AIS_ConnectedInteractive::AcceptShapeDecomposition() const
|
|
||||||
{return myReference.IsNull()? Standard_False : myReference->AcceptShapeDecomposition();}
|
|
@ -30,7 +30,6 @@ AIS_ConcentricRelation.cxx
|
|||||||
AIS_ConcentricRelation.hxx
|
AIS_ConcentricRelation.hxx
|
||||||
AIS_ConnectedInteractive.cxx
|
AIS_ConnectedInteractive.cxx
|
||||||
AIS_ConnectedInteractive.hxx
|
AIS_ConnectedInteractive.hxx
|
||||||
AIS_ConnectedInteractive.lxx
|
|
||||||
AIS_ConnectStatus.hxx
|
AIS_ConnectStatus.hxx
|
||||||
AIS_DataMapIteratorOfDataMapOfILC.hxx
|
AIS_DataMapIteratorOfDataMapOfILC.hxx
|
||||||
AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx
|
AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user