g4tools  5.4.0
Public Types | Public Member Functions | List of all members
tools::hep::polyhedronProcessor Class Reference

Public Types

enum  Operation { UNION = 0, INTERSECTION = 1, SUBTRACTION = 2 }
 

Public Member Functions

 polyhedronProcessor ()
 
virtual ~polyhedronProcessor ()
 
void push_back (Operation a_op, const polyhedron &a_polyhedron)
 
bool execute (polyhedron &)
 
void clear ()
 
bool is_same_op () const
 
bool execute1 (polyhedron &, const std::vector< unsigned int > &)
 

Detailed Description

Definition at line 752 of file polyhedron.

Member Enumeration Documentation

◆ Operation

Enumerator
UNION 
INTERSECTION 
SUBTRACTION 

Definition at line 757 of file polyhedron.

757  { //Must be the same than BooleanProcessor OP_XXX.
758  UNION = 0
759  ,INTERSECTION = 1
760  ,SUBTRACTION = 2
761  };

Constructor & Destructor Documentation

◆ polyhedronProcessor()

tools::hep::polyhedronProcessor::polyhedronProcessor ( )
inline

Definition at line 765 of file polyhedron.

765  {
766 #ifdef TOOLS_MEM
767  mem::increment(s_class().c_str());
768 #endif
769  }

◆ ~polyhedronProcessor()

virtual tools::hep::polyhedronProcessor::~polyhedronProcessor ( )
inlinevirtual

Definition at line 770 of file polyhedron.

770  {
771 #ifdef TOOLS_MEM
772  mem::decrement(s_class().c_str());
773 #endif
774  }

Member Function Documentation

◆ clear()

void tools::hep::polyhedronProcessor::clear ( )
inline

Definition at line 787 of file polyhedron.

787 { m_ops.clear();}

◆ execute()

bool tools::hep::polyhedronProcessor::execute ( polyhedron )

◆ execute1()

bool tools::hep::polyhedronProcessor::execute1 ( polyhedron ,
const std::vector< unsigned int > &   
)

◆ is_same_op()

bool tools::hep::polyhedronProcessor::is_same_op ( ) const
inline

Definition at line 788 of file polyhedron.

788  {
789  if(!m_ops.size()) return true;
790  Operation op = m_ops[0].first;
791  std::vector<op_t>::const_iterator it;
792  for(it=m_ops.begin();it!=m_ops.end();++it) {
793  if((*it).first!=op) return false;
794  }
795  return true;
796  }

◆ push_back()

void tools::hep::polyhedronProcessor::push_back ( Operation  a_op,
const polyhedron a_polyhedron 
)
inline

Definition at line 783 of file polyhedron.

783  {
784  m_ops.push_back(op_t(a_op,a_polyhedron));
785  }

The documentation for this class was generated from the following file:
tools::hep::polyhedronProcessor::Operation
Operation
Definition: polyhedron:757
tools::hep::polyhedronProcessor::UNION
@ UNION
Definition: polyhedron:758
tools::hep::polyhedronProcessor::SUBTRACTION
@ SUBTRACTION
Definition: polyhedron:760
tools::hep::polyhedronProcessor::INTERSECTION
@ INTERSECTION
Definition: polyhedron:759