1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0028789: Visualization, TKV3d - extend API for accessing and assigning BVH builders

Several methods in Selection classes have been moved to header files for better inlining.

BVH_Constants - added new enumeration defining common constant values used with BVH trees.
BVH - replaced NCollection_Handle with Standard_Transient handle
in classes BVH_Properties, BVH_Builder, BVH_Tree, BVH_Object.

Defined global BVH-builders instead of allocating a new one for each object set.
SelectMgr_ViewerSelector - added new method ::SetEntitySetBuilder() defining
default BVH Tree builder for SelectMgr_SensitiveEntitySet.

Added new method SelectMgr_SensitiveEntitySet::SetBuilder()
for overriding default BVH tree builder.
This commit is contained in:
kgv
2017-05-26 10:45:22 +03:00
committed by bugmaster
parent 645f581fbe
commit f5b7241978
54 changed files with 561 additions and 357 deletions

View File

@@ -24,9 +24,10 @@ IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_SensitiveEntity,Standard_Transient)
// theEntity
//=======================================================================
SelectMgr_SensitiveEntity::SelectMgr_SensitiveEntity (const Handle(SelectBasics_SensitiveEntity)& theEntity)
: mySensitive (theEntity),
myIsActiveForSelection (Standard_False)
{
mySensitive = theEntity;
myIsActiveForSelection = Standard_False;
//
}
//=======================================================================
@@ -38,40 +39,3 @@ void SelectMgr_SensitiveEntity::Clear()
mySensitive->Clear();
mySensitive.Nullify();
}
//=======================================================================
// function : BaseSensitive
// purpose : Returns related instance of SelectBasics class
//=======================================================================
const Handle(SelectBasics_SensitiveEntity)& SelectMgr_SensitiveEntity::BaseSensitive() const
{
return mySensitive;
}
//=======================================================================
// function : IsActiveForSelection
// purpose : Returns true if this entity belongs to the active selection
// mode of parent object
//=======================================================================
Standard_Boolean SelectMgr_SensitiveEntity::IsActiveForSelection() const
{
return myIsActiveForSelection;
}
//=======================================================================
// function : ResetSelectionActiveStatus
// purpose : Marks entity as inactive for selection
//=======================================================================
void SelectMgr_SensitiveEntity::ResetSelectionActiveStatus() const
{
myIsActiveForSelection = Standard_False;
}
//=======================================================================
// function : SetActiveForSelection
// purpose : Marks entity as active for selection
//=======================================================================
void SelectMgr_SensitiveEntity::SetActiveForSelection() const
{
myIsActiveForSelection = Standard_True;
}