MeVisLab Toolbox Reference
ml::CSOValidator Class Reference

#include <CSOValidator.h>

Public Member Functions

 CSOValidator (const std::vector< const CSO * > &csos)
 Constructors taking a CSO collection to be validated: a std::vector, a CSOList or a CSOGroup.
 
 CSOValidator (const CSOList &csoList)
 
 CSOValidator (const CSOGroup &csoGroup)
 
bool areAllCSOsClosed ()
 Returns whether all CSOs are closed, if a std::vector<unsigned int> is passed, the IDs of open CSOs will be put into it.
 
bool areAllCSOsClosed (CSOIdVector &violatingCSOIDs)
 
bool areAllCSOsOpen ()
 Returns whether all CSOs are open, if a std::vector<unsigned int> is passed, the IDs of closed CSOs will be put into it.
 
bool areAllCSOsOpen (CSOIdVector &violatingCSOIDs)
 
bool areAllCSOsNotSelfIntersecting ()
 Returns whether all CSOs are not self intersecting, if a std::vector<unsigned int> is passed, the IDs of self intersecting CSOs will be put into it.
 
bool areAllCSOsNotSelfIntersecting (CSOIdVector &violatingCSOIDs)
 
bool areAllCSOsInPlane ()
 Returns whether all CSOs are in-plane, if a std::vector<unsigned int> is passed, the IDs of not in-plane CSOs will be put into it.
 
bool areAllCSOsInPlane (CSOIdVector &violatingCSOIDs)
 
bool areAllCSOsInSamePlane ()
 Returns whether all CSOs are in the same plane as the first CSO in the passed CSO collection, if a std::vector<unsigned int> is passed, the IDs of CSOs laying in other planes than the first CSO will be put into it.
 
bool areAllCSOsInSamePlane (CSOIdVector &violatingCSOIDs)
 
bool areAllCSOsParallel (double epsilon)
 Returns whether all CSOs are parallel to the plane on which the first CSO in the passed CSO collection lays, if a std::vector<unsigned int> is passed, the IDs of CSOs laying not parallel to the first CSO will be put into it.
 
bool areAllCSOsParallel (double epsilon, CSOIdVector &violatingCSOIDs)
 
bool areAllCSOsParallelToPlane (const Vector3 &planeNormal, double epsilon)
 Returns whether all CSOs are parallel to the plane given by a normal vector, if a std::vector<unsigned int> is passed, the IDs of CSOs laying not parallel to the given plane will be put into it.
 
bool areAllCSOsParallelToPlane (const Vector3 &planeNormal, double epsilon, CSOIdVector &violatingCSOIDs)
 
bool areAllCSOsSatisfyingPredicate (const CSOPredicate &pred)
 Returns whether all CSOs satisfy given predicate, if a std::vector<unsigned int> is passed, the IDs of CSOs not satisfaying the predicate will be put into it.
 
bool areAllCSOsSatisfyingPredicate (const CSOPredicate &pred, CSOIdVector &violatingCSOIDs)
 
bool hasAtMostCSOs (size_t maxNumCSOs)
 Returns whether passed CSO collection has at most 'maxNumCSOs' CSOs.
 
bool hasAtLeastCSOs (size_t minNumCSOs)
 Returns whether passed CSO collection has at least 'minNumCSOs' CSOs.
 
bool hasAtMostCSOGroups (size_t maxNumGroups)
 Returns whether passed CSO collection has at most 'maxNumGroups' CSOGroups if passed CSO collection is CSOList.
 
bool hasAtLeastCSOGroups (size_t minNumGroups)
 Returns whether passed CSO collection has at least 'minNumGroups' CSOGroup if passed CSO collection is CSOList.
 

Detailed Description

Definition at line 27 of file CSOValidator.h.

Constructor & Destructor Documentation

◆ CSOValidator() [1/3]

ml::CSOValidator::CSOValidator ( const std::vector< const CSO * > & csos)

Constructors taking a CSO collection to be validated: a std::vector, a CSOList or a CSOGroup.

In case of the std::vector the caller is responsible for ensuring that all pointers within the vector are valid.

◆ CSOValidator() [2/3]

ml::CSOValidator::CSOValidator ( const CSOList & csoList)

◆ CSOValidator() [3/3]

ml::CSOValidator::CSOValidator ( const CSOGroup & csoGroup)

Member Function Documentation

◆ areAllCSOsClosed() [1/2]

bool ml::CSOValidator::areAllCSOsClosed ( )

Returns whether all CSOs are closed, if a std::vector<unsigned int> is passed, the IDs of open CSOs will be put into it.

◆ areAllCSOsClosed() [2/2]

bool ml::CSOValidator::areAllCSOsClosed ( CSOIdVector & violatingCSOIDs)

