mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0032632: Visualization, AIS_ViewCube - the class AIS_ViewCubeSensitive is hidden inside CXX file
This commit is contained in:
parent
bcb2a742a7
commit
19da974edc
@ -27,13 +27,13 @@
|
|||||||
#include <Prs3d_Text.hxx>
|
#include <Prs3d_Text.hxx>
|
||||||
#include <Prs3d_ToolDisk.hxx>
|
#include <Prs3d_ToolDisk.hxx>
|
||||||
#include <Prs3d_ToolSphere.hxx>
|
#include <Prs3d_ToolSphere.hxx>
|
||||||
#include <Select3D_SensitivePrimitiveArray.hxx>
|
|
||||||
#include <SelectMgr_SequenceOfOwner.hxx>
|
#include <SelectMgr_SequenceOfOwner.hxx>
|
||||||
#include <V3d.hxx>
|
#include <V3d.hxx>
|
||||||
#include <V3d_View.hxx>
|
#include <V3d_View.hxx>
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCube, AIS_InteractiveObject)
|
IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCube, AIS_InteractiveObject)
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCubeOwner, SelectMgr_EntityOwner)
|
IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCubeOwner, SelectMgr_EntityOwner)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCubeSensitive, Select3D_SensitivePrimitiveArray)
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@ -56,29 +56,32 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Simple sensitive element for picking by point only.
|
//=======================================================================
|
||||||
class AIS_ViewCubeSensitive : public Select3D_SensitivePrimitiveArray
|
//function : AIS_ViewCubeSensitive
|
||||||
{
|
//purpose :
|
||||||
DEFINE_STANDARD_RTTI_INLINE(AIS_ViewCubeSensitive, Select3D_SensitivePrimitiveArray)
|
//=======================================================================
|
||||||
public:
|
AIS_ViewCubeSensitive::AIS_ViewCubeSensitive (const Handle(SelectMgr_EntityOwner)& theOwner,
|
||||||
//! Constructor.
|
|
||||||
AIS_ViewCubeSensitive (const Handle(SelectMgr_EntityOwner)& theOwner,
|
|
||||||
const Handle(Graphic3d_ArrayOfTriangles)& theTris)
|
const Handle(Graphic3d_ArrayOfTriangles)& theTris)
|
||||||
: Select3D_SensitivePrimitiveArray (theOwner)
|
: Select3D_SensitivePrimitiveArray (theOwner)
|
||||||
{
|
{
|
||||||
InitTriangulation (theTris->Attributes(), theTris->Indices(), TopLoc_Location());
|
InitTriangulation (theTris->Attributes(), theTris->Indices(), TopLoc_Location());
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Checks whether element overlaps current selecting volume.
|
//=======================================================================
|
||||||
virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
//function : Matches
|
||||||
SelectBasics_PickResult& thePickResult) Standard_OVERRIDE
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean AIS_ViewCubeSensitive::Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
||||||
|
SelectBasics_PickResult& thePickResult)
|
||||||
{
|
{
|
||||||
return isValidRay (theMgr)
|
return isValidRay (theMgr) && Select3D_SensitivePrimitiveArray::Matches (theMgr, thePickResult);
|
||||||
&& Select3D_SensitivePrimitiveArray::Matches (theMgr, thePickResult);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Checks if picking ray can be used for detection.
|
//=======================================================================
|
||||||
bool isValidRay (const SelectBasics_SelectingVolumeManager& theMgr) const
|
//function : isValidRay
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
bool AIS_ViewCubeSensitive::isValidRay (const SelectBasics_SelectingVolumeManager& theMgr) const
|
||||||
{
|
{
|
||||||
if (theMgr.GetActiveSelectionType() != SelectMgr_SelectionType_Point)
|
if (theMgr.GetActiveSelectionType() != SelectMgr_SelectionType_Point)
|
||||||
{
|
{
|
||||||
@ -95,7 +98,6 @@ public:
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsBoxSide
|
//function : IsBoxSide
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <Prs3d_TextAspect.hxx>
|
#include <Prs3d_TextAspect.hxx>
|
||||||
#include <SelectMgr_EntityOwner.hxx>
|
#include <SelectMgr_EntityOwner.hxx>
|
||||||
#include <V3d_TypeOfOrientation.hxx>
|
#include <V3d_TypeOfOrientation.hxx>
|
||||||
|
#include <Select3D_SensitivePrimitiveArray.hxx>
|
||||||
|
|
||||||
class AIS_AnimationCamera;
|
class AIS_AnimationCamera;
|
||||||
class AIS_ViewCubeOwner;
|
class AIS_ViewCubeOwner;
|
||||||
@ -724,4 +725,25 @@ protected:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//! Simple sensitive element for picking by point only.
|
||||||
|
class AIS_ViewCubeSensitive : public Select3D_SensitivePrimitiveArray
|
||||||
|
{
|
||||||
|
DEFINE_STANDARD_RTTIEXT(AIS_ViewCubeSensitive, Select3D_SensitivePrimitiveArray)
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! Constructor.
|
||||||
|
Standard_EXPORT AIS_ViewCubeSensitive (const Handle(SelectMgr_EntityOwner)& theOwner,
|
||||||
|
const Handle(Graphic3d_ArrayOfTriangles)& theTris);
|
||||||
|
|
||||||
|
//! Checks whether element overlaps current selecting volume.
|
||||||
|
Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
||||||
|
SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
//! Checks if picking ray can be used for detection.
|
||||||
|
Standard_EXPORT bool isValidRay (const SelectBasics_SelectingVolumeManager& theMgr) const;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
#endif // _AIS_ViewCube_HeaderFile
|
#endif // _AIS_ViewCube_HeaderFile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user