Open CASCADE Technology 7.8.2.dev
|
Template Selector for elements selection from BVH tree. More...
#include <BOPTools_BoxSelector.hxx>
Public Types | |
typedef BVH::VectorType< Standard_Real, Dimension >::Type | BVH_VecNd |
Public Types inherited from BVH_Traverse< Standard_Real, Dimension, BVH_BoxSet< Standard_Real, Dimension, Standard_Integer >, Standard_Boolean > | |
typedef BVH_Box< Standard_Real, Dimension >::BVH_VecNt | BVH_VecNt |
Public Member Functions | |
Constructor | |
BOPTools_BoxSelector () | |
Empty constructor. | |
public interfaces | |
void | Clear () |
Clears the indices. | |
void | SetBox (const BVH_Box< Standard_Real, Dimension > &theBox) |
Sets the box. | |
const TColStd_ListOfInteger & | Indices () const |
Returns the list of accepted indices. | |
Rejection/Acceptance rules | |
virtual Standard_Boolean | RejectNode (const BVH_VecNd &theCMin, const BVH_VecNd &theCMax, Standard_Boolean &theIsInside) const override |
Checks if the box should be rejected. | |
Standard_Boolean | RejectElement (const Standard_Integer theIndex) |
Checks if the element should be rejected. | |
virtual Standard_Boolean | AcceptMetric (const Standard_Boolean &theIsInside) const override |
Checks if the metric of the node may be accepted. | |
virtual Standard_Boolean | Accept (const Standard_Integer theIndex, const Standard_Boolean &theIsInside) override |
Accepts the element with the index <theIndex> in BVH tree. | |
Public Member Functions inherited from BVH_Traverse< Standard_Real, Dimension, BVH_BoxSet< Standard_Real, Dimension, Standard_Integer >, Standard_Boolean > | |
BVH_Traverse () | |
Constructor. | |
void | SetBVHSet (BVH_BoxSet< Standard_Real, Dimension, Standard_Integer > *theBVHSet) |
Sets the BVH Set containing the BVH tree. | |
virtual Standard_Boolean | RejectNode (const BVH_VecNt &theCornerMin, const BVH_VecNt &theCornerMax, Standard_Boolean &theMetric) const=0 |
Rejection of the node by bounding box. Metric is computed to choose the best branch. Returns true if the node should be rejected, false otherwise. | |
Standard_Integer | Select () |
Selection of the elements from the BVH tree by the rules defined in Accept/Reject methods. The method requires the BVHSet containing BVH tree to be set. Returns the number of accepted elements. | |
Standard_Integer | Select (const opencascade::handle< BVH_Tree< Standard_Real, Dimension > > &theBVH) |
Performs selection of the elements from the BVH tree by the rules defined in Accept/Reject methods. Returns the number of accepted elements. | |
Public Member Functions inherited from BVH_BaseTraverse< Standard_Boolean > | |
virtual Standard_Boolean | IsMetricBetter (const Standard_Boolean &, const Standard_Boolean &) const |
Compares the two metrics and chooses the best one. Returns true if the first metric is better than the second, false otherwise. | |
virtual Standard_Boolean | RejectMetric (const Standard_Boolean &) const |
Rejects the node by the metric. | |
virtual Standard_Boolean | Stop () const |
Returns the flag controlling the tree descend. Returns true if the tree descend should be stopped. | |
Protected Attributes | |
Fields | |
BVH_Box< Standard_Real, Dimension > | myBox |
Selection box. | |
TColStd_ListOfInteger | myIndices |
Selected indices. | |
Protected Attributes inherited from BVH_Traverse< Standard_Real, Dimension, BVH_BoxSet< Standard_Real, Dimension, Standard_Integer >, Standard_Boolean > | |
BVH_BoxSet< Standard_Real, Dimension, Standard_Integer > * | myBVHSet |
Additional Inherited Members | |
Protected Member Functions inherited from BVH_BaseTraverse< Standard_Boolean > | |
BVH_BaseTraverse () | |
Constructor. | |
virtual | ~BVH_BaseTraverse () |
Destructor. | |
Template Selector for elements selection from BVH tree.
BVH::VectorType<Standard_Real,Dimension>::Type BOPTools_BoxSelector< Dimension >::BVH_VecNd |
|
inline |
Empty constructor.
|
inlineoverridevirtual |
Accepts the element with the index <theIndex> in BVH tree.
|
inlineoverridevirtual |
Checks if the metric of the node may be accepted.
Reimplemented from BVH_Traverse< Standard_Real, Dimension, BVH_BoxSet< Standard_Real, Dimension, Standard_Integer >, Standard_Boolean >.
|
inline |
Clears the indices.
|
inline |
Returns the list of accepted indices.
|
inline |
Checks if the element should be rejected.
|
inlineoverridevirtual |
Checks if the box should be rejected.
|
inline |
Sets the box.
|
protected |
Selection box.
|
protected |
Selected indices.