Celeritas  0.5.0-56+6b053cd
Classes | Typedefs | Functions
CsgObject.hh File Reference

CSG operations on Object instances: negation, union, intersection. More...

#include <string>
#include <vector>
#include "ObjectInterface.hh"
This graph shows which files directly or indirectly include this file:

Classes

class  celeritas::orangeinp::NegatedObject
 Everywhere but the embedded object. More...
 
class  celeritas::orangeinp::JoinObjects< Op >
 Join all of the given objects with an intersection or union. More...
 

Typedefs

using celeritas::orangeinp::AnyObjects = JoinObjects< op_or >
 Union of the given objects.
 
using celeritas::orangeinp::AllObjects = JoinObjects< op_and >
 Intersection of the given objects.
 
using celeritas::orangeinp::SPConstObject = std::shared_ptr< ObjectInterface const >
 Shared pointer to an object.
 
using celeritas::orangeinp::VecSenseObj = std::vector< std::pair< Sense, SPConstObject > >
 Type used for defining a Region Definition Vector (RDV)
 

Functions

std::shared_ptr< AllObjects const > celeritas::orangeinp::make_subtraction (std::string &&label, SPConstObject const &minuend, SPConstObject const &subtrahend)
 Make a new object that is the second object subtracted from the first. More...
 
std::shared_ptr< AllObjects const > celeritas::orangeinp::make_rdv (std::string &&label, VecSenseObj &&inp)
 Make a combination of possibly negated objects. More...
 

Detailed Description

CSG operations on Object instances: negation, union, intersection.

Function Documentation

◆ make_rdv()

std::shared_ptr< AllObjects const > celeritas::orangeinp::make_rdv ( std::string &&  label,
VecSenseObj &&  inp 
)

Make a combination of possibly negated objects.

The Region Definition Vector is the SCALE way for defining media, boundaries, etc. It must not be empty.

◆ make_subtraction()

std::shared_ptr< AllObjects const > celeritas::orangeinp::make_subtraction ( std::string &&  label,
SPConstObject const &  minuend,
SPConstObject const &  subtrahend 
)

Make a new object that is the second object subtracted from the first.

This just takes the intersection the first object and the negated second:

A - B <=> A & ~B