File: CutPlanes.cpp

package info (click to toggle)
vecgeom 1.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 23,928 kB
  • sloc: cpp: 88,717; ansic: 6,894; python: 1,035; sh: 582; sql: 538; makefile: 29
file content (28 lines) | stat: -rw-r--r-- 696 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "VecGeom/volumes/CutPlanes.h"

namespace vecgeom {
inline namespace VECGEOM_IMPL_NAMESPACE {

VECCORE_ATT_HOST_DEVICE
void CutPlanes::Set(int index, Vector3D<Precision> const &normal, Vector3D<Precision> const &x0)
{
  fCutPlanes[index].Set(normal, x0);
}

VECCORE_ATT_HOST_DEVICE
void CutPlanes::Set(int index, Vector3D<Precision> const &normal, Precision distance)
{
  fCutPlanes[index].Set(normal, distance);
}

std::ostream &operator<<(std::ostream &os, CutPlanes const &planes)
{
  for (int i = 0; i < 2; ++i) {
    os << "{" << planes.GetCutPlane(0) << ", " << planes.GetCutPlane(1) << "}\n";
  }
  return os;
}

} // End inline implementation namespace

} // End global namespace