◆ areAllCSOsInPlane() [1/2]

bool ml::CSOValidator::areAllCSOsInPlane ( )

Returns whether all CSOs are in-plane, if a std::vector<unsigned int> is passed, the IDs of not in-plane CSOs will be put into it.

◆ areAllCSOsInPlane() [2/2]

bool ml::CSOValidator::areAllCSOsInPlane ( CSOIdVector & violatingCSOIDs)

◆ areAllCSOsInSamePlane() [1/2]

bool ml::CSOValidator::areAllCSOsInSamePlane ( )

Returns whether all CSOs are in the same plane as the first CSO in the passed CSO collection, if a std::vector<unsigned int> is passed, the IDs of CSOs laying in other planes than the first CSO will be put into it.

◆ areAllCSOsInSamePlane() [2/2]

bool ml::CSOValidator::areAllCSOsInSamePlane ( CSOIdVector & violatingCSOIDs)

◆ areAllCSOsNotSelfIntersecting() [1/2]

bool ml::CSOValidator::areAllCSOsNotSelfIntersecting ( )

Returns whether all CSOs are not self intersecting, if a std::vector<unsigned int> is passed, the IDs of self intersecting CSOs will be put into it.

◆ areAllCSOsNotSelfIntersecting() [2/2]

bool ml::CSOValidator::areAllCSOsNotSelfIntersecting ( CSOIdVector & violatingCSOIDs)

◆ areAllCSOsOpen() [1/2]

bool ml::CSOValidator::areAllCSOsOpen ( )

Returns whether all CSOs are open, if a std::vector<unsigned int> is passed, the IDs of closed CSOs will be put into it.

◆ areAllCSOsOpen() [2/2]

bool ml::CSOValidator::areAllCSOsOpen ( CSOIdVector & violatingCSOIDs)

◆ areAllCSOsParallel() [1/2]

bool ml::CSOValidator::areAllCSOsParallel ( double epsilon)

Returns whether all CSOs are parallel to the plane on which the first CSO in the passed CSO collection lays, if a std::vector<unsigned int> is passed, the IDs of CSOs laying not parallel to the first CSO will be put into it.

See documentation of the areAllCSOsParallelToPlane function for the meaning of epsilon.

◆ areAllCSOsParallel() [2/2]

bool ml::CSOValidator::areAllCSOsParallel ( double epsilon,
CSOIdVector & violatingCSOIDs )

◆ areAllCSOsParallelToPlane() [1/2]

bool ml::CSOValidator::areAllCSOsParallelToPlane ( const Vector3 & planeNormal,
double epsilon )

Returns whether all CSOs are parallel to the plane given by a normal vector, if a std::vector<unsigned int> is passed, the IDs of CSOs laying not parallel to the given plane will be put into it.

In order to determine whether the predicate is satisfied the following condition is evaluated: 1 - abs(planeNormal.dot(csoPlaneNormal) <= epsilon where, csoPlaneNormal - normal of plane on which CSO lays

◆ areAllCSOsParallelToPlane() [2/2]

bool ml::CSOValidator::areAllCSOsParallelToPlane ( const Vector3 & planeNormal,
double epsilon,
CSOIdVector & violatingCSOIDs )

◆ areAllCSOsSatisfyingPredicate() [1/2]

bool ml::CSOValidator::areAllCSOsSatisfyingPredicate ( const CSOPredicate & pred)

Returns whether all CSOs satisfy given predicate, if a std::vector<unsigned int> is passed, the IDs of CSOs not satisfaying the predicate will be put into it.

◆ areAllCSOsSatisfyingPredicate() [2/2]

bool ml::CSOValidator::areAllCSOsSatisfyingPredicate ( const CSOPredicate & pred,
CSOIdVector & violatingCSOIDs )

◆ hasAtLeastCSOGroups()

bool ml::CSOValidator::hasAtLeastCSOGroups ( size_t minNumGroups)

Returns whether passed CSO collection has at least 'minNumGroups' CSOGroup if passed CSO collection is CSOList.

For other CSO collections returns always false.

◆ hasAtLeastCSOs()

bool ml::CSOValidator::hasAtLeastCSOs ( size_t minNumCSOs)

Returns whether passed CSO collection has at least 'minNumCSOs' CSOs.

◆ hasAtMostCSOGroups()

bool ml::CSOValidator::hasAtMostCSOGroups ( size_t maxNumGroups)

Returns whether passed CSO collection has at most 'maxNumGroups' CSOGroups if passed CSO collection is CSOList.

For other CSO collections returns always false.

◆ hasAtMostCSOs()

bool ml::CSOValidator::hasAtMostCSOs ( size_t maxNumCSOs)

Returns whether passed CSO collection has at most 'maxNumCSOs' CSOs.


The documentation for this class was generated from the following file: