LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
sim::PhotonVoxel Class Reference

Representation of a single small volume (voxel). More...

#include "PhotonVoxels.h"

Public Types

using DefaultPoint = geo::Point_t
 

Public Member Functions

 PhotonVoxel ()=default
 
 PhotonVoxel (geo::Point_t const &min, geo::Point_t const &max)
 
 PhotonVoxel (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
 
template<typename Point = DefaultPoint>
decltype(auto) GetLowerCorner () const
 Returns the voxel vertex (type Point) with the lowest coordinates. More...
 
template<typename Point = DefaultPoint>
decltype(auto) GetUpperCorner () const
 Returns the voxel vertex (type Point) with the highest coordinates. More...
 
template<typename Point = DefaultPoint>
Point GetCenter () const
 Returns the center of the voxel (type Point). More...
 

Private Attributes

geo::Point_t fVoxelMin
 
geo::Point_t fVoxelMax
 

Detailed Description

Representation of a single small volume (voxel).

Definition at line 20 of file PhotonVoxels.h.

Member Typedef Documentation

Definition at line 34 of file PhotonVoxels.h.

Constructor & Destructor Documentation

sim::PhotonVoxel::PhotonVoxel ( )
default
sim::PhotonVoxel::PhotonVoxel ( geo::Point_t const &  min,
geo::Point_t const &  max 
)
inline

Definition at line 23 of file PhotonVoxels.h.

23  : fVoxelMin(min), fVoxelMax(max)
24  {}
geo::Point_t fVoxelMin
Definition: PhotonVoxels.h:30
geo::Point_t fVoxelMax
Definition: PhotonVoxels.h:31
sim::PhotonVoxel::PhotonVoxel ( double  xMin,
double  xMax,
double  yMin,
double  yMax,
double  zMin,
double  zMax 
)
inline

Definition at line 25 of file PhotonVoxels.h.

26  : PhotonVoxel({xMin, yMin, zMin}, {xMax, yMax, zMax})
27  {}
PhotonVoxel()=default

Member Function Documentation

template<typename Point >
Point sim::PhotonVoxel::GetCenter ( ) const

Returns the center of the voxel (type Point).

Definition at line 186 of file PhotonVoxels.h.

References fVoxelMax, fVoxelMin, sim::PhotonVoxelDef::GetRegionLowerCorner(), sim::PhotonVoxelDef::GetRegionUpperCorner(), and geo::vect::middlePoint().

Referenced by phot::CreateHybridLibrary::CreateHybridLibrary(), phot::PhotonLibraryHybrid::GetCount(), evgen::LightSource::produce(), and phot::PhotonVisibilityService::reconfigure().

187 {
188  return geo::vect::convertTo<Point>(geo::vect::middlePoint({fVoxelMin, fVoxelMax}));
189 }
geo::Point_t fVoxelMin
Definition: PhotonVoxels.h:30
geo::Point_t fVoxelMax
Definition: PhotonVoxels.h:31
geo::Point_t middlePoint(BeginIter begin, EndIter end)
Returns the middle of the specified points.
template<typename Point = DefaultPoint>
decltype(auto) sim::PhotonVoxel::GetLowerCorner ( ) const

Returns the voxel vertex (type Point) with the lowest coordinates.

Referenced by sim::PhotonVoxelDef::isInsideImpl().

template<typename Point = DefaultPoint>
decltype(auto) sim::PhotonVoxel::GetUpperCorner ( ) const

Returns the voxel vertex (type Point) with the highest coordinates.

Referenced by sim::PhotonVoxelDef::isInsideImpl().

Member Data Documentation

geo::Point_t sim::PhotonVoxel::fVoxelMax
private

Definition at line 31 of file PhotonVoxels.h.

Referenced by GetCenter(), and sim::PhotonVoxelDef::isInsideImpl().

geo::Point_t sim::PhotonVoxel::fVoxelMin
private

Definition at line 30 of file PhotonVoxels.h.

Referenced by GetCenter(), and sim::PhotonVoxelDef::isInsideImpl().


